configuring postfix local recipient table

**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

It is:
/etc/mailman3/mailman.cfg incoming: mailman.mta.postfix.LMTP
despite, the file postfix_lmtp is completely empty.
I checked for mailman<->database config in settings.py but the credentials are correct, i can loggin to Mariadb with the mm3-manual-suggested database-user ''mailman''.

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). […] 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".
Thanks for the tipps.
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?
1.1 MariaDB 1.2 running ('systemctl status mariadb.service […] Active: active (running)')
Do you have any lists configured for your Mailman 3 instance? If not, that file will be empty.
I have a list ''testliste01@MY_DOMAIN'', i can ''mailman inject'' mails to, 1 owner, 5 members (including the owner). I should point out that MY_DOMAIN is not equal to the HOSTNAME of the machine, but testmails with command ''mail'' or ''telnet'' show the same User-unkown-error, regardles of attempts sending to testliste01@MY_DOMAIN or testliste01@HOSTNAME.
Is Mailman running? (This probably isn't necessary, just checking.)
Running ('systemctl status mailman3.service […] Active: active (running)') also ('systemctl status mailmanweb.service […] Active: active (running)')
Is there a postfix_lmtp.db file in the same place? (Postfix will not read the plaintext version, it must be a .db file.)
Yes, under /opt/mailman/mm/var/data i have
- mailman.db
- postfix_domains (empty)
- postfix_domains.db
- postfix_lmtp (empty)
- postfix_lmtp.db I dimly remember a problem with either 2) and 4) or 3) and 5) not beeing automatically created, but i can not tell exactly anymore.
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.
- this file seems to be missing in my setting
- also the postmap command seemed to be unavailable for the user ''mailman''.
- [X] placed file in same dir as mailman.cfg (/etc/mailman3/)
- [X] replaced old config and pointed to it in mailman.cfg with full path: #+begin_src txt /etc/mailman3/mailman.cfg #configuration: python:mailman.config.postfix configuration: /etc/mailman3/postfix.cfg #+end_src command ''mailman conf'' will show the new configuration path for [mta] but no results for search term 'postmap_command' nor 'transport_file_type'.
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.
- [ ] made postmap-command available for user ''mailman'' (still have to work on that one, will give a follow-up as soon as i tried some ideas)

sorry, forgot to delete my sourceblock markers.
[X] replaced old config and pointed to it in mailman.cfg with full path: #+begin_src txt /etc/mailman3/mailman.cfg #configuration: python:mailman.config.postfix configuration: /etc/mailman3/postfix.cfg #+end_src
should have been:
[X] replaced old config and pointed to it in mailman.cfg with full path: /etc/mailman3/mailman.cfg:
" #configuration: python:mailman.config.postfix configuration: /etc/mailman3/postfix.cfg "

On 4/25/25 01:02, Alexander Inzinger-Zrock via Mailman-users wrote:
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.
- this file seems to be missing in my setting
- also the postmap command seemed to be unavailable for the user ''mailman''.
- [X] placed file in same dir as mailman.cfg (/etc/mailman3/)
- [X] replaced old config and pointed to it in mailman.cfg with full path: #+begin_src txt /etc/mailman3/mailman.cfg #configuration: python:mailman.config.postfix configuration: /etc/mailman3/postfix.cfg #+end_src command ''mailman conf'' will show the new configuration path for [mta] but no results for search term 'postmap_command' nor 'transport_file_type'.
What does mailman info
show for config file:?
What does mailman conf -s mta
show for
[mta] configuration: [mta] incoming: mailman.mta.postfix.LMTP
What's in /etc/mailman3/postfix.cfg?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

What does
mailman info
show for config file:?
config file: /etc/mailman3/mailman.cfg
What does
mailman conf -s mta
show for[mta] configuration: [mta] incoming: mailman.mta.postfix.LMTP
[mta] configuration: /etc/mailman3/postfix.cfg [mta] incoming: mailman.mta.postfix.LMTP
What's in /etc/mailman3/postfix.cfg?
[postfix] … postmap_command: /usr/sbin/postmap … transport_file_type: hash
- where '…' means i cut comments away.
- just copy-pasted from [1].
- also checked that command ''postmap'' (under /usr/sbin) is available for user 'mailman' (usr/sbin was not in path; it is now).
lg alexander
[1] postfix.cfg
https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/config/postfix....

Alexander Inzinger-Zrock via Mailman-users writes:
- also checked that command ''postmap'' (under /usr/sbin) is available for user 'mailman' (usr/sbin was not in path; it is now).
This should not matter since the full path is in postfix.cfg, so Mailman should find it and run it unless there is some permissions problem or the executable itself is broken, regardless of PATH.
You've probably run all these pretty recently, but if you've made any changes since then:
What is the output of the "mailman lists" command? (expect the test list with domain) What is the output of the "mailman aliases" command? (expect none) After "mailman aliases" do you get aliases in the postfix_lmtp file?
-- GNU Mailman consultant (installation, migration, customization) Sirus Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

