Writing to list bounces with 'user doesn't exist'

Hi all,
So I have/had a working postfix+dovecot setup, and then I installed mailman2.
It largely works. The web interface works, I can create lists, list creation emails are sent to the admin (me), but trying to write to a list (as a member) fails with a bounce. My maillog shows:
May 12 12:19:48 hostname postfix/lmtp[83792]: ED07A32156:
to=<testlist@example.com>, relay=mx.example.com[private/dovecot-lmtp],
delay=0.6, delays=0.59/0/0/0.01, dsn=5.1.1, status=bounced (host
mx.example.com[private/dovecot-lmtp] said: 550 5.1.1
<testlist@example.com> User doesn't exist: testlist@example.com (in
reply to RCPT TO command))
Indeed I wouldn't expect dovecot to know any such user, so I'm not sure what step I've missed...
In my postfix main.cf I have:
mydomain = example.com
myhostname = mx.example.com
mydestination = $myhostname localhost.$mydomain localhost
myorigin = $mydomain
virtual_alias_maps = hash:/usr/local/etc/postfix/virtual-aliases,
hash:/usr/local/mailman/data/virtual-mailman
alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
In my mm_cfg.py I have:
MTA = "Postfix"
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['example.com']
DEFAULT_EMAIL_HOST = 'example.com'
DEFAULT_URL_HOST = 'mailman.example.com'
VIRTUAL_HOSTS.clear()
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
Any clues would be greatly appreciated.
Thanks,
Sean

Sean McBride writes:
So I have/had a working postfix+dovecot setup, and then I installed mailman2.
It sounds like you still have a working postfix+dovecot setup. :-)
Indeed I wouldn't expect dovecot to know any such user, so I'm not sure what step I've missed...
In my postfix main.cf I have:
Unfortunately, you've left out the critical information: dovecot routing. Clearly, dovecot has a relatively high-priority routing for local traffic, and it's sucking up everything addressed to your host before Mailman gets a whack at it. There are several possibilities, so it doesn't make sense for me to guess.
In my mm_cfg.py I have:
This isn't a problem yet. The fact that DEFAULT_EMAIL_HOST and $myorigin are not in $mydestination looks like a potential problem to me, but we'll deal with any issues here once you get mail into the pipes that go to Mailman.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

It sounds like you still have a working postfix+dovecot setup. :-)
Yes, I suppose so! But I keep poking at it so much, I worry :)
Indeed I wouldn't expect dovecot to know any such user, so I'm not sure what step I've missed...
In my postfix main.cf I have:
Unfortunately, you've left out the critical information: dovecot routing. Clearly, dovecot has a relatively high-priority routing for local traffic, and it's sucking up everything addressed to your host before Mailman gets a whack at it. There are several possibilities, so it doesn't make sense for me to guess.
Hmm, the dovecot-related settings in main.cf seem to be:
mailbox_transport = lmtp:unix:private/dovecot-lmtp
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain=$myhostname
smtpd_sender_login_maps =
hash:/usr/local/etc/postfix/smtpd_sender_login_maps.txt
virtual_transport = lmtp:unix:private/dovecot-lmtp
Do those give a clue?
Sean

On 2025-05-12 at 15:41:56 UTC-0400 (Mon, 12 May 2025 15:41:56 -0400) Sean McBride <sean@rogue-research.com> is rumored to have said:
It sounds like you still have a working postfix+dovecot setup. :-)
Yes, I suppose so! But I keep poking at it so much, I worry :)
Indeed I wouldn't expect dovecot to know any such user, so I'm not sure what step I've missed...
In my postfix main.cf I have:
Unfortunately, you've left out the critical information: dovecot routing. Clearly, dovecot has a relatively high-priority routing for local traffic, and it's sucking up everything addressed to your host before Mailman gets a whack at it. There are several possibilities, so it doesn't make sense for me to guess.
Hmm, the dovecot-related settings in main.cf seem to be:
mailbox_transport = lmtp:unix:private/dovecot-lmtp smtpd_sasl_auth_enable = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_local_domain=$myhostname smtpd_sender_login_maps = hash:/usr/local/etc/postfix/smtpd_sender_login_maps.txt virtual_transport = lmtp:unix:private/dovecot-smtp
Do those give a clue?
virtual_transport definitely looks wrong, but I can't tell you what it should be without full 'postconf -Mf' and 'postconf -nf' output and maybe more details about why you have a "dovecot-smtp" transport defined using lmtp at all.
E.g. On all my Mailman boxes with postfix "virtual_transport = virtual" but that's also the default, so presumably you've done something different.
-- Bill Cole bill@scconsult.com or billcole@apache.org (AKA @grumpybozo@toad.social and many *@billmail.scconsult.com addresses) Not Currently Available For Hire

