Postfix & Mailman not playing well together
![](https://secure.gravatar.com/avatar/d296f9354ba360c36edcf2fe90977985.jpg?s=120&d=mm&r=g)
Good morning all!
I'm hoping you guys might be able to help me figure out what's going on with my mailman setup.
I'm running 2.1.13 on a Ubuntu 10 installation. I'm running postfix as my MTA. I've set up postfix as instructed on the list.org documentation. I'm running into a problem that I can't seem to get my head around.
When I e-mail the list, I get a bounce with the following information:
This is the mail system at host hotdog.mikesoh.com.
I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can delete your own text from the attached returned message.
The mail system
<"|/var/lib/mailman/mail/ mailman post somelist"@mikesoh.com> (expanded from <somelist@lists.mikesoh.com <epicfail@lists.mikesoh.com>>): User unknown in virtual alias table
Final-Recipient: rfc822; "|/var/lib/mailman/mail/mailman post somelist"@ mikesoh.com Original-Recipient: rfc822;somelist@lists.mikesoh.com<rfc822%3Bepicfail@lists.mikesoh.com> Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; User unknown in virtual alias table
The weird part is the command that I've highlighted in green. For some reason, postfix or mailman (I haven't been able to determine which one) is appending "@mikesoh.com" to the command. When I run the command exactly within a terminal, it says no such list exists. However, if I only run the command within the quotes, it runs correctly.
I can't seem to figure out why this is. I've posted my postfix config on a pastebin: http://paste.ubuntu.com/610641/
Can anyone offer me a clue?
Thanks!
Mike
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Michael Soh wrote:
When I e-mail the list, I get a bounce with the following information:
This is the mail system at host hotdog.mikesoh.com.
I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can delete your own text from the attached returned message.
The mail system
<"|/var/lib/mailman/mail/ mailman post somelist"@mikesoh.com> (expanded from <somelist@lists.mikesoh.com <epicfail@lists.mikesoh.com>>): User unknown in virtual alias table
[...]
The weird part is the command that I've highlighted in green.
Don't assume that your HTML markup will pass through a list's content filtering.
For some reason, postfix or mailman (I haven't been able to determine which one) is appending "@mikesoh.com" to the command.
The problem is that mail to the lists.mikesoh.com domain is delivered by a relay other than Postfix's 'local' delivery and that relay doesn't understand 'pipe' delivery so the string "|/var/lib/mailman/mail/mailman post somelist" in the alias is interpreted as a 'local' address rather than a pipe and thus gets appended with $mydomain.
When I run the command exactly
within a terminal, it says no such list exists. However, if I only run the command within the quotes, it runs correctly.
Right, and if Postfix is using the 'local' relay for this domain, it will run the correct command too.
I can't seem to figure out why this is. I've posted my postfix config on a pastebin: http://paste.ubuntu.com/610641/
If you want someone to actually look at your Postfix configuration, paste the output from 'postconf -n' rather than the entire 643 line 'postconf' configuration.
Can anyone offer me a clue?
In addition to the above clues, look in the Postfix log (maillog) to see what 'relay' is being used for this mail and figure out why it is what it is rather than 'local'. This may require looking at transport_maps and/or master.cf.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/d296f9354ba360c36edcf2fe90977985.jpg?s=120&d=mm&r=g)
Thanks so much for your clues. I've replied in-line
On Sat, May 21, 2011 at 1:12 AM, Mark Sapiro <mark@msapiro.net> wrote:
Don't assume that your HTML markup will pass through a list's content filtering.
Noted.
The problem is that mail to the lists.mikesoh.com domain is delivered by a relay other than Postfix's 'local' delivery and that relay doesn't understand 'pipe' delivery so the string "|/var/lib/mailman/mail/mailman post somelist" in the alias is interpreted as a 'local' address rather than a pipe and thus gets appended with $mydomain.
Right, and if Postfix is using the 'local' relay for this domain, it will run the correct command too.
So how do I get Postfix to correctly run the command?
I can't seem to figure out why this is. I've posted my postfix config on a
pastebin: http://paste.ubuntu.com/610641/
If you want someone to actually look at your Postfix configuration, paste the output from 'postconf -n' rather than the entire 643 line 'postconf' configuration.
http://paste.ubuntu.com/611943/
In addition to the above clues, look in the Postfix log (maillog) to
see what 'relay' is being used for this mail and figure out why it is what it is rather than 'local'. This may require looking at transport_maps and/or master.cf.
Here is the output from the mail.log:
May 19 15:18:45 hotdog postfix/smtpd[9652]: 957453430E4B: client= mail-ey0-f179.google.com[209.85.215.179] May 19 15:18:45 hotdog postfix/cleanup[23878]: 957453430E4B: message-id=< BANLkTikskn_wNtvGjbKypcq7gNbBUAUfuQ@mail.gmail.com> May 19 15:18:46 hotdog postfix/qmgr[5173]: 957453430E4B: from=< michael.c.soh@gmail.com>, size=1994, nrcpt=1 (queue active) May 19 15:18:46 hotdog postfix/error[28625]: 957453430E4B: to=<|/var/lib/mailman/mail/mailman post epicfail@mikesoh.com>, orig_to=< epicfail@lists.mikesoh.com>, relay=none, delay=1, delays=0.9/0.07/0/0.05, dsn=5.0.0, status=bounced (User unknown in virtual alias table) May 19 15:18:46 hotdog postfix/cleanup[23878]: 47DAA3430E51: message-id=< 20110519191846.47DAA3430E51@hotdog.mikesoh.com> May 19 15:18:46 hotdog postfix/bounce[30003]: 957453430E4B: sender non-delivery notification: 47DAA3430E51 May 19 15:18:46 hotdog postfix/qmgr[5173]: 47DAA3430E51: from=<>, size=3968, nrcpt=1 (queue active)
And here is my master.cf: http://paste.ubuntu.com/611944/
Thanks again for the help!
![](https://secure.gravatar.com/avatar/d296f9354ba360c36edcf2fe90977985.jpg?s=120&d=mm&r=g)
Sorry my master.cf paste was incomplete: http://paste.ubuntu.com/611947/
On Mon, May 23, 2011 at 1:17 PM, Michael Soh <michael.c.soh@gmail.com>wrote:
Thanks so much for your clues. I've replied in-line
On Sat, May 21, 2011 at 1:12 AM, Mark Sapiro <mark@msapiro.net> wrote:
Don't assume that your HTML markup will pass through a list's content filtering.
Noted.
The problem is that mail to the lists.mikesoh.com domain is delivered by a relay other than Postfix's 'local' delivery and that relay doesn't understand 'pipe' delivery so the string "|/var/lib/mailman/mail/mailman post somelist" in the alias is interpreted as a 'local' address rather than a pipe and thus gets appended with $mydomain.
Right, and if Postfix is using the 'local' relay for this domain, it
will run the correct command too.
So how do I get Postfix to correctly run the command?
I can't seem to figure out why this is. I've posted my postfix config on a
pastebin: http://paste.ubuntu.com/610641/
If you want someone to actually look at your Postfix configuration, paste the output from 'postconf -n' rather than the entire 643 line 'postconf' configuration.
http://paste.ubuntu.com/611943/
In addition to the above clues, look in the Postfix log (maillog) to
see what 'relay' is being used for this mail and figure out why it is what it is rather than 'local'. This may require looking at transport_maps and/or master.cf.
Here is the output from the mail.log:
May 19 15:18:45 hotdog postfix/smtpd[9652]: 957453430E4B: client= mail-ey0-f179.google.com[209.85.215.179] May 19 15:18:45 hotdog postfix/cleanup[23878]: 957453430E4B: message-id=< BANLkTikskn_wNtvGjbKypcq7gNbBUAUfuQ@mail.gmail.com> May 19 15:18:46 hotdog postfix/qmgr[5173]: 957453430E4B: from=< michael.c.soh@gmail.com>, size=1994, nrcpt=1 (queue active) May 19 15:18:46 hotdog postfix/error[28625]: 957453430E4B: to=<|/var/lib/mailman/mail/mailman post epicfail@mikesoh.com>, orig_to=< epicfail@lists.mikesoh.com>, relay=none, delay=1, delays=0.9/0.07/0/0.05, dsn=5.0.0, status=bounced (User unknown in virtual alias table) May 19 15:18:46 hotdog postfix/cleanup[23878]: 47DAA3430E51: message-id=< 20110519191846.47DAA3430E51@hotdog.mikesoh.com> May 19 15:18:46 hotdog postfix/bounce[30003]: 957453430E4B: sender non-delivery notification: 47DAA3430E51 May 19 15:18:46 hotdog postfix/qmgr[5173]: 47DAA3430E51: from=<>, size=3968, nrcpt=1 (queue active)
And here is my master.cf: http://paste.ubuntu.com/611944/
Thanks again for the help!
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 5/23/2011 10:17 AM, Michael Soh wrote:
On Sat, May 21, 2011 at 1:12 AM, Mark Sapiro <mark@msapiro.net> wrote:
If you want someone to actually look at your Postfix configuration, paste the output from 'postconf -n' rather than the entire 643 line 'postconf' configuration.
I think Geoff Shang's reply (at <http://mail.python.org/pipermail/mailman-users/2011-May/071602.html> - only one of the problems of posting as a non-subscriber) was on target.
hash:/var/lib/mailman/data/aliases does not belong in
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, hash:/var/lib/mailman/data/aliases, mysql:/etc/postfix/virtual/aliases.cf
It should be
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, mysql:/etc/postfix/virtual/aliases.cf
hash:/var/lib/mailman/data/aliases should only be in alias_maps as it is.
Fix that and see if that fixes the problem.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/d296f9354ba360c36edcf2fe90977985.jpg?s=120&d=mm&r=g)
Thanks Mark and Geoff for your help. The fix did work. However, now trying to use mailman in my virtual domain is proving problematic.
I removed the previous epicfail@lists.mikesoh.com and created epicfail@linuslive.com. The output of the maillog is: May 23 14:06:34 hotdog postfix/smtpd[11643]: connect from mail-ey0-f181.google.com[209.85.215.181] May 23 14:06:34 hotdog postfix/smtpd[11643]: setting up TLS connection from mail-ey0-f181.google.com[209.85.215.181] May 23 14:06:34 hotdog postfix/smtpd[11643]: Anonymous TLS connection established from mail-ey0-f181.google.com[209.85.215.181]: TLSv1 with cipher RC4-SHA (128/128 bits) May 23 14:06:34 hotdog postfix/smtpd[11643]: D897D518820E: client= mail-ey0-f181.google.com[209.85.215.181] May 23 14:06:35 hotdog postfix/cleanup[21957]: D897D518820E: message-id=< BANLkTikH5QC7-yQcVa8VvyyjXX2+kWcc+w@mail.gmail.com> May 23 14:06:35 hotdog postfix/qmgr[24277]: D897D518820E: from=< michael.c.soh@gmail.com>, size=1996, nrcpt=1 (queue active) May 23 14:06:35 hotdog postfix/error[24526]: D897D518820E: to=< epicfail@mikesoh.com>, orig_to=<epicfail@linuslive.com>, relay=none, delay=0.73, delays=0.53/0.04/0/0.16, dsn=5.0.0, status=bounced (User unknown in virtual alias table) May 23 14:06:35 hotdog postfix/cleanup[21957]: 78F51518820F: message-id=< 20110523180635.78F51518820F@hotdog.mikesoh.com> May 23 14:06:35 hotdog postfix/bounce[25719]: D897D518820E: sender non-delivery notification: 78F51518820F May 23 14:06:35 hotdog postfix/qmgr[24277]: 78F51518820F: from=<>, size=3886, nrcpt=1 (queue active) May 23 14:06:35 hotdog postfix/qmgr[24277]: D897D518820E: removed May 23 14:06:48 hotdog postfix/smtp[28082]: 78F51518820F: to=< michael.c.soh@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.67.27]:25, delay=13, delays=0.09/0.01/4.4/8.7, dsn=2.0.0, status=sent (250 2.0.0 OK 1306174008 k11si7074639yba.80) May 23 14:06:49 hotdog postfix/qmgr[24277]: 78F51518820F: removed May 23 14:07:05 hotdog postfix/smtpd[11643]: disconnect from mail-ey0-f181.google.com[209.85.215.181]
I did remember to reload postfix after creating the list. No other changes to postfix have been made.
On Mon, May 23, 2011 at 1:44 PM, Mark Sapiro <mark@msapiro.net> wrote:
On 5/23/2011 10:17 AM, Michael Soh wrote:
On Sat, May 21, 2011 at 1:12 AM, Mark Sapiro <mark@msapiro.net> wrote:
If you want someone to actually look at your Postfix configuration, paste the output from 'postconf -n' rather than the entire 643 line 'postconf' configuration.
I think Geoff Shang's reply (at <http://mail.python.org/pipermail/mailman-users/2011-May/071602.html> - only one of the problems of posting as a non-subscriber) was on target.
hash:/var/lib/mailman/data/aliases does not belong in
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, hash:/var/lib/mailman/data/aliases, mysql:/etc/postfix/virtual/aliases.cf
It should be
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, mysql:/etc/postfix/virtual/aliases.cf
hash:/var/lib/mailman/data/aliases should only be in alias_maps as it is.
Fix that and see if that fixes the problem.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Michael Soh wrote:
Thanks Mark and Geoff for your help. The fix did work. However, now trying to use mailman in my virtual domain is proving problematic.
I removed the previous epicfail@lists.mikesoh.com and created epicfail@linuslive.com. The output of the maillog is:
[...]
May 23 14:06:35 hotdog postfix/qmgr[24277]: D897D518820E: from=< michael.c.soh@gmail.com>, size=1996, nrcpt=1 (queue active) May 23 14:06:35 hotdog postfix/error[24526]: D897D518820E: to=< epicfail@mikesoh.com>, orig_to=<epicfail@linuslive.com>, relay=none, delay=0.73, delays=0.53/0.04/0/0.16, dsn=5.0.0, status=bounced (User unknown in virtual alias table) [...]
What's in mm_cfg.py?
In particular, is 'linuslive.com' in POSTFIX_STYLE_VIRTUAL_DOMAINS and in an add_virtualhost() directive.
Is the host_name attribute on the lists admin General Options page linuslive.com?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
Michael Soh wrote:
Thanks Mark and Geoff for your help. The fix did work. However, now trying to use mailman in my virtual domain is proving problematic.
I removed the previous epicfail@lists.mikesoh.com and created epicfail@linuslive.com. The output of the maillog is:
[...]
May 23 14:06:35 hotdog postfix/qmgr[24277]: D897D518820E: from=< michael.c.soh@gmail.com>, size=1996, nrcpt=1 (queue active) May 23 14:06:35 hotdog postfix/error[24526]: D897D518820E: to=< epicfail@mikesoh.com>, orig_to=<epicfail@linuslive.com>, relay=none, delay=0.73, delays=0.53/0.04/0/0.16, dsn=5.0.0, status=bounced (User unknown in virtual alias table) [...]
What's in mm_cfg.py?
In particular, is 'linuslive.com' in POSTFIX_STYLE_VIRTUAL_DOMAINS and in an add_virtualhost() directive.
On closer inspection, Those aren't the appropriate questions. It appears the problem may be in Postfix.
It looks like epicfail@linuslive.com is being mapped to epicfail@mikesoh.com by virtual_alias_maps, but mikesoh.com is in turn a virtual domain (i.e. in virtual_alias_domains).
It looks like mydomain is set to mikesoh.com because it defaults myhostname with the first component removed. You either want to set mydomain explicitly to some domain in mydestination or if your Mailman is recent enought to support it, set
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost'
in mm_cfg.py and run Mailman's bin/genaliases to rebuild virtual-mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/d296f9354ba360c36edcf2fe90977985.jpg?s=120&d=mm&r=g)
On Mon, May 23, 2011 at 2:41 PM, Mark Sapiro <mark@msapiro.net> wrote:
It looks like epicfail@linuslive.com is being mapped to epicfail@mikesoh.com by virtual_alias_maps, but mikesoh.com is in turn a virtual domain (i.e. in virtual_alias_domains).
Yes, this is correct. I have a lot of e-mail addresses and it's just easier to virtualize the entire domain (hence the mysql hook).
It looks like mydomain is set to mikesoh.com because it defaults myhostname with the first component removed. You either want to set mydomain explicitly to some domain in mydestination or if your Mailman is recent enought to support it, set
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost'
in mm_cfg.py and run Mailman's bin/genaliases to rebuild virtual-mailman.
I've tried putting in the variable in mm_cfg.py to no avail. Still the same results. I've also tried setting mydomain to a destination ( hotdog.mikesoh.com) and that didn't work either. And tried the default (localdomain) and that failed as well.
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Michael Soh wrote:
On Mon, May 23, 2011 at 2:41 PM, Mark Sapiro <mark@msapiro.net> wrote:
It looks like epicfail@linuslive.com is being mapped to epicfail@mikesoh.com by virtual_alias_maps, but mikesoh.com is in turn a virtual domain (i.e. in virtual_alias_domains).
Yes, this is correct. I have a lot of e-mail addresses and it's just easier to virtualize the entire domain (hence the mysql hook).
It looks like mydomain is set to mikesoh.com because it defaults myhostname with the first component removed. You either want to set mydomain explicitly to some domain in mydestination or if your Mailman is recent enought to support it, set
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost'
in mm_cfg.py and run Mailman's bin/genaliases to rebuild virtual-mailman.
I've tried putting in the variable in mm_cfg.py to no avail. Still the same results.
Did you run Mailman's bin/genaliases after changing mm_cfg.py?
What Mailman version is this?
What's in data/virtual-mailman? Do the 'to' addresses have @localhost appended. If not, you can append it manually and there are ways to automate this.
I've also tried setting mydomain to a destination ( hotdog.mikesoh.com) and that didn't work either.
What were the postfix log messages in that case?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/d296f9354ba360c36edcf2fe90977985.jpg?s=120&d=mm&r=g)
On Mon, May 23, 2011 at 2:23 PM, Mark Sapiro <mark@msapiro.net> wrote:
What's in mm_cfg.py?
In particular, is 'linuslive.com' in POSTFIX_STYLE_VIRTUAL_DOMAINS and in an add_virtualhost() directive.
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['linuslive.com', 'mikesoh.com']
And it looks like there isn't anything listed in the add_virtualhost() outside of the default. Modifying these settings weren't in the documentation.
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
I'm assuming then I'll have to add the following lines: add_virtualhost(DEFAULT_URL_HOST, 'mikesoh.com') add_virtualhost(DEFAULT_URL_HOST, 'linuslive.com')
Is the host_name attribute on the lists admin General Options page linuslive.com?
Yes.
![](https://secure.gravatar.com/avatar/8381104a4d879780b22b7a0c595641c2.jpg?s=120&d=mm&r=g)
On Mon, 23 May 2011, Mark Sapiro wrote:
I think Geoff Shang's reply (at <http://mail.python.org/pipermail/mailman-users/2011-May/071602.html> - only one of the problems of posting as a non-subscriber) was on target.
Sorry, I didn't realise this list accepted non-member posts.
Geoff.
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Geoff Shang wrote:
On Mon, 23 May 2011, Mark Sapiro wrote:
I think Geoff Shang's reply (at <http://mail.python.org/pipermail/mailman-users/2011-May/071602.html> - only one of the problems of posting as a non-subscriber) was on target.
Sorry, I didn't realise this list accepted non-member posts.
In theory it doesn't, but exceptions are made more often than not. In any case, you (Geoff) did nothing wrong. It is or should be up to the non-member poster to check the archives for replies not explicitly addressed to the poster.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/8381104a4d879780b22b7a0c595641c2.jpg?s=120&d=mm&r=g)
On Fri, 20 May 2011, Michael Soh wrote:
<"|/var/lib/mailman/mail/ mailman post somelist"@mikesoh.com> (expanded from <somelist@lists.mikesoh.com <epicfail@lists.mikesoh.com>>): User unknown in virtual alias table
I'm not a Postfix expert, but the following entry in your configuration file is problematic:
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, hash:/var/lib/mailman/data/aliases, mysql:/etc/postfix/virtual/aliases.cf
I can't comment on your database setup, but your Mailman aliases should not be here, they should be in alias_maps. And in fact they are also. So I'm sure this doesn't help your situation.
Geoff.
participants (3)
-
Geoff Shang
-
Mark Sapiro
-
Michael Soh