Postfix Hooks and Fetchmail
I'm using fetchmail to feed mailman3 and am having a problem with the postfix hooks. My list name is llllllllll@ddddddddd.net. However, fetchmail passes the email to lllllllllll@localhost. So I am getting this error in the mail log:
Out: 550 5.1.1 <llllllllll@localhost>: Recipient address rejected: User unknown in local recipient table
Is there something I need to add to mailman's recipient table, fetchmail or an alias in postfix?
On 11/13/25 08:33, dap1--- via Mailman-users wrote:
I'm using fetchmail to feed mailman3 and am having a problem with the postfix hooks. My list name is llllllllll@ddddddddd.net. However, fetchmail passes the email to lllllllllll@localhost. So I am getting this error in the mail log:
Out: 550 5.1.1 <llllllllll@localhost>: Recipient address rejected: User unknown in local recipient table
Is there something I need to add to mailman's recipient table, fetchmail or an alias in postfix?
You have probably configured Postfix per https://docs.mailman3.org/en/latest/install/virtualenv.html#setup-mta which is based on https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht....
The issue is the postfix_lmtp file referred to in transport_maps and local_recipient_maps only have addresses in the ddddddddd.net domain.
I think you can solve this by instead adding 'localhost' as an alias domain for the ddddddddd.net domain and configuring Postfix per https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht...
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I am not understanding the documentation. I already have this in my main.cf:
transport_maps = hash:/opt/mailman/var/data/postfix_lmtp local_recipient_maps = hash:/opt/mailman/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/var/data/postfix_domains
What is not explained is where/how to add the alias_domain parameter. Does it go in /opt/mailman/var/data/postfix_domains? Is it added as a new domain or as an append to the existing domain line?
On 11/13/25 10:25, dap1--- via Mailman-users wrote:
I am not understanding the documentation. I already have this in my main.cf:
transport_maps = hash:/opt/mailman/var/data/postfix_lmtp local_recipient_maps = hash:/opt/mailman/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/var/data/postfix_domains
What is not explained is where/how to add the alias_domain parameter. Does it go in /opt/mailman/var/data/postfix_domains? Is it added as a new domain or as an append to the existing domain line?
The doc says in part "In order to enable this configuration, Mailman
domains have an alias_domain attribute." In that sentence, domains is
a link. did you follow it?
In any case, the alias_domain is added to the existing ddddddddd.net entry at https://localhost/mailman3/domains/ or if you can't do that it is added to the domain table in the mailman database, e.g.
UPDATE domain SET alias_domain = 'localhost' WHERE mail_host = 'ddddddddd.net';
After doing that, run mailman aliases to update the postfix files in
/opt/mailman/mm/var/data including generating a new postfix_vmap file
As far as Postfix is concerned, I don't know what's unclear about https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht... but what you need to do is leave the current transport_maps and relay_domains as is, but add
virtual_alias_maps = hash:/opt/mailman/var/data/postfix_vmap
and as long as your list domain is only ddddddddd.net you can remove the local_recipient_maps setting, but see the note at the end of the https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht... section.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
No joy. Here is what I did. I did the mysql update per your instructions. I then created the file /opt/mailman/var/data/virtual_aliases:
mailman@localhost mailman
I ran postmap virtual_aliases then added:
virtual_alias_maps = hash:/opt/mailman/var/data/virtual_aliases
To /etc/postfix/main.cf.
Obviously I missed something but I don't know what.
I finally restarted postfix.
On 11/14/25 09:01, dap1--- via Mailman-users wrote:
No joy. Here is what I did. I did the mysql update per your instructions. I then created the file /opt/mailman/var/data/virtual_aliases:
mailman@localhost mailman
I ran postmap virtual_aliases then added:
virtual_alias_maps = hash:/opt/mailman/var/data/virtual_aliases
To /etc/postfix/main.cf.
I said
I think you can solve this by instead adding 'localhost' as an alias domain for the ddddddddd.net domain and configuring Postfix per https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht...
I now think that is wrong. I think you need to remove the alias domain from the domain table entry
UPDATE domain SET alias_domain = '' WHERE mail_host = 'ddddddddd.net';
And then run mailman aliases to update the postfix_* files in
/opt/mailman/var/data/ THIS STEP IS IMPORTANT
Then you can remove the /opt/mailman/var/data/postfix_vmap file that should have been created previously, and edit your /opt/mailman/var/data/virtual_aliases file with this content.
llllllllll@localhost llllllllll@ddddddddd.net llllllllll-bounces@localhost llllllllll-bounces@ddddddddd.net llllllllll-confirm@localhost llllllllll-confirm@ddddddddd.net llllllllll-join@localhost llllllllll-join@ddddddddd.net llllllllll-leave@localhost llllllllll-leave@ddddddddd.net llllllllll-owner@localhost llllllllll-owner@ddddddddd.net llllllllll-request@localhost llllllllll-request@ddddddddd.net llllllllll-subscribe@localhost llllllllll-subscribe@ddddddddd.net llllllllll-unsubscribe@localhost llllllllll-unsubscribe@ddddddddd.net
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I think I may have the aliases wrong based on what fetchmail is doing. Can I send you a PM with the unsanitized fetchmail info?
On 11/14/25 11:46, dap1--- via Mailman-users wrote:
I think I may have the aliases wrong based on what fetchmail is doing. Can I send you a PM with the unsanitized fetchmail info?
Yes. Also include the contents of the /opt/mailman/var/data/postfix_* files.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
dap1@bellsouth.net -
Mark Sapiro