automation/ansible
Adrien Luxey c1739eaf3a started jitsi conf and moved zinzoscope and lexperimental to templating solution 2020-04-27 09:45:07 +02:00
..
group_vars/all started jitsi conf and moved zinzoscope and lexperimental to templating solution 2020-04-27 09:45:07 +02:00
roles started jitsi conf and moved zinzoscope and lexperimental to templating solution 2020-04-27 09:45:07 +02:00
README.md started jitsi conf and moved zinzoscope and lexperimental to templating solution 2020-04-27 09:45:07 +02:00
ansible-playbook.yml.bkp we build config files remotely. next test the mailing through msmtp and deploy! 2020-03-31 18:32:13 +02:00
ansible.cfg started a config for jitsi and modified some ansible to include arvuhez 2020-04-20 15:44:45 +02:00
build.yml started a config for jitsi and modified some ansible to include arvuhez 2020-04-20 15:44:45 +02:00
command we build config files remotely. next test the mailing through msmtp and deploy! 2020-03-31 18:32:13 +02:00
deploy.yml started a config for jitsi and modified some ansible to include arvuhez 2020-04-20 15:44:45 +02:00
inventory started jitsi conf and moved zinzoscope and lexperimental to templating solution 2020-04-27 09:45:07 +02:00
mail.log deployed rennesdesbois.fr 2020-04-09 17:29:12 +02:00
sites.yml deployed rennesdesbois.fr 2020-04-09 17:29:12 +02:00

README.md

Required packages on remote

Python (installed with pip for user adrien):

  • docker
  • docker-compose
  • pymysql

TODO: Ansible task to install that before the rest

Configure mailing

When I send mails from the container with php, with current msmtp config, it fails if the recipient isn't @luxeylab.net.

Host mail.log:

# mail('adrien@yopmai.com'...) in container 
Apr  2 09:07:56 Serenity postfix/smtpd[22617]: connect from unknown[172.27.1.2]
Apr  2 09:07:56 Serenity postfix/smtpd[22617]: NOQUEUE: reject: RCPT from unknown[172.27.1.2]: 454 4.7.1 <adrien@yopmail.com>: Relay access denied; from=<php@www.rennesdesbois.fr> to=<adrien@yopmail.com> proto=ESMTP helo=<localhost>
Apr  2 09:07:56 Serenity postfix/smtpd[22617]: lost connection after DATA from unknown[172.27.1.2]
Apr  2 09:07:56 Serenity postfix/smtpd[22617]: disconnect from unknown[172.27.1.2] ehlo=1 mail=1 rcpt=0/1 data=0/1 commands=2/4

# mail('adrien@yopmai.com'...) on host 
Apr  2 09:10:33 Serenity postfix/cleanup[27364]: 5DB1D3CCDA: message-id=<20200402071033.5DB1D3CCDA@luxeylab.net>
Apr  2 09:10:33 Serenity postfix/qmgr[2066]: 5DB1D3CCDA: from=<adrien@luxeylab.net>, size=286, nrcpt=1 (queue active)
Apr  2 09:10:33 Serenity postfix/smtp[27366]: 5DB1D3CCDA: to=<adrien@yopmail.com>, relay=smtp.yopmail.com[87.98.164.155]:25, delay=0.68, delays=0.35/0/0.23/0.09, dsn=2.0.0, status=sent (250 mail saved)
Apr  2 09:10:33 Serenity postfix/qmgr[2066]: 5DB1D3CCDA: removed

# mail('adrien@luxeylab.net'...) in container 
Apr  2 08:08:12 Serenity postfix/smtpd[2647]: connect from unknown[172.27.1.2]
Apr  2 08:08:12 Serenity postfix/smtpd[2647]: 6BA723CCD8: client=unknown[172.27.1.2]
Apr  2 08:08:12 Serenity postfix/cleanup[5829]: 6BA723CCD8: message-id=<>
Apr  2 08:08:12 Serenity postfix/smtpd[2647]: disconnect from unknown[172.27.1.2] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Apr  2 08:08:12 Serenity postfix/qmgr[2066]: 6BA723CCD8: from=<php@www.rennesdesbois.fr>, size=290, nrcpt=1 (queue active)
Apr  2 08:08:13 Serenity postfix/smtp[5831]: 6BA723CCD8: to=<adrien.luxey@gmail.com>, orig_to=<adrien@luxeylab.net>, relay=gmail-smtp-in.l.google.com[74.125.133.26]:25, delay=0.79, delays=0.23/0.03/0.11/0.42, dsn=2.0.0, status=sent (250 2.0.0 OK  1585807693 130si4035771wma.123 - gsmtp)
Apr  2 08:08:13 Serenity postfix/qmgr[2066]: 6BA723CCD8: removed

Good docs on the topic:

I needed to add Docker's network (172.0.0.0/8) to mynetworks in /etc/postfix/main.cf. Also inet_interfaces would have had to be changed if Arthur didn't put it to all.

Now solved.