On 10/16/24 13:52, Mark Sapiro wrote:
On 10/14/24 12:42, Greg Newby via Mailman-users wrote:
Here are the corresponding logfile entries from mailmanweb.log: smtplib.SMTPRecipientsRefused: {'redacted@gmail.com': (504, b'5.5.2 <mail>: Helo command rejected: need fully-qualified hostname')}
and from mail.log: Oct 14 12:06:26 domain postfix/smtpd[722764]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 504 5.5.2 <mail>: Helo command rejected: need fully-qualified hostname; from=<root@lists.domain.tld> to=<root@localhost> proto=ESMTP helo=<mail>
lists.domain.tld is the domain for Mailman3. I don't know why it's trying to send email from root@.
I think the mail.log entry is for the DSN for the failure. The issue is the HELO/EHLO command. Try the following in your venv
(venv) ...:~$ python Python 3... Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.getfqdn()
If that returns
localhost
, that's the issue. I think you can fix it by putting a fully qualified domain name in /etc/hostname.
This is actually a postfix misconfiguration. By default, Postfix uses
the myhostname
variable to define your HELO/EHLO.
In your /etc/postfix/main.cf change your myhostname
to be an FQDN. If
your mail server's FQDN is actually mail.example.com on the rDNS and
forward DNS side, then set this in /etc/postfix/main.cf:
myhostname = mail.example.com
Then restart your Postfix. That will solve your issue.
Thomas