On 5/12/25 12:41, Sean McBride wrote:
Hmm, the dovecot-related settings in main.cf seem to be:
mailbox_transport = lmtp:unix:private/dovecot-lmtp
This sends all local deliveries to dovecot before consulting aliases.
smtpd_sasl_auth_enable = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_local_domain=$myhostname smtpd_sender_login_maps = hash:/usr/local/etc/postfix/smtpd_sender_login_maps.txt virtual_transport = lmtp:unix:private/dovecot-lmtp
and this sends all virtual mailbox deliveries to dovecot. I'm not sure if this trumps virtual_alias_maps, but it doesn't matter because virtual_alias_maps will map a virtual alias list address to a local address in alias_maps and mailbox_transport will send that to dovecot.
I can't recall if there is a resolution to a MM 2.1 configuration with dovecot, but this search https://mail.python.org/archives/search?mlist=mailman-users%40python.org&q=dovecot may turn something up. I think the answer, if there is one, is to somehow configure dovecot to be aware of the mailman lists and route those addresses to mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 12 May 2025, at 14:18, Stephen J. Turnbull wrote:
This isn't a problem yet. The fact that DEFAULT_EMAIL_HOST and $myorigin are not in $mydestination looks like a potential problem to me, but we'll deal with any issues here once you get mail into the pipes that go to Mailman.
So I had myorigin = $mydomain
but upon further reading I'm thinking
it's probably better to have myorigin = $myhostname
(postfix's
default). I've changed that, so now $myorigin *is* in $mydestination
since $mydestination included $myhostname already.
But plain example.com
is not in $mydestination since there's a big
warning that virtual domains should not be listed there.
This didn't fix it though...
On 12 May 2025, at 16:50, Mark Sapiro wrote:
Hmm, the dovecot-related settings in main.cf seem to be:
mailbox_transport = lmtp:unix:private/dovecot-lmtp
This sends all local deliveries to dovecot before consulting aliases.
Indeed this was wrong. Looking in my notes/docs I don't understand why I set it like that. Must have been some experimentation with a previous issue.
This didn't fix it though...
At a certain point (been playing with this all day), I realized the
error message had changed, and that lead me to discover that having
reject_unverified_recipient
in smtpd_recipient_restrictions
was
blocking things; so I removed that.
This didn't fix it though...
But now my error message does not appear to involve dovecot, which seemed like progress:
May 13 18:03:03 myhostname postfix/local[27304]: E1F5730DF5:
to=<testlist@myhostname.example.com>, orig_to=<testlist@example.com>,
relay=local, delay=0.53, delays=0.51/0.01/0/0.01, dsn=5.1.1,
status=bounced (unknown user: "testlist")
I then hacked /usr/local/mailman/data/aliases
to add a mapping of:
testlist: sean@example.com
So I could see if this alias file was being consulted at all. I ran
postmap /usr/local/mailman/data/aliases
(sic). That output warnings
of record is in "key: value" format; is this an alias file?
. I should
have used postalias, not postmap! Reran with postalias, and now the
message is delivered! Removed that hack, reran postalias, and now all
is well! So probably one of my problems was that I mixed up postalias
and postmap with some previous experimentation and had a corrupt
/usr/local/mailman/data/aliases.db
.
Thanks to all for your help! You really helped me understand which settings I needed to investigate.
Sean

Sean McBride writes:
Hmm, the dovecot-related settings in main.cf seem to be:
There are two more settings that are possibly relevant: virtual_mailbox_domains and virtual_alias_domains. These:
smtpd_sasl_auth_enable = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_local_domain=$myhostname smtpd_sender_login_maps = hash:/usr/local/etc/postfix/smtpd_sender_login_maps.txt
aren't relevant to routing. These apply to all incoming connections that try to authenticate (when and why authentication happens in email is not something a sane person can think about without risking their sanity).
mailbox_transport = lmtp:unix:private/dovecot-lmtp virtual_transport = lmtp:unix:private/dovecot-lmtp
Do those give a clue?
Yes. Each of those unconditionally sends a whole class of mail to Dovecot. Which is used will depend on the settings of the virtual_*_domains variables. Both have *_maps versions, which allow setting precedence of transports. I *think* that setting those to
mailbox_transport_maps = hash:/usr/local/mailman/data/virtual-mailman lmtp:unix:private/dovecot-lmtp virtual_transport_maps = $mailbox_transport_maps
might work, although I'm not sure that the virtual-mailman alias format is compatible with transport_maps variables.
It is probably a bad idea (asking for future iterations of this issue) to have both mailbox_transport_maps and virtual_transport_maps set if you ever want to expand the kinds of virtual services you provide on your server (for example, forwarding messages for family and friends to Gmail). You should need only one, probably mailbox_transport_maps since both Dovecot and Mailman 2 are local recipients. (From the point of view of Postfix, Mailman 2 is a final delivery, and each post distributed outward is a message created and submitted by Mailman -- Postfix keeps no operational records of mail delivered to Mailman after Mailman accepts it.)
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

