Verification emails 'helo' rejected
Hi friends.
I'm now getting a 500 server error upon signing up a new username on the web-based front end. The username is created in the back end, but the verification email does not get sent.
This is GNU Mailman 3.3.9 (Tom Sawyer), venv, Ubuntu 24.04LTS, PostgreSQL, Postfix
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've seen places where 'localhost' appears in the Mailman settings (settings.py, mailman.cfg, mailman-web.py), and tried changing them to the host's FQDN and restarting mailman3 and mailman3-web, but the problem persists.
Suggestions will be appreciated. ~ Greg
On Mon, Oct 14, 2024 at 10:43 PM Greg Newby via Mailman-users < mailman-users@mailman3.org> wrote:
Hi friends.
I'm now getting a 500 server error upon signing up a new username on the web-based front end. The username is created in the back end, but the verification email does not get sent.
This is GNU Mailman 3.3.9 (Tom Sawyer), venv, Ubuntu 24.04LTS, PostgreSQL, Postfix
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've seen places where 'localhost' appears in the Mailman settings (settings.py, mailman.cfg, mailman-web.py), and tried changing them to the host's FQDN and restarting mailman3 and mailman3-web, but the problem persists.
Find and fix these values to what they should be as explained.
# The sender of emails from Django such as address confirmation requests. # Set this to a valid email address. DEFAULT_FROM_EMAIL = 'johndoe@domain.name'
# The sender of error messages from Django. Set this to a valid email # address. SERVER_EMAIL = 'johndoe@domain.name'
I use listmaster@lists.domain.name in my servers.
I am not sure what files on your server contains them in your server.
And while at it, also fix the site_owner: email in mailman.cfg.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
Thanks for this, Odhiambo. Unfortunately it doesn't address my situation. See below:
On Tue, Oct 15, 2024 at 3:21 AM Odhiambo Washington <odhiambo@gmail.com> wrote:
On Mon, Oct 14, 2024 at 10:43 PM Greg Newby via Mailman-users < mailman-users@mailman3.org> wrote:
Hi friends.
I'm now getting a 500 server error upon signing up a new username on the web-based front end. The username is created in the back end, but the verification email does not get sent.
This is GNU Mailman 3.3.9 (Tom Sawyer), venv, Ubuntu 24.04LTS, PostgreSQL, Postfix
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>
^^^^ Note the problem isn't the "From:" address. That is being correctly configured from mailman-web.py and settings.py via the variables below.
The problem is it's going "To:" root@localhost. I don't know why this is happening - shouldn't it be going to redacted@gmail.com?
Also, based on settings below shouldn't this be From: postorius@lists.domain.tld not From: root@lists.domain.tld?
More:
lists.domain.tld is the domain for Mailman3. I don't know why it's trying to send email from root@.
I've seen places where 'localhost' appears in the Mailman settings (settings.py, mailman.cfg, mailman-web.py), and tried changing them to the host's FQDN and restarting mailman3 and mailman3-web, but the problem persists.
Find and fix these values to what they should be as explained.
# The sender of emails from Django such as address confirmation requests. # Set this to a valid email address. DEFAULT_FROM_EMAIL = 'johndoe@domain.name'
# The sender of error messages from Django. Set this to a valid email # address. SERVER_EMAIL = 'johndoe@domain.name'
I use listmaster@lists.domain.name in my servers.
In the default files via the venv installation, these were already set properly:
EMAILNAME='lists.domain.tld' <-- I set this myself
These were default in settings.py and mailman-web.py: DEFAULT_FROM_EMAIL = 'postorius@{}'.format(EMAILNAME) SERVER_EMAIL = 'root@{}'.format(EMAILNAME)
I set them explicitly to postorius@lists.domain.tld and root@lists.domain.tld and restarted mailman and mailman web, and this did not change the problem with the server error and mail log entries above.
I am not sure what files on your server contains them in your server.
And while at it, also fix the site_owner: email in mailman.cfg.
That was already set to my email address, and I do correctly get site emails, such as cron output.
Further guidance would be appreciated. ~ Greg
On Wed, Oct 16, 2024 at 8:15 AM Greg Newby via Mailman-users < mailman-users@mailman3.org> wrote:
Thanks for this, Odhiambo. Unfortunately it doesn't address my situation. See below:
On Tue, Oct 15, 2024 at 3:21 AM Odhiambo Washington <odhiambo@gmail.com> wrote:
On Mon, Oct 14, 2024 at 10:43 PM Greg Newby via Mailman-users < mailman-users@mailman3.org> wrote:
Hi friends.
I'm now getting a 500 server error upon signing up a new username on the web-based front end. The username is created in the back end, but the verification email does not get sent.
This is GNU Mailman 3.3.9 (Tom Sawyer), venv, Ubuntu 24.04LTS,
PostgreSQL,
Postfix
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>
^^^^ Note the problem isn't the "From:" address. That is being correctly configured from mailman-web.py and settings.py via the variables below.
The problem is it's going "To:" root@localhost. I don't know why this is happening - shouldn't it be going to redacted@gmail.com?
Also, based on settings below shouldn't this be From: postorius@lists.domain.tld not From: root@lists.domain.tld?
More:
lists.domain.tld is the domain for Mailman3. I don't know why it's
to send email from root@.
I've seen places where 'localhost' appears in the Mailman settings (settings.py, mailman.cfg, mailman-web.py), and tried changing them to
trying the
host's FQDN and restarting mailman3 and mailman3-web, but the problem persists.
Find and fix these values to what they should be as explained.
# The sender of emails from Django such as address confirmation requests. # Set this to a valid email address. DEFAULT_FROM_EMAIL = 'johndoe@domain.name'
# The sender of error messages from Django. Set this to a valid email # address. SERVER_EMAIL = 'johndoe@domain.name'
I use listmaster@lists.domain.name in my servers.
In the default files via the venv installation, these were already set properly:
EMAILNAME='lists.domain.tld' <-- I set this myself
These were default in settings.py and mailman-web.py: DEFAULT_FROM_EMAIL = 'postorius@{}'.format(EMAILNAME) SERVER_EMAIL = 'root@{}'.format(EMAILNAME)
For the venv installation, I rarely hear a mention of mailman-web.py. I only know about settings.py, mailman,cfg and mailman-hyperkitty.cfg files in /etc/mailman3/
Are you really using the venv install?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
Definitely it's venv. It might be that mailman-web.py is an artifact of an earlier attempt with Ubuntu packages, since settings.py and mailman-web.py are quite similar.
I do have the other config files you mention, all under /etc/mailman3/
Thanks for any further thoughts... ~ Greg
On Wed, Oct 16, 2024 at 3:47 AM Odhiambo Washington <odhiambo@gmail.com> wrote:
On Wed, Oct 16, 2024 at 8:15 AM Greg Newby via Mailman-users < mailman-users@mailman3.org> wrote:
Thanks for this, Odhiambo. Unfortunately it doesn't address my situation. See below:
On Tue, Oct 15, 2024 at 3:21 AM Odhiambo Washington <odhiambo@gmail.com> wrote:
On Mon, Oct 14, 2024 at 10:43 PM Greg Newby via Mailman-users < mailman-users@mailman3.org> wrote:
Hi friends.
I'm now getting a 500 server error upon signing up a new username on
the
web-based front end. The username is created in the back end, but the verification email does not get sent.
This is GNU Mailman 3.3.9 (Tom Sawyer), venv, Ubuntu 24.04LTS, PostgreSQL, Postfix
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>
^^^^ Note the problem isn't the "From:" address. That is being correctly configured from mailman-web.py and settings.py via the variables below.
The problem is it's going "To:" root@localhost. I don't know why this is happening - shouldn't it be going to redacted@gmail.com?
Also, based on settings below shouldn't this be From: postorius@lists.domain.tld not From: root@lists.domain.tld?
More:
lists.domain.tld is the domain for Mailman3. I don't know why it's
to send email from root@.
I've seen places where 'localhost' appears in the Mailman settings (settings.py, mailman.cfg, mailman-web.py), and tried changing them to
trying the
host's FQDN and restarting mailman3 and mailman3-web, but the problem persists.
Find and fix these values to what they should be as explained.
# The sender of emails from Django such as address confirmation requests. # Set this to a valid email address. DEFAULT_FROM_EMAIL = 'johndoe@domain.name'
# The sender of error messages from Django. Set this to a valid email # address. SERVER_EMAIL = 'johndoe@domain.name'
I use listmaster@lists.domain.name in my servers.
In the default files via the venv installation, these were already set properly:
EMAILNAME='lists.domain.tld' <-- I set this myself
These were default in settings.py and mailman-web.py: DEFAULT_FROM_EMAIL = 'postorius@{}'.format(EMAILNAME) SERVER_EMAIL = 'root@{}'.format(EMAILNAME)
For the venv installation, I rarely hear a mention of mailman-web.py. I only know about settings.py, mailman,cfg and mailman-hyperkitty.cfg files in /etc/mailman3/
Are you really using the venv install?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
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.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
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
On 10/16/24 11:04, Thomas Ward via Mailman-users wrote:
This is actually a postfix misconfiguration. By default, Postfix uses the
myhostname
variable to define your HELO/EHLO.
I don't think that's the case here. The issue is with SMTP from Django to Postfix, not with SMTP from Postfix.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Success! Below:
On Wed, Oct 16, 2024 at 10:52 AM Mark Sapiro <mark@msapiro.net> 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.
That was the answer. I had the short hostname, not the fully qualified domain name.
Thank you! The logfile messages were pretty confusing since they did not mention the hostname at all.
Postfix was not the problem, as you wrote separately. ~ Greg
participants (4)
-
Greg Newby
-
Mark Sapiro
-
Odhiambo Washington
-
Thomas Ward