Forum OpenACS Q&A: Issues with acs_mail_lite::send to gmail addresses

I have acs_mail_lite smtp set to a postfix instance. When I attempt to send to an address hosted on google's gsuite, I get the following logged by postfix. (I've obfuscated some hostnames and IPs

Apr 20 19:40:25 pfserver postfix/smtp[8722]: [ID 197553 mail.info] 58A5D2A75F: to=<mailto:info@company.org>, relay=aspmx.l.google.com[74.125.197.27]:25, delay=0.61, delays=0.05/0/0.3/0.26, dsn=5.7.1, status=bounced (host aspmx.l.google.com[74.125.197.27] said: 550-5.7.1 [xxx.xx.xxx.179] Messages missing a valid messageId header are not 550 5.7.1 accepted. x5-20020a654145000000b005130d9f6e66si2904300pgp.366 - gsmtp (in reply to end of DATA command))

If I send a message to the same address using the mailx command, it get delivered without errors. Also email sent with acs_mail_lite::send to addresses not hosted by google, are delivered without error.

Any ideas?

Collapse
Posted by Gustaf Neumann on
I would recommend configuring the package parameter "EmailDeliveryMode" of acs-mail-lite to "nssmtpd" and install the NaviServer module nssmtpd. This solved several issues for us. It also supports debugging of the mail server communication by activating log severity "Debug(smtpd)"

-g

[1] https://bitbucket.org/naviserver/nssmtpd/

Collapse
Posted by Keith Paskett on
That didn't solve the problem, but logging did give me some more clues.

It appears that the google mail server doesn't like the message-id created for email addresses that are not associated with ACS users.

When I added a user with the email address of my google group, then emails would send.

If there is a user with the email address, I get a message-id like the following and google accepts the email.
Apr 21 10:25:03 pfserver postfix/cleanup[21735]: [ID 197553 mail.info] A08FF2AD46: message-id=<mailto:20573.46157836076.18-281+1682699103+59A2ABE1E65FC5B55A5A3DA756E4A8704CD23658@logansw.com>;

If there is no user with the email address, the message-id is as follows and it gets rejected.
Apr 21 10:41:45 pfserver postfix/cleanup[21874]: [ID 197553 mail.info] 01E022B6D3: message-id=20573.1682095304.1@logansw.com

Collapse
Posted by Keith Paskett on
Actually the message-id that works does not start with mailto: in it. That's being added by the OpenACS Forums code.

It should just be:
message-id=<20573.46157836076.18-281+...

Collapse
Posted by Gustaf Neumann on
Hmm, can it be that you have some older version of the forums in place, or some local modification? I can't find a code, where "mailto:" is added to the message-id. Or, maybe, it this coming from some parameter?