Am 28.04.25 um 16:27 schrieb Stephen J. Turnbull:
Alexander Inzinger-Zrock via Mailman-users writes:
- also checked that command ''postmap'' (under /usr/sbin) is available for user 'mailman' (usr/sbin was not in path; it is now).
This should not matter since the full path is in postfix.cfg, so Mailman should find it and run it unless there is some permissions problem or the executable itself is broken, regardless of PATH.
You've probably run all these pretty recently, but if you've made any changes since then:
What is the output of the "mailman lists" command? (expect the test list with domain)
2 matching mailing lists found: testliste01@MY_DOMAIN testliste02@my-example.com
- MY_DOMAIN - replaced my domain by MY_DOMAIN
- second was a test domain, created via postorius to check if i mesed up with the first one - no differences
What is the output of the "mailman aliases" command? (expect none)
Indeed, none.
After "mailman aliases" do you get aliases in the postfix_lmtp file?
No.

Ahoi,
first i would like to thank you all for your prompt help.
I spent yesterday to evaluate most of the input i got and will try to respond to the best of my knowledge. Especially on the first hint [1] i still have to do some more research, so i will answer to second and third answer first.
Seeing that answer becoming longer and longer, i tried to cut it down and decided to split it up for better on point discussion (as follows).
lg aiz
[1]
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...

[Status]
Suggestion:
It seems, we are wasting to much time with a probably messed up system. I suggest, that i do as initially suggested [1] and start over with a reinstall.
Last idea before that would be to
- delete the files:
-rw-r--r-- 1 mailman mailman 0 Mar 21 11:58 postfix_domains -rw-r--r-- 1 mailman mailman 12K Mar 24 11:44 postfix_domains.db -rw-r--r-- 1 mailman mailman 0 Mar 21 11:58 postfix_lmtp -rw-r--r-- 1 mailman mailman 12K Mar 24 11:44 postfix_lmtp.db
restart services
test if programms make new files
report to mailinglist
Would that be of interest to someone?
lg aiz
[1]
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...

On 4/29/25 00:17, Alexander Inzinger-Zrock via Mailman-users wrote:
[Status]
Suggestion:
It seems, we are wasting to much time with a probably messed up system. I suggest, that i do as initially suggested [1] and start over with a reinstall.
Last idea before that would be to
- delete the files:
-rw-r--r-- 1 mailman mailman 0 Mar 21 11:58 postfix_domains -rw-r--r-- 1 mailman mailman 12K Mar 24 11:44 postfix_domains.db -rw-r--r-- 1 mailman mailman 0 Mar 21 11:58 postfix_lmtp -rw-r--r-- 1 mailman mailman 12K Mar 24 11:44 postfix_lmtp.db
restart services
test if programms make new files
report to mailinglist
Would that be of interest to someone?
Yes.
Also, is there anything in Mailman's logs from the time you ran mailman aliases
?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Splitting up answer:
Am 29.04.25 um 18:27 schrieb Mark Sapiro:
Also, is there anything in Mailman's logs from the time you ran
mailman aliases
?
Nothing in logs (before or) after command ''mailman aliases'' and debug level everywhere is: info.
What logs? Everything under /opt/mailman/mm/var/logs:
- bounce.log
- debug.log
- mailman.log
- plugins.log
- smtp.log
All empty.
lg aiz

On Wed, Apr 30, 2025 at 2:55 PM Alexander Inzinger-Zrock via Mailman-users < mailman-users@mailman3.org> wrote:
Splitting up answer:
Am 29.04.25 um 18:27 schrieb Mark Sapiro:
Also, is there anything in Mailman's logs from the time you ran
mailman aliases
?Nothing in logs (before or) after command ''mailman aliases'' and debug level everywhere is: info.
What logs? Everything under /opt/mailman/mm/var/logs:
- bounce.log
- debug.log
- mailman.log
- plugins.log
- smtp.log
All empty.
^^^^^^^^^^^ mailman.log should never be empty. At the least, it will contain some entries about task runners, like:
[30/Apr/2025:14:00:01 +0300] "GET /3.1/lists?count=10&page=1 HTTP/1.1" 200
477 "-" "GNU Mailman REST client v3.3.5"
Apr 30 14:18:22 2025 (54456) Task runner evicted 0 expired pendings
Apr 30 14:18:22 2025 (54456) Task runner deleted 0 orphaned workflows
Apr 30 14:18:22 2025 (54456) Task runner deleted 0 orphaned requests
Apr 30 14:18:22 2025 (54456) Task runner deleted 0 orphaned messages
Apr 30 14:18:22 2025 (54456) Task runner deleted 0 orphaned message files
Apr 30 14:18:22 2025 (54456) Task runner evicted 0 expired bounce events
Apr 30 14:18:22 2025 (54456) Task runner evicted expired cache entries
[30/Apr/2025:15:00:02 +0300] "GET /3.1/lists?count=10&page=1 HTTP/1.1" 200
477 "-" "GNU Mailman REST client v3.3.5"
If those aren't there, then your installation has more problems than you think, IMHO.
-- 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]

