vokomokum / vkmkm-deploy

[WiP] Vokomokum setup for deployment of IT systems
http://www.vokomokum.nl/
3 stars 1 forks source link

Make members outgoing mail work #4

Open wvengen opened 5 years ago

wvengen commented 5 years ago

The mailserver (smtp) and Foodsoft (foodsoft) use a mail relay specified by the environment variables SMTP_ADDRESS, SMTP_PORT, SMTP_USER_NAME, SMTP_PASSWORD. The members app (members) also needs to honour these for outgoing mail to work.

wvengen commented 5 years ago

The better way would be to start using something like pyramid_mailer, but as we're currently calling sendmail, we may just as well replace that with a basic program to deliver to a smarthost.

wvengen commented 5 years ago

I've added ssmtp to relay mail to the smtp instance. Now when I try to send payment reminders from Foodsoft, I get the following error:

Vokomokum request failed: <type 'exceptions.AssertionError'>: 

and the mail server mentions:

postfix/smtpd[75]: connect from vkmkm-deploy_members_1.vkmkm-deploy_default[172.21.0.8]
postfix/smtpd[75]: lost connection after MAIL from vkmkm-deploy_members_1.vkmkm-deploy_default[172.21.0.8]
postfix/smtpd[75]: disconnect from vkmkm-deploy_members_1.vkmkm-deploy_default[172.21.0.8] helo=1 mail=1 commands=2

I can see in captured network traffic that the smtp connection is closed after MAIL FROM:<finance@...> and 2.1.0 Ok server response.

wvengen commented 5 years ago

@nhoening any idea what this could be? And earlier I saw the following error:

WARNI [members.utils.mail][waitress] Could not send mail to , subject "Payment request / Verzoek tot betaling"(mail filename is MemberNo2): 
nhoening commented 5 years ago

Hm, difficult for me to judge right now. Maybe we can setup a call sometime to talk this through?

nhoening commented 5 years ago

Thanks for the work here btw!