
**System Key Data** OS: Debian 12 mailman: GNU Mailman 3.3.10 (Tom Sawyer) Python: Python 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] Method: Python Virtual Environment Installation
Ahoi,
i am trying to configure a mailman3 instance to replace a mailman2 installation (both on different hosts). The mm3 instance is actually not reachable (Incoming) but can send (Outgoing), as is the desired state to be (we intend to swap IPs during change of systems).
A. Verify Incoming
To verify that emails send to the MTA (postfix) get properly handled and handed over to the mm3-instance i tried to substitute incoming email by
a) swaks utility [1] (fail) b) telnet utility [2] (fail) c) command ''mailman inject'' [3] (success)
With c) i copied a former generate testmail-file to the mm3-host and injected it directly to my testlist (leaving out the MTA).
With a) and b) i tried to hand over a testmail via CLI to the MTA (postfix) what resulted in the error:
"Recipient address rejected: User unknown in local recipient table"
B. /etc/postfix/main.cfg
A search in mailman-users@mailman3.org archives [4] pointed me to the configuration of postfix as MTA [5], especially settings with the 'local_recipients_maps' parameter that should be set like [5]:
local_recipient_maps = proxy:unix:passwd.byname $alias_maps hash:/path-to-mailman/var/data/postfix_lmtp
what i did / already had done.
C. aliasing, restarting services and test without ,
I then restarted postfix, rebuilt the postfix aliases (command ''newaliases'') and rebuilt the mailman aliases (command ''mailman aliases''), even tried with space-separation instead of coma-separation [6], testet again with same result.
D. empty /opt/mailman/mm/var/data/postfix_lmtp
and then i just found out that my postfix_lmpt file was empty (that i believe to be the the place from where the hastables take their input).
Questions:
- could somebody suggest a way, an entry should occur in postfix_lmtp?
- What would be the appropriate order to manually generate aliases? first: postfix-command ''newaliases'' and second: mailman-command ''mailman aliases'' or reverse?
- finding traces [7] of a file called postfix.cfg i can't find it (anymore) in the official installation instructions. Is that file (still?) necessary regarding: 3.1 parameter for default lookup table type 3.2 pointing to command ''postmap''
- to what user should the command ''postmap'' be available [8]?
Any pointer to manuals or examples i may have missed or ideas on any of those 4 questions would be greatly appreciated.
lg alexander
Sources:
[1] swaks utility
https://jetmore.org/john/code/swaks/
[2] telnet utility
https://de.wikipedia.org/wiki/Telnet
[3] command ''mailman inject''
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/commands/do...
[4] search mailman-users@mailman3.org archives 'user unknown in local recipient table'
[5] docs mm3: 'Hooking up your mail server'
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht...
[6] docs postfix: local_recipient_maps
https://www.postfix.org/postconf.5.html#local_recipient_maps
[7] traces of postfix.cfg
- https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/J...
- https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/NEWS.h...
[8] docs mm3: transport maps (regarding command ''postmap'')
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht...

On Wed, Apr 23, 2025 at 5:56 PM Alexander Inzinger-Zrock via Mailman-users < mailman-users@mailman3.org> wrote:
**System Key Data** OS: Debian 12 mailman: GNU Mailman 3.3.10 (Tom Sawyer) Python: Python 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] Method: Python Virtual Environment Installation
Ahoi,
i am trying to configure a mailman3 instance to replace a mailman2 installation (both on different hosts). The mm3 instance is actually not reachable (Incoming) but can send (Outgoing), as is the desired state to be (we intend to swap IPs during change of systems).
A. Verify Incoming
To verify that emails send to the MTA (postfix) get properly handled and handed over to the mm3-instance i tried to substitute incoming email by
a) swaks utility [1] (fail) b) telnet utility [2] (fail) c) command ''mailman inject'' [3] (success)
With c) i copied a former generate testmail-file to the mm3-host and injected it directly to my testlist (leaving out the MTA).
With a) and b) i tried to hand over a testmail via CLI to the MTA (postfix) what resulted in the error:
"Recipient address rejected: User unknown in local recipient table"
B. /etc/postfix/main.cfg
A search in mailman-users@mailman3.org archives [4] pointed me to the configuration of postfix as MTA [5], especially settings with the 'local_recipients_maps' parameter that should be set like [5]:
local_recipient_maps = proxy:unix:passwd.byname $alias_maps hash:/path-to-mailman/var/data/postfix_lmtp
what i did / already had done.
C. aliasing, restarting services and test without ,
I then restarted postfix, rebuilt the postfix aliases (command ''newaliases'') and rebuilt the mailman aliases (command ''mailman aliases''), even tried with space-separation instead of coma-separation [6], testet again with same result.
D. empty /opt/mailman/mm/var/data/postfix_lmtp
and then i just found out that my postfix_lmpt file was empty (that i believe to be the the place from where the hastables take their input).
Questions:
- could somebody suggest a way, an entry should occur in postfix_lmtp?
- What would be the appropriate order to manually generate aliases? first: postfix-command ''newaliases'' and second: mailman-command ''mailman aliases'' or reverse?
- finding traces [7] of a file called postfix.cfg i can't find it (anymore) in the official installation instructions. Is that file (still?) necessary regarding: 3.1 parameter for default lookup table type 3.2 pointing to command ''postmap''
- to what user should the command ''postmap'' be available [8]?
Any pointer to manuals or examples i may have missed or ideas on any of those 4 questions would be greatly appreciated.
There is just one definitive manual: https://docs.mailman3.org/en/latest/install/virtualenv.html
If this is NOT what you followed, then my suggestion is you start over afresh and follow the steps without skipping anything. You can test Mailman3+Postfix with a phony domain name. As long as the domain name is local, deliveries to the list should happen. Try and apply the KISS principle. For instance, you could submit a post to Mailman by:
echo "This is a test post" | mail -s " Testing ML Delivery" listname@phony-domain-name
If submitted from an address you have subscribed to the list, you should see it in the archives of that list. Otherwise, you can see it in Postorius under held messages. The transaction details will be in mailman.log as well as your Postfix logfile.
-- 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]