Am 30.04.25 um 14:12 schrieb Odhiambo Washington:
If those aren't there, then your installation has more problems than you think, IMHO.
totally agree.
Just wanted to offer the to-be-deleted instance for some test and knowledge-collection - if whished.
If there is no more test idea i would go with the re-install.
lg aiz

Alexander Inzinger-Zrock via Mailman-users writes:
What logs? Everything under /opt/mailman/mm/var/logs:
- bounce.log
- debug.log
- mailman.log
- plugins.log
- smtp.log
All empty.
As Odhiambo says, since Mailman 3 is apparently running, mailman.log should have entries describing startup activities. You also wrote that messages were delivered via "mailman inject", in which case there should be various lookups in mailman.log and delivery notices in smtp.log.
Did you set var_dir or layout in mailman.cfg? If not, you may have an alternate var_dir which is either the current directory when you start Mailman or possibly /var/tmp/mailman. That is also where "mailman aliases" will put the postfix aliases (in the "data" subdirectory).
It might be a good idea to post your whole mailman.cfg and mailman3.service files to figure where Mailman thinks it lives.
-- GNU Mailman consultant (installation, migration, customization) Sirus Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

Am 30.04.25 um 15:36 schrieb Stephen J. Turnbull:
Did you set var_dir or layout in mailman.cfg? If not, you may have an alternate var_dir which is either the current directory when you start Mailman or possibly /var/tmp/mailman. That is also where "mailman aliases" will put the postfix aliases (in the "data" subdirectory).
It seems i set both *facepalm* while doing [1] and then adding changes according to [2]:
In mailman.cfg i have:
[paths.here] var_dir: /opt/mailman/mm/var
but also
[mailman] layout: local
also checking via mailman conf:
''mailman conf -s mailman | grep layout''
Output: [mailman] layout: local
''mailman conf -s | grep var_dir:''
Output:
[paths.dev] var_dir: $cfg_file/../.. [paths.fhs] var_dir: /var/lib/mailman [paths.here] var_dir: /opt/mailman/mm/var [paths.local] var_dir: /var/tmp/mailman
so i have empty logs at /opt/mailman/mm/var/logs and populated log files under /var/tmp/mailman/logs
If i recall correctly, setting layout: local is the suggested way to do for virtualenv install [2], so deleting
[paths.here] var_dir: /opt/mailman/mm/var
in mailman.cfg should be the next step (what i did).
Restarting my services gave me the warnings again, but these are (we remember) wrong paths (hash:/opt/mailman/mm/var/data/postfix_lmtp).
so i looked under /var/tmp/mailman/data and here we have populated files:
-rw-rw---- 1 mailman mailman 268K Feb 19 12:51 mailman.db -rw-rw---- 1 mailman mailman 377 Apr 30 18:01 postfix_domains -rw-r----- 1 mailman mailman 12K Apr 30 18:01 postfix_domains.db -rw-rw---- 1 mailman mailman 1.8K Apr 30 18:01 postfix_lmtp -rw-r----- 1 mailman mailman 12K Apr 30 18:01 postfix_lmtp.db
Now - before changing the /etc/postfix/main.cfg - there is the question that brings us almost back to the start:
With respect to [2]:
"If you are installing Mailman from source (or using Pip), it is recommended to use paths.local."
and [3]:
" transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp local_recipient_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
[…]
local_recipient_maps = proxy:unix:passwd.byname $alias_maps hash:/path-to-mailman/var/data/postfix_lmtp "
**what is the recommended place to put the files to?**
I believe it to be /var/tmp/mailman/data according to
[mailman] layout: local
and that the above specific /opt/mailman -part is just a leftover from former times (the second and more generic part with /path-to-mailman indicates that to me).
If my assumption is correct i would create an issue + merge-request for the docs.
lg aiz

Make our lives easy: There are 3 files: mailman.cfg, settings.py, and main.cf.
We expect that from these files: /etc/postfix/main.cf /etc/mailman3/mailman.cfg /etc/mailman3/settings.py For each file, do "egrep -v '^$|^.*#' filename". You should then obfuscate any sensitive details in the output and share the contents of the file.
On Wed, Apr 30, 2025 at 8:01 PM Alexander Inzinger-Zrock via Mailman-users < mailman-users@mailman3.org> wrote:
Am 30.04.25 um 15:36 schrieb Stephen J. Turnbull:
Did you set var_dir or layout in mailman.cfg? If not, you may have an alternate var_dir which is either the current directory when you start Mailman or possibly /var/tmp/mailman. That is also where "mailman aliases" will put the postfix aliases (in the "data" subdirectory).
It seems i set both *facepalm* while doing [1] and then adding changes according to [2]:
In mailman.cfg i have:
[paths.here] var_dir: /opt/mailman/mm/var
but also
[mailman] layout: local
also checking via mailman conf:
''mailman conf -s mailman | grep layout''
Output: [mailman] layout: local
''mailman conf -s | grep var_dir:''
Output:
[paths.dev] var_dir: $cfg_file/../.. [paths.fhs] var_dir: /var/lib/mailman [paths.here] var_dir: /opt/mailman/mm/var [paths.local] var_dir: /var/tmp/mailman
so i have empty logs at /opt/mailman/mm/var/logs and populated log files under /var/tmp/mailman/logs
If i recall correctly, setting layout: local is the suggested way to do for virtualenv install [2], so deleting
[paths.here] var_dir: /opt/mailman/mm/var
in mailman.cfg should be the next step (what i did).
Restarting my services gave me the warnings again, but these are (we remember) wrong paths (hash:/opt/mailman/mm/var/data/postfix_lmtp).
so i looked under /var/tmp/mailman/data and here we have populated files:
-rw-rw---- 1 mailman mailman 268K Feb 19 12:51 mailman.db -rw-rw---- 1 mailman mailman 377 Apr 30 18:01 postfix_domains -rw-r----- 1 mailman mailman 12K Apr 30 18:01 postfix_domains.db -rw-rw---- 1 mailman mailman 1.8K Apr 30 18:01 postfix_lmtp -rw-r----- 1 mailman mailman 12K Apr 30 18:01 postfix_lmtp.db
Now - before changing the /etc/postfix/main.cfg - there is the question that brings us almost back to the start:
With respect to [2]:
"If you are installing Mailman from source (or using Pip), it is recommended to use paths.local."
and [3]:
" transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp local_recipient_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
[…]
local_recipient_maps = proxy:unix:passwd.byname $alias_maps hash:/path-to-mailman/var/data/postfix_lmtp "
**what is the recommended place to put the files to?**
I believe it to be /var/tmp/mailman/data according to
[mailman] layout: local
and that the above specific /opt/mailman -part is just a leftover from former times (the second and more generic part with /path-to-mailman indicates that to me).
If my assumption is correct i would create an issue + merge-request for the docs.
lg aiz
https://docs.mailman3.org/en/latest/config-core.html#configuring-filesystem-...
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to odhiambo@gmail.com
-- 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]

