Hi there, we just installed mailman in our internal environment and want to use our own mailserver for sending the mails. Can someone explain which configuration i have to make in my mailman.cfg? I just set smtp_host and smtp_port which seems to work as the mailman server connects to my mailserver but it generates e-mails with blank recipients and headers. Maybe someone can give me a hint? Thanks and regards
johannes.wolf--- via Mailman-users writes:
we just installed mailman in our internal environment and want to use our own mailserver for sending the mails. Can someone explain which configuration i have to make in my mailman.cfg? I just set smtp_host and smtp_port
That's all you need to do, since it's working.
but it generates e-mails with blank recipients and headers.
We generally use "generates" to mean notifications that Mailman creates and sends, such as address confirmation when signing up, or moderation requests to administrators. I assume that is not the case here. That is, you're talking about emails posted to the list and redistributed to subscribers by Mailman. If it is, please let me know.
First, try sending mail to both the list and a member by their address in Cc, and compare the header fields. It's unlikely, but we should check that this is not something that's happening at the sender.
Second, what do you mean by "blank recipients and headers"? That To: and/or Cc: are present but empty? That To: and/or Cc: are missing? If not, what do you think is missing? What other headers are blank?
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
Thanks for your answer.
I am referring to the emails confirming the subscription or the approval notification to the list administrator. These emails are generated during the respective actions, but when I look at the log on my mail server, some of the emails only have a sender but no recipient. Shouldn't the Postfix service on the Mailman server simply forward the email to the “external” mail server for sending?
On 11/26/25 11:54 AM, johannes.wolf--- via Mailman-users wrote:
I am referring to the emails confirming the subscription or the approval notification to the list administrator. These emails are generated during the respective actions, but when I look at the log on my mail server, some of the emails only have a sender but no recipient.
I don't know any circumstance where Mailman would send a message with no recipients.
What are the actual log messages in the Postfix log? Also, what's in Mailman's smtp.log?
Shouldn't the Postfix service on the Mailman server simply forward the email to the “external” mail server for sending? That's up to your Postfix configuration.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
johannes.wolf--- via Mailman-users writes:
I am referring to the emails confirming the subscription or the approval notification to the list administrator. These emails are generated during the respective actions, but when I look at the log on my mail server, some of the emails only have a sender but no recipient.
Postfix is a multi-daemon system. Log messages like this:
Dec 01 14:05:01 turnbull.jp postfix/qmgr[731085]: C8CC22032D:
from=<steve@turnbull.sk.tsukuba.ac.jp>, size=4005, nrcpt=4
(queue active)
are common for the 'qmgr' daemon. But the 'smtpd' daemon's messages usually has both "from=" and "to=" phrases. (This is just from a quick look at my own logs, not reliable except that I'm not surprised that some log messages had no explicit recipient.)
As Mark says, you should provide examples of the log messages you're describing.
Shouldn't the Postfix service on the Mailman server simply forward the email to the “external” mail server for sending?
That depends on what else it is doing. If there are ordinary users or certain daemons sending email offsite, there should be spam checking. In an enterprise setting, there might be checks for data exfiltration or insertion of legal disclaimers.
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
Thanks for your responses. I just did a few tests and I changed my config the following way for the mailing:
mailman.cfg <<<<< [mta] incoming: mailman.mta.postfix.LMTP outgoing: mailman.mta.deliver.deliver lmtp_host: 127.0.0.1 lmtp_port: 8024 smtp_host: localhost smtp_port: 25 verp_confirmations: no verp_personalized_deliveries: no verp_delivery_interval: 0 verp_delimiter: +
postconf -n <<<<< alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no compatibility_level = 3.6 inet_interfaces = all inet_protocols = all local_recipient_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp mailbox_size_limit = 0 mydestination = $myhostname, mailing.tester.de, localhost.tester.de, , localhost myhostname = mailing.tester.de mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname owner_request_special = no readme_directory = no recipient_delimiter = + relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains relayhost = [172.25.10.24]:25 smtp_tls_CApath = /etc/ssl/certs smtp_tls_security_level = may smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_security_level = may transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp unknown_local_recipient_reject_code = 550
When I try to subscribe to a list called "Smartcity" the email is processed and the smtp.log shows the following lines: <<<<< Nov 27 20:53:38 2025 (146986) <176427321849.147026.3535542433696669790@tester-test-mailman.tester.local> smtp to smartcity@mailing.tester.de for 1 recips, completed in 0.032538414001464844 seconds Nov 27 20:53:38 2025 (146986) <176427321849.147026.3535542433696669790@tester-test-mailman.tester.local> post to smartcity@mailing.tester.de from smartcity-owner@mailing.tester.de, 999 bytes Nov 27 20:53:38 2025 (146985) Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin) Nov 27 20:53:38 2025 (146985) Peer: ('127.0.0.1', 40180) Nov 27 20:53:38 2025 (146985) ('127.0.0.1', 40180) handling connection Nov 27 20:53:38 2025 (146985) ('127.0.0.1', 40180) >> b'LHLO mailing.tester.de' Nov 27 20:53:38 2025 (146985) ('127.0.0.1', 40180) >> b'MAIL FROM:<smartcity-bounces@mailing.tester.de> SIZE=1241' Nov 27 20:53:38 2025 (146985) ('127.0.0.1', 40180) sender: smartcity-bounces@mailing.tester.de Nov 27 20:53:38 2025 (146985) ('127.0.0.1', 40180) >> b'RCPT TO:<smartcity-owner@mailing.tester.de>' Nov 27 20:53:38 2025 (146985) ('127.0.0.1', 40180) recip: smartcity-owner@mailing.tester.de Nov 27 20:53:38 2025 (146985) ('127.0.0.1', 40180) >> b'DATA' Nov 27 20:53:38 2025 (146985) ('127.0.0.1', 40180) >> b'QUIT' Nov 27 20:53:38 2025 (146985) ('127.0.0.1', 40180) connection lost Nov 27 20:53:38 2025 (146985) ('127.0.0.1', 40180) Connection lost during _handle_client() Nov 27 20:53:40 2025 (146986) <176427321849.147026.3535542433696669790@tester-test-mailman.tester.local> smtp to smartcity@mailing.tester.de for 1 recips, completed in 0.009531497955322266 seconds Nov 27 20:53:40 2025 (146986) <176427321849.147026.3535542433696669790@tester-test-mailman.tester.local> post to smartcity@mailing.tester.de from smartcity-owner@mailing.tester.de, 1241 bytes Nov 27 20:53:40 2025 (146985) Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin) Nov 27 20:53:40 2025 (146985) Peer: ('127.0.0.1', 40190) Nov 27 20:53:40 2025 (146985) ('127.0.0.1', 40190) handling connection Nov 27 20:53:40 2025 (146985) ('127.0.0.1', 40190) >> b'LHLO mailing.tester.de' Nov 27 20:53:40 2025 (146985) ('127.0.0.1', 40190) >> b'MAIL FROM:<> SIZE=3666 BODY=8BITMIME' Nov 27 20:53:40 2025 (146985) ('127.0.0.1', 40190) sender: <> Nov 27 20:53:40 2025 (146985) ('127.0.0.1', 40190) >> b'RCPT TO:<smartcity-bounces+johannes.wolf=tester.de@mailing.tester.de>' Nov 27 20:53:40 2025 (146985) ('127.0.0.1', 40190) recip: smartcity-bounces+johannes.wolf=tester.de@mailing.tester.de Nov 27 20:53:40 2025 (146985) ('127.0.0.1', 40190) >> b'DATA' Nov 27 20:53:40 2025 (146985) ('127.0.0.1', 40190) >> b'QUIT' Nov 27 20:53:40 2025 (146985) ('127.0.0.1', 40190) connection lost Nov 27 20:53:40 2025 (146985) ('127.0.0.1', 40190) Connection lost during _handle_client()
mailman.log <<<<< [27/Nov/2025:20:53:31 +0100] "GET /3.1/lists/smartcity.mailing.tester.de HTTP/1.1" 200 446 "-" "GNU Mailman REST client v3.3.5" [27/Nov/2025:20:53:31 +0100] "GET /3.1/lists/smartcity@mailing.tester.de/requests?token_owner=subscriber&request_type=subscription HTTP/1.1" 200 90 "-" "GNU Mailman REST client v3.3.5" [27/Nov/2025:20:53:31 +0100] "GET /3.1/lists/smartcity@mailing.tester.de/requests/count?token_owner=moderator HTTP/1.1" 200 73 "-" "GNU Mailman REST client v3.3.5" [27/Nov/2025:20:53:31 +0100] "GET /3.1/lists/smartcity@mailing.tester.de/held/count HTTP/1.1" 200 73 "-" "GNU Mailman REST client v3.3.5" [27/Nov/2025:20:53:32 +0100] "GET /3.1/lists/smartcity.mailing.tester.de HTTP/1.1" 200 446 "-" "GNU Mailman REST client v3.3.5" [27/Nov/2025:20:53:32 +0100] "GET /3.1/lists/smartcity@mailing.tester.de/requests?token_owner=moderator&request_type=subscription HTTP/1.1" 200 90 "-" "GNU Mailman REST client v3.3.5" [27/Nov/2025:20:53:32 +0100] "GET /3.1/lists/smartcity@mailing.tester.de/requests/count?token_owner=moderator HTTP/1.1" 200 73 "-" "GNU Mailman REST client v3.3.5" [27/Nov/2025:20:53:32 +0100] "GET /3.1/lists/smartcity@mailing.tester.de/held/count HTTP/1.1" 200 73 "-" "GNU Mailman REST client v3.3.5" Nov 27 20:53:38 2025 (147026) smartcity@mailing.tester.de: held subscription request from jowo@kaaw.de [27/Nov/2025:20:53:38 +0100] "POST /3.1/members HTTP/1.0" 202 142 "-" "-" Nov 27 20:53:39 2025 (146984) OWNER: <176427321849.147026.3535542433696669790@tester-test-mailman.tester.local>
On my relaying mail host the email is coming up in "MAIL FROM" is set "smartcity-bounces+johannes.wolf=tester.de@mailing.tester.de" but the fields "Header-From", "Recipient" and "subject" are empty. Why is the e-mail passed to my MTA but the adresses are not resolved correctly from before in Mailman3?
Thanks and regards
On 11/27/25 12:10 PM, johannes.wolf--- via Mailman-users wrote:
Thanks for your responses. I just did a few tests and I changed my config the following way for the mailing:
mailman.cfg <<<<< looks OK
postconf -n <<<<< Looks OK
When I try to subscribe to a list called "Smartcity" the email is processed and the smtp.log shows the following lines: <<<<< All of which look as they should.
mailman.log <<<<< Looks OK
On my relaying mail host the email is coming up in "MAIL FROM" is set "smartcity-bounces+johannes.wolf=tester.de@mailing.tester.de" but the fields "Header-From", "Recipient" and "subject" are empty. Why is the e-mail passed to my MTA but the adresses are not resolved correctly from before in Mailman3?
What's in your postfix mail.log or whatever it's called?
What's in the relay host's log?
What happens to the mail?
You say the fields "Header-From", "Recipient" and "subject" are empty, but I don't know what this means. The relevant SMTP commands are MAIL FROM, RCPT TO and DATA. Any RFC 5122 headers such as Subject: are included in the message passed as DATA.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Well ok, I did some additional debugging on my debian machine and recognized that postfix did not write to /var/log/mail.log. I just installed missing rsyslog and then I got output from postfix to /var/log/mail.log. The log told me that my relaying host is replying with "unable to relay". After some further investigations I just recognized one missing config on my relaying host which is managing the permissions for outgoing mails. Sorry for the confusion, the email delivery is now working fine.
Thank you also for the super-fast responses!
participants (3)
-
johannes.wolf@kaaw.de -
Mark Sapiro -
Stephen J. Turnbull