Alexander Inzinger-Zrock via Mailman-users writes:
B. /etc/postfix/main.cfg local_recipient_maps = proxy:unix:passwd.byname $alias_maps hash:/path-to-mailman/var/data/postfix_lmtp
This is the main issue for main.cfg. Others we can deal with later if they apply to your system.
C. aliasing, restarting services and test without ,
I then restarted postfix, rebuilt the postfix aliases (command ''newaliases'')
These are not relevant to Mailman 3, except maybe you have an alias for the Mailman site admin.
and rebuilt the mailman aliases (command ''mailman aliases''),
I usually just restart Mailman instead (building the aliases is most of the time taken up by starting Mailman with Postfix).
D. empty /opt/mailman/mm/var/data/postfix_lmtp
and then i just found out that my postfix_lmpt file was empty
- What database are you using?[1] Is it running? If not, yes, that file is going to be empty.
- Do you have any lists configured for your Mailman 3 instance? If not, that file will be empty.
- Is Mailman running? (This probably isn't necessary, just checking.)
- Is there a postfix_lmtp.db file in the same place? (Postfix will not read the plaintext version, it must be a .db file.)
- could somebody suggest a way, an entry should occur in postfix_lmtp?
Each entry in postfix_lmtp is added to the SQL database when you create a list, then the whole file is refreshed from the SQL database at that time. After that, the file is refreshed from the database every time you start Mailman or run "mailman aliases".
- What would be the appropriate order to manually generate aliases? first: postfix-command ''newaliases'' and
It doesn't matter. newaliases only handles local aliases. Mailman 3's aliases are necessarily *virtual* aliases, and the database is created from the postfix_lmtp file using "postmap", not "postalias".
- finding traces [7] of a file called postfix.cfg
3.1 parameter for default lookup table type 3.2 pointing to command ''postmap''
Both entries must be present or Mailman will error out before creating the postfix_lmtp file. There should be a template (actually, you can probably use it "as is") in site-packages/mailman/mta/postfix.cfg (or maybe in config/postfix.cfg).
This file can be located anywhere, but I recommend putting it where mailman.cfg is (usually /etc/mailman3), and pointing to it in the [mta] section of mailman.cfg with the full path.
- to what user should the command ''postmap'' be available [8]?
The user that the "mailman" command expects to run as. Normally it is installed with a+x in /usr/sbin, so as long as you put the full path in postfix.cfg you'll be fine.
Footnotes: [1] We *strongly* recommend a full-scale SQL implementation like PostgreSQL (what the Mailman developers generally use) or one of the MySQL family (popular but not with us for no particular reason, we just happen to use PostgreSQL). sqlite3 is a great product, but it is not designed for heavy concurrent usage, and a typical Mailman system has about 15 daemons running all the time that are accessing the DB.
-- GNU Mailman consultant (installation, migration, customization) Sirus Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

On 4/23/25 9:25 AM, Stephen J. Turnbull wrote:
Alexander Inzinger-Zrock via Mailman-users writes:
and then i just found out that my postfix_lmpt file was empty
- What database are you using?[1] Is it running? If not, yes, that file is going to be empty.
- Do you have any lists configured for your Mailman 3 instance? If not, that file will be empty.
- Is Mailman running? (This probably isn't necessary, just checking.)
- Is there a postfix_lmtp.db file in the same place? (Postfix will not read the plaintext version, it must be a .db file.)
If you haven't set incoming
in the mta
section of mailman.cfg to
other than the default mailman.mta.postfix.LMTP
, the mailman aliases
command will at least write
# AUTOMATICALLY GENERATED BY MAILMAN ON {}
#
# This file is generated by Mailman, and is kept in sync with the binary
hash
# file. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what you're
# doing, and can keep the two files properly in sync. If you screw it up,
# you're on your own.
to the postfix_lmtp file.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (4)
-
Alexander Inzinger-Zrock
-
Mark Sapiro
-
Odhiambo Washington
-
Stephen J. Turnbull