/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no append_dot_mydomain = no readme_directory = no compatibility_level = 2 TLS parameters section _OBFUSCATED_ SMTP Auth Section _OBFUSCATED_ smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_non_fqdn_sender reject_unknown_sender_domain reject_unknown_recipient_domain mydomain = _OBFUSCATED_ smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = _OBFUSCATED_ myorigin = /etc/mailname mydestination = $myhostname, $mydomain, _OBFUSCATED_, localhost, _OBFUSCATED_ relayhost = _OBFUSCATED_ mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 129.27.2.197 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all alias_maps = hash:/etc/aliases, hash:/opt/mailman/data/aliases alias_database = hash:/etc/aliases, hash:/opt/mailman/data/aliases message_size_limit = _OBFUSCATED_ initial_destination_concurrency = 20 queue_run_delay = _OBFUSCATED_ minimal_backoff_time = _OBFUSCATED_ default_destination_concurrency_limit = 80 unknown_local_recipient_reject_code = 550 owner_request_special = no transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp local_recipient_maps = proxy:unix:passwd.byname $alias_maps, hash:/opt/mailman/mm/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
/etc/mailman3/mailman.cfg (status: before changes suggested in https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...) (i will change [paths.local] to var_dir: /opt/mailman/mm/var)
[mailman] layout: local site_owner: _OBFUSCATED_ [database] class: mailman.database.mysql.MySQLDatabase url: mysql+pymysql://mailman:_OBFUSCATED_@localhost/mailman?charset=utf8mb4&use_unicode=1 [archiver.prototype] enable: yes [archiver.hyperkitty] class: mailman_hyperkitty.Archiver enable: yes configuration: /etc/mailman3/mailman-hyperkitty.cfg [shell] history_file: $var_dir/history.py [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 configuration: /etc/mailman3/postfix.cfg verp_confirmations: yes verp_personalized_deliveries: yes verp_delivery_interval: 1 [webservice] hostname: localhost port: 8001 use_https: no admin_user: _OBFUSCATED_ admin_pass: _OBFUSCATED_ api_version: 3.1
/etc/mailman3/settings.py
from mailman_web.settings.base import * from mailman_web.settings.mailman import * ADMINS = ( ('Mailman Suite Admin', '_OBFUSCATED_', '_OBFUSCATED_'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mailmanweb', 'USER': '_OBFUSCATED_', 'PASSWORD': '_OBFUSCATED_', 'HOST': 'localhost', 'PORT': '_OBFUSCATED_', 'OPTIONS': {'charset': 'utf8mb4'}, } } STATIC_ROOT = '/opt/mailman/web/static' COMPRESS_ENABLED = True LOGGING['handlers']['file']['filename'] = '/opt/mailman/web/logs/mailmanweb.log' ALLOWED_HOSTS = [ "127.0.0.1", "_OBFUSCATED_", ] CSRF_TRUSTED_ORIGINS = [ "_OBFUSCATED_", ] SITE_ID = 2 SECRET_KEY = '_OBFUSCATED_' MAILMAN_ARCHIVER_KEY = '_OBFUSCATED_' DEFAULT_FROM_EMAIL = '_OBFUSCATED_' SERVER_EMAIL = '_OBFUSCATED_' EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_PORT = 25 Q_CLUSTER = { 'retry': 360, 'timeout': 300, 'save_limit': 100, 'orm': 'default', } HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', 'PATH': '/opt/mailman/web/whoosh/fulltext_index', }, } ACCOUNT_LOGIN_METHODS = {'email', 'username'} ACCOUNT_EMAIL_REQUIRED = True ACCOUNT_EMAIL_VERIFICATION = 'mandatory' ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'http' ACCOUNT_UNIQUE_EMAIL = True ACCOUNT_EMAIL_UNKNOWN_ACCOUNTS = False MAILMAN_REST_API_URL = 'http://localhost:8001/' MAILMAN_REST_API_USER = '_OBFUSCATED_' MAILMAN_REST_API_PASS = '_OBFUSCATED_' MAILMAN_ARCHIVER_KEY = '_OBFUSCATED_' LOGIN_URL = 'account_login' LOGIN_REDIRECT_URL = 'list_index' LOGOUT_URL = 'account_logout' STATICFILE_FINDERS = 'compressor.finders.CompressorFinder' COMPRESS_CSS_HASHING_METHOD = 'content' COMPRESS_PRECOMPILERS = ( ('text/x-scss', 'sassc -t compressed {infile} {outfile}'), ('text/x-sass', 'sassc -t compressed {infile} {outfile}'), ) POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000' TIME_FORMAT = '%H:%M:%S' DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S'

On Fri, May 2, 2025 at 11:23 AM Alexander Inzinger-Zrock < a.inzingerzrock@gmail.com> wrote:
/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no append_dot_mydomain = no readme_directory = no compatibility_level = 2 TLS parameters section _OBFUSCATED_ SMTP Auth Section _OBFUSCATED_ smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_non_fqdn_sender reject_unknown_sender_domain reject_unknown_recipient_domain mydomain = _OBFUSCATED_ smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = _OBFUSCATED_ myorigin = /etc/mailname mydestination = $myhostname, $mydomain, _OBFUSCATED_, localhost, _OBFUSCATED_ relayhost = _OBFUSCATED_ mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 129.27.2.197 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all alias_maps = hash:/etc/aliases, hash:/opt/mailman/data/aliases alias_database = hash:/etc/aliases, hash:/opt/mailman/data/aliases message_size_limit = _OBFUSCATED_ initial_destination_concurrency = 20 queue_run_delay = _OBFUSCATED_ minimal_backoff_time = _OBFUSCATED_ default_destination_concurrency_limit = 80 unknown_local_recipient_reject_code = 550 owner_request_special = no transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp local_recipient_maps = proxy:unix:passwd.byname $alias_maps, hash:/opt/mailman/mm/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
/etc/mailman3/mailman.cfg (status: before changes suggested in
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/... ) (i will change [paths.local] to var_dir: /opt/mailman/mm/var)
[mailman] layout: local site_owner: _OBFUSCATED_ [database] class: mailman.database.mysql.MySQLDatabase url: mysql+pymysql://mailman:_OBFUSCATED_@localhost /mailman?charset=utf8mb4&use_unicode=1 [archiver.prototype] enable: yes [archiver.hyperkitty] class: mailman_hyperkitty.Archiver enable: yes configuration: /etc/mailman3/mailman-hyperkitty.cfg [shell] history_file: $var_dir/history.py [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 configuration: /etc/mailman3/postfix.cfg
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That file there is not documented in the officla HOWTO. What does it contain?
-- 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]

Am 02.05.25 um 10:37 schrieb Odhiambo Washington:
On Fri, May 2, 2025 at 11:23 AM Alexander Inzinger-Zrock < a.inzingerzrock@gmail.com> wrote:
/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no append_dot_mydomain = no readme_directory = no compatibility_level = 2 TLS parameters section _OBFUSCATED_ SMTP Auth Section _OBFUSCATED_ smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_non_fqdn_sender reject_unknown_sender_domain reject_unknown_recipient_domain mydomain = _OBFUSCATED_ smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = _OBFUSCATED_ myorigin = /etc/mailname mydestination = $myhostname, $mydomain, _OBFUSCATED_, localhost, _OBFUSCATED_ relayhost = _OBFUSCATED_ mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 129.27.2.197 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all alias_maps = hash:/etc/aliases, hash:/opt/mailman/data/aliases alias_database = hash:/etc/aliases, hash:/opt/mailman/data/aliases message_size_limit = _OBFUSCATED_ initial_destination_concurrency = 20 queue_run_delay = _OBFUSCATED_ minimal_backoff_time = _OBFUSCATED_ default_destination_concurrency_limit = 80 unknown_local_recipient_reject_code = 550 owner_request_special = no transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp local_recipient_maps = proxy:unix:passwd.byname $alias_maps, hash:/opt/mailman/mm/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
/etc/mailman3/mailman.cfg (status: before changes suggested in
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/... ) (i will change [paths.local] to var_dir: /opt/mailman/mm/var)
[mailman] layout: local site_owner: _OBFUSCATED_ [database] class: mailman.database.mysql.MySQLDatabase url: mysql+pymysql://mailman:_OBFUSCATED_@localhost /mailman?charset=utf8mb4&use_unicode=1 [archiver.prototype] enable: yes [archiver.hyperkitty] class: mailman_hyperkitty.Archiver enable: yes configuration: /etc/mailman3/mailman-hyperkitty.cfg [shell] history_file: $var_dir/history.py [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 configuration: /etc/mailman3/postfix.cfg
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That file there is not documented in the officla HOWTO. What does it contain?
we changed that during prior conversation [1] to make postmap command available to user 'mailman'
from configuration: python:mailman.config.postfix
to configuration: /etc/mailman3/postfix.cfg
and contents are
" postmap_command: /usr/sbin/postmap postmap_command: /usr/sbin/postmap
"
[1]
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...