Do you actually have the alias for testlist@example.com in either of your aliases files (most probably should be /usr/local/mailman/data/aliases)? The only way postfix will know what to do with that address is via an alias directing it to call a MM function that posts the message to the list. Despite my better judgement, I’m still on v2 & such an entry looks like:
testlist: “|/path_to_mailman/mail/mailman post testlist”
Been *many* years, but IIRC the docs note how to set those up properly & it was a manual process (but once you have the set for one list, copy/pasta + a little search/replace will get you the rest).
-Guy
On 2025 May 12, at 10:08, Sean McBride <sean@rogue-research.com> wrote:
Hi all,
So I have/had a working postfix+dovecot setup, and then I installed mailman2.
It largely works. The web interface works, I can create lists, list creation emails are sent to the admin (me), but trying to write to a list (as a member) fails with a bounce. My maillog shows:
May 12 12:19:48 hostname postfix/lmtp[83792]: ED07A32156: to=<testlist@example.com>, relay=mx.example.com[private/dovecot-lmtp], delay=0.6, delays=0.59/0/0/0.01, dsn=5.1.1, status=bounced (host mx.example.com[private/dovecot-lmtp] said: 550 5.1.1 <testlist@example.com> User doesn't exist: testlist@example.com (in reply to RCPT TO command))
Indeed I wouldn't expect dovecot to know any such user, so I'm not sure what step I've missed...
In my postfix main.cf I have:
mydomain = example.com myhostname = mx.example.com mydestination = $myhostname localhost.$mydomain localhost myorigin = $mydomain virtual_alias_maps = hash:/usr/local/etc/postfix/virtual-aliases, hash:/usr/local/mailman/data/virtual-mailman alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
In my mm_cfg.py I have:
MTA = "Postfix" POSTFIX_STYLE_VIRTUAL_DOMAINS = ['example.com'] DEFAULT_EMAIL_HOST = 'example.com' DEFAULT_URL_HOST = 'mailman.example.com' VIRTUAL_HOSTS.clear() add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
Any clues would be greatly appreciated.
Thanks,
Sean
Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send an email to mailman-users-leave@python.org https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/ Member address: guy@extragalactic.net

Guy,
Thanks for your reply.
In /usr/local/mailman/data/virtual-mailman I have entries like:
test9@example.com test9 test9-admin@example.com test9-admin
and in /usr/local/mailman/data/aliases I have entries like:
test9: "|/usr/local/mailman/mail/mailman post test9" test9-admin: "|/usr/local/mailman/mail/mailman admin test9"
I believe I'm pointing to both those files with virtual_alias_maps and alias_maps as quoted below.
Thanks,
Sean
On 12 May 2025, at 20:05, Guy B. Purcell wrote:
Do you actually have the alias for testlist@example.com in either of your aliases files (most probably should be /usr/local/mailman/data/aliases)? The only way postfix will know what to do with that address is via an alias directing it to call a MM function that posts the message to the list. Despite my better judgement, I’m still on v2 & such an entry looks like:
testlist: “|/path_to_mailman/mail/mailman post testlist”
Been *many* years, but IIRC the docs note how to set those up properly & it was a manual process (but once you have the set for one list, copy/pasta + a little search/replace will get you the rest).
-Guy
On 2025 May 12, at 10:08, Sean McBride <sean@rogue-research.com> wrote:
Hi all,
So I have/had a working postfix+dovecot setup, and then I installed mailman2.
It largely works. The web interface works, I can create lists, list creation emails are sent to the admin (me), but trying to write to a list (as a member) fails with a bounce. My maillog shows:
May 12 12:19:48 hostname postfix/lmtp[83792]: ED07A32156: to=<testlist@example.com>, relay=mx.example.com[private/dovecot-lmtp], delay=0.6, delays=0.59/0/0/0.01, dsn=5.1.1, status=bounced (host mx.example.com[private/dovecot-lmtp] said: 550 5.1.1 <testlist@example.com> User doesn't exist: testlist@example.com (in reply to RCPT TO command))
Indeed I wouldn't expect dovecot to know any such user, so I'm not sure what step I've missed...
In my postfix main.cf I have:
mydomain = example.com myhostname = mx.example.com mydestination = $myhostname localhost.$mydomain localhost myorigin = $mydomain virtual_alias_maps = hash:/usr/local/etc/postfix/virtual-aliases, hash:/usr/local/mailman/data/virtual-mailman alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
In my mm_cfg.py I have:
MTA = "Postfix" POSTFIX_STYLE_VIRTUAL_DOMAINS = ['example.com'] DEFAULT_EMAIL_HOST = 'example.com' DEFAULT_URL_HOST = 'mailman.example.com' VIRTUAL_HOSTS.clear() add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
Any clues would be greatly appreciated.
Thanks,
Sean
Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send an email to mailman-users-leave@python.org https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/ Member address: guy@extragalactic.net
participants (5)
-
Bill Cole
-
Guy B. Purcell
-
Mark Sapiro
-
Sean McBride
-
Stephen J. Turnbull