On Fri, May 2, 2025 at 11:44 AM Alexander Inzinger-Zrock < a.inzingerzrock@gmail.com> wrote:
Am 02.05.25 um 10:37 schrieb Odhiambo Washington:
On Fri, May 2, 2025 at 11:23 AM Alexander Inzinger-Zrock < a.inzingerzrock@gmail.com> wrote:
/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no append_dot_mydomain = no readme_directory = no compatibility_level = 2 TLS parameters section _OBFUSCATED_ SMTP Auth Section _OBFUSCATED_ smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_non_fqdn_sender reject_unknown_sender_domain reject_unknown_recipient_domain mydomain = _OBFUSCATED_ smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = _OBFUSCATED_ myorigin = /etc/mailname mydestination = $myhostname, $mydomain, _OBFUSCATED_, localhost, _OBFUSCATED_ relayhost = _OBFUSCATED_ mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 129.27.2.197 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all alias_maps = hash:/etc/aliases, hash:/opt/mailman/data/aliases alias_database = hash:/etc/aliases, hash:/opt/mailman/data/aliases message_size_limit = _OBFUSCATED_ initial_destination_concurrency = 20 queue_run_delay = _OBFUSCATED_ minimal_backoff_time = _OBFUSCATED_ default_destination_concurrency_limit = 80 unknown_local_recipient_reject_code = 550 owner_request_special = no transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp local_recipient_maps = proxy:unix:passwd.byname $alias_maps, hash:/opt/mailman/mm/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
/etc/mailman3/mailman.cfg (status: before changes suggested in
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
) (i will change [paths.local] to var_dir: /opt/mailman/mm/var)
[mailman] layout: local site_owner: _OBFUSCATED_ [database] class: mailman.database.mysql.MySQLDatabase url: mysql+pymysql://mailman:_OBFUSCATED_@localhost /mailman?charset=utf8mb4&use_unicode=1 [archiver.prototype] enable: yes [archiver.hyperkitty] class: mailman_hyperkitty.Archiver enable: yes configuration: /etc/mailman3/mailman-hyperkitty.cfg [shell] history_file: $var_dir/history.py [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 configuration: /etc/mailman3/postfix.cfg
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That file there is not documented in the officla HOWTO. What does it contain?
we changed that during prior conversation [1] to make postmap command available to user 'mailman'
from configuration: python:mailman.config.postfix
to configuration: /etc/mailman3/postfix.cfg
and contents are
" postmap_command: /usr/sbin/postmap postmap_command: /usr/sbin/postmap
It seems I haven't been following this thread keenly since I suggested a clean reinstall.
-- 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 5/2/25 01:44, Alexander Inzinger-Zrock via Mailman-users wrote:
we changed that during prior conversation [1] to make postmap command available to user 'mailman'
from configuration: python:mailman.config.postfix
to configuration: /etc/mailman3/postfix.cfg
and contents are
" postmap_command: /usr/sbin/postmap postmap_command: /usr/sbin/postmap
"
This needs more than that. it needs a [postfix] section header and a definition for transport_file_type. E.g.
[postfix]
transport_file_type: hash
postmap_command: /usr/sbin/postmap
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Many lines removed from each file.
Alexander Inzinger-Zrock via Mailman-users writes:
/etc/postfix/main.cf smtpd_recipient_restrictions = reject_non_fqdn_recipient *> reject_non_fqdn_sender reject_unknown_sender_domain *> reject_unknown_recipient_domain smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated *> defer_unauth_destination mydestination = $myhostname, $mydomain, _OBFUSCATED_, localhost, *> _OBFUSCATED_
The lines above marked with a leading * are not valid main.cf syntax. I suspect that they are wrapped by either your MUA or perhaps in a conversion from HTML mail to plain text. You should be careful that quotations of configurations and code be formatted exactly as in the original file.
alias_maps = hash:/etc/aliases, hash:/opt/mailman/data/aliases alias_database = hash:/etc/aliases, hash:/opt/mailman/data/aliases
If /opt/mailman/data/aliases exists, what is in it? (If it doesn't exist I don't think it causes a problem, check Postfix logs.) This seems to be inconsistent with your /opt/mailman/mm/var/data setup, though.
transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp local_recipient_maps = proxy:unix:passwd.byname $alias_maps, *> hash:/opt/mailman/mm/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
The above should be OK as long as the * line is a misformatted continuation line for local_recipient_maps.
/etc/mailman3/mailman.cfg
I would add the
[paths.local] var_dir: /opt/mailman/mm/var
after the [mailman] section and before the [database] section.
[archiver.prototype] enable: yes
Note that the prototype archiver is pretty useless except as a backup of all the archived mail.
Everything else looks appropriate.
/etc/mailman3/settings.py
ALLOWED_HOSTS = [ "127.0.0.1", "_OBFUSCATED_", ] CSRF_TRUSTED_ORIGINS = [ "_OBFUSCATED_", ]
In the above you may want both the full domain name and the IP address.
SITE_ID = 2
The SITE_ID is probably OK, but correctly setting it is essential. When nothing seems to work right on the website, this is often the problem.
HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', 'PATH': '/opt/mailman/web/whoosh/fulltext_index', }, }
Whoosh is quite slow, and we recommend Xapian by default now. (It should work, it's just slow.)
Those all look OK.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

Alexander Inzinger-Zrock writes:
It seems i set both *facepalm* while doing [1] and then adding changes according to [2]:
It's OK to set both. But you need to coordinate "layout: LAYOUT" and "[paths.LAYOUT]" if you are going to set any paths such as var_dir.
so i have empty logs at /opt/mailman/mm/var/logs and populated log files under /var/tmp/mailman/logs
"var_dir: /var/tmp/mailman" is a good setting for experimenting with Mailman 3 before you're ready for production. But you don't want /var/tmp for production. Your logs and any queued messages will get deleted when the system reboots (for most system configurations).
Now - before changing the /etc/postfix/main.cfg - there is the question that brings us almost back to the start:
For the production system you want main.cf as it is, but change mailman.cfg to
[mailman] layout: local
[paths.local] var_dir: /opt/mailman/mm/var
For an experimental system where you don't care if stuff disappears on reboot, you can comment out the two lines for [paths.local], and change the prefix in the *_maps variables in main.cf from /opt/mailman/mm/var/ to /var/tmp/mailman/.
**what is the recommended place to put the files to?**
Wherever is convenient for you! There are four predefined "selectable layouts", paths.local, paths.dev, paths.here, and paths.fhs based on paths.master. paths.master defines the configurable names, and some more or less convenient defaults. In particular, it chooses a non-destructive (because temporary) var_dir: /var/tmp/mailman, and puts all of Mailman's data in a flat structure underneath.
paths.local is just an alias for paths.master (defined in schema.cfg). paths.dev and paths.here are aliases for paths.master with var_dir set relative to mailman.cfg and the current directory respectively (two configurations some developers find convenient). paths.fhs pretty much ignores paths.master (except that it must use the same directory names) to put the various components in places that conform to the Filesystem Hierarchy Standard (FHS), which makes Debian and Ubuntu packagers happy.
You can select any of those by using the "[mailman] layout" setting (I'm not sure if you can use "layout: master", but you're not supposed to). You can further modify them by using the "[paths.LAYOUT] SOME_dir" settings. In production, you almost certainly want either paths.fhs (as is) or paths.local with a var_dir setting either in /opt or in /var.
and that the above specific /opt/mailman -part is just a leftover
"/opt" is not a "leftover", it's a convention where the whole package, including programs and resources, is placed in its own hierarchy (like a macOS application). The "var_dir: /opt/mailman/mm/var" setup is a configuration that Mark Sapiro found convenient and continues to use.
I prefer a different layout, but if I were you I'd stick with layout: local, var_dir: /opt/mailman/mm/var because everybody who answers questions is familiar with it.
If my assumption is correct i would create an issue + merge-request for the docs.
No, the docs are generally fine. I'll check some details later.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

Am 29.04.25 um 18:27 schrieb Mark Sapiro:
Last idea before that would be to
- delete the files:
-rw-r--r-- 1 mailman mailman 0 Mar 21 11:58 postfix_domains -rw-r--r-- 1 mailman mailman 12K Mar 24 11:44 postfix_domains.db -rw-r--r-- 1 mailman mailman 0 Mar 21 11:58 postfix_lmtp -rw-r--r-- 1 mailman mailman 12K Mar 24 11:44 postfix_lmtp.db
restart services
test if programms make new files
report to mailinglist
Would that be of interest to someone?
Yes.
- [X] deactivate services
- mailman3.service
- mailmanweb.service
- postfix.service
- postfix@-.service
- [X] deleting files under /opt/mailman/mm/var/data
- postfix_domains
- postfix_domains.db
- postfix_lmtp
- postfix_lmtp.db
- [X] restart services
- mailman3.service
- mailmanweb.service
- postfix.service
- postfix@-.service
LEARNINGS:
- no new files made (expected).
- despite mailman3.service reports:
- 'Apr 30 14:37:40 mlist01-prod mailman[533171]: Generating MTA alias maps'
- postfix warns about the deleted files (expected):
Apr 30 14:41:02 mlist01-prod postfix/error[533928]: warning: hash:/opt/mailman/mm/var/data/postfix_domains is unavailable. open database /opt/mailman/mm/var/data/postfix_domains.db: No such file or directory
Apr 30 14:42:02 mlist01-prod postfix/error[533928]: warning: fast_flush_domains: hash:/opt/mailman/mm/var/data/postfix_domains: table lookup problem
Apr 30 14:42:02 mlist01-prod postfix/error[533928]: warning: C5B821C00E5: flush service failure

SUMMARY
[X] /etc/mailman3/postfix.cfg: checked, is:
[postfix] postmap_command: /usr/sbin/postmap transport_file_type: hash
I believe that to be a typo or copy+paste error - sorry.
[X] /etc/postfix/main.cf
- [X] /opt/mailman/data/aliases
If /opt/mailman/data/aliases exists, what is in it? (If it doesn't exist I don't think it causes a problem, check Postfix logs.)
Thanks for the hint. That was a mm2-config, removed it.
+ [X] *-syntax
Formatting error, i apologise.
- [X] /etc/mailman3/mailman.cfg
- [X] paths.local
I would add the
[paths.local] var_dir: /opt/mailman/mm/var
after the [mailman] section and before the [database] section.
Changed.
+ [X] deactivated archiver.prototype
```
[archiver.prototype]
enable: no
```
- [ ] /etc/mailman3/settings.py
[ ] add full Domain name and IP Adress to ALLOWED_HOSTS
For clarification: did you really meant domain name or host name (they sligthly differ)?
[X] SITE_ID = 2
This is correct, cause i deleted SITE_ID = 1 'example.com' and had to change that (see
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/N...).
Restarting, testing.
Conclusion:
Now i can create Threads via the webinterface and these get send.
also sending from postfix to mlist via eg
echo "This is a test post" | mail -s "Testing ML Delivery" testliste01@MY_DOMAIN
now reaches the mailman-instance.
also thanks to the hints during checking of the postfix/main.cf i was able to relay the mails for the user ''mailman'' that got delivered localy to an extern inbox via adding an entry in /etc/aliases.
Thank you all so much.
lg aiz
participants (5)
-
Alexander Inzinger-Zrock
-
Mark Sapiro
-
Odhiambo Washington
-
Stephen J. Turnbull
-
Stephen J. Turnbull