again postfix+aliases+virtual_domains

Hi, all
After reading kilometers of posts looks like that subject is a stone of stumble when integratnig mailman with postfix. But, please, dont scold at me, because I really don
nt get how to glue together my working postfix with virtual domains and one single mailman list.
system info: archlinux, postfix 2.9.4, kernel 3.6.9 x64, mailman 2.1.15
<code> $ postconf|grep alias alias_database = $alias_maps alias_maps = hash:/var/lib/mailman/data/aliases, hash:/etc/postfix/aliases allow_mail_to_commands = alias, forward, include allow_mail_to_files = alias, forward, include expand_owner_alias = no local_recipient_maps = proxy:unix:passwd.byname $alias_maps newaliases_path = /usr/bin/newaliases proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $sender_bcc_maps $recipient_bcc_maps $smtp_generic_maps $lmtp_generic_maps $alias_maps reset_owner_alias = no unknown_virtual_alias_reject_code = 550 virtual_alias_domains = $virtual_alias_maps virtual_alias_expansion_limit = 1000 virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_alias_recursion_limit = 1000 </code>
<code> # mm_cfg.py MTA = 'Postfix' DEFAULT_EMAIL_HOST = 'my-domain.com.ua' DEFAULT_URL_HOST = 'mail2.my-domain.com.ua' DEFAULT_URL_PATTERN = 'http://mail2.my-domain.com.ua/mylist/'
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['my-domain.com.ua'] VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'my-domain.com.ua' add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) </code>
All aliases files was generated by genaliases, and I did`nt modified them. All of them are under the mailman.mailman user rights =rw----.
<code> ## /var/lib/mailman/data/aliases # The ultimate loop stopper address mylist-loop: /var/lib/mailman/data/owner-bounces.mbox
# STANZA START: mylist # CREATED: Sun Dec 16 16:53:24 2012 mylist: /var/lib/mailman/qfiles/maildir/ mylist-admin: /var/lib/mailman/qfiles/maildir/ mylist-bounces: /var/lib/mailman/qfiles/maildir/ mylist-confirm: /var/lib/mailman/qfiles/maildir/ mylist-join: /var/lib/mailman/qfiles/maildir/ mylist-leave: /var/lib/mailman/qfiles/maildir/ mylist-owner: /var/lib/mailman/qfiles/maildir/ mylist-request: /var/lib/mailman/qfiles/maildir/ mylist-subscribe: /var/lib/mailman/qfiles/maildir/ mylist-unsubscribe: /var/lib/mailman/qfiles/maildir/ # STANZA END: mylist </code>
<code> ## /var/lib/mailman/data/virtual-mailman # LOOP ADDRESSES START mylist-loop@my-domain.com.ua mylist-loop@my-domain.com.ua # LOOP ADDRESSES END
# STANZA START: mylist # CREATED: Sun Dec 16 16:53:24 2012 mylist@my-domain.com.ua mylist@my-domain.com.ua mylist-admin@my-domain.com.ua mylist-admin@my-domain.com.ua mylist-bounces@my-domain.com.ua mylist-bounces@my-domain.com.ua mylist-confirm@my-domain.com.ua mylist-confirm@my-domain.com.ua mylist-join@my-domain.com.ua mylist-join@my-domain.com.ua mylist-leave@my-domain.com.ua mylist-leave@my-domain.com.ua mylist-owner@my-domain.com.ua mylist-owner@my-domain.com.ua mylist-request@my-domain.com.ua mylist-request@my-domain.com.ua mylist-subscribe@my-domain.com.ua mylist-subscribe@my-domain.com.ua mylist-unsubscribe@my-domain.com.ua mylist-unsubscribe@my-domain.com.ua # STANZA END: mylist </code>
Also I`ve added that to /etc/postfix/aliases, even I think this is not important now.
<code> ## /etc/postfix/aliases part ## mailman mailing list mailman: "|/usr/lib/mailman/mail/mailman post mailman" mailman-admin: "|/usr/lib/mailman/mail/mailman admin mailman" mailman-bounces: "|/usr/lib/mailman/mail/mailman bounces mailman" mailman-confirm: "|/usr/lib/mailman/mail/mailman confirm mailman" mailman-join: "|/usr/lib/mailman/mail/mailman join mailman" mailman-leave: "|/usr/lib/mailman/mail/mailman leave mailman" mailman-owner: "|/usr/lib/mailman/mail/mailman owner mailman" mailman-request: "|/usr/lib/mailman/mail/mailman request mailman" mailman-subscribe: "|/usr/lib/mailman/mail/mailman subscribe mailman" mailman-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe mailman" </code>
root # echo "test" | mail mylist@my-domain.com.ua
causes error:
Dec 16 16:53:30 kserv postfix/qmgr[11704]: 33204999DE: from=<root@mail.my-domain.com.ua>, size=450, nrcpt=1 (queue active)
Dec 16 16:53:30 kserv postfix/virtual[11714]: 33204999DE: to=<mylist@my-domain.com.ua>, relay=virtual, delay=0.24, delays=0.17/0.01/0/0.07, dsn=5.1.1, status=bounced (unknown user: "mylist@my-domain.com.ua")
Dec 16 16:53:30 kserv postfix/cleanup[11709]: 5D0ADBB245: message-id=<20121216145330.5D0ADBB245@mail.my-domain.com.ua>
Please help! Any glue, please!
//Dimitri

On 12/16/2012 7:20 AM, ДП wrote:
Sigh... where to start ...
First of all, when trying to communicate Postfix configurations,
unedited, full output from postconf -n
with possible munging of domain
names (only if done consistently) is almost always preferable.
DEFAULT_URL_PATTERN gets interpolated with the host name and the listname gets appended, so if you want to drop the '/mailman' from Mailman URLs, set
DEFAULT_URL_PATTERN = 'http://%s/'
Otherwise, the setting in Defaults.py
DEFAULT_URL_PATTERN = 'http://%s/mailman/'
should be fine without any mm_cfg.py override.
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['my-domain.com.ua'] VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'my-domain.com.ua'
The above is clearly wrong. Either 'my-domain.com.ua' is a virtual domain in Postfix or it is a local domain. If it is a local domain, you don't want either of the above two lines and you don't want 'hash:/var/lib/mailman/data/virtuailman' in Postfix virtual_alias_maps.
If ti is a virtual domain in Postfix, you absolutely don't want
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'my-domain.com.ua'
as that will map the virtual address mylist@my-domain.com.ua to the supposedly local address mylist@my-domain.com.ua, which at best is a loop. Normally, setting VIRTUAL_MAILMAN_LOCAL_DOMAIN in mm_cfg.py is not required, but if it is set, it needs to be set to one of the domains in Postfix my_destination, e.g. 'localhost'.
Something is very wrong here. The above aliases indicate you have set
USE_MAILDIR = Yes
but I don't see that in mm_cfg.py above. In any case, maildir delivery to Mailman is experimental, as far as I know no one uses it, and it also requires that MaildirRunner be enabled. See the documentation in Defaults.py.
Here we see the mappings I mentioned above. The 'virtual' addresses are mapped to themselves which can't work.
It makes a difference. Mailman's aliases should be in /var/lib/mailman/data/aliases(.db) because the owner of the .db file in which the alias is found determines the user under which Postfix delivers the mail.
Probably because of the incorrect mapping in data/virtual-mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Dec 16, 2012, at 1:17 PM, ДП <aspamkiller@yandex.ru> wrote:
Giving us main.cf is NOT the same as postconf -n output. Main.cf shows us how you THINK the system is configured. Postconf -n shows us how the system is ACTUALLY configured.
Requiring postconf -n rather than main.cf is one of the rules of the Postfix support mailing list for reasons (as stated above) that are just as valid here.
-- Larry Stone lstone19@stonejongleux.com http://www.stonejongleux.com/

On 12/16/2012 7:20 AM, ДП wrote:
Sigh... where to start ...
First of all, when trying to communicate Postfix configurations,
unedited, full output from postconf -n
with possible munging of domain
names (only if done consistently) is almost always preferable.
DEFAULT_URL_PATTERN gets interpolated with the host name and the listname gets appended, so if you want to drop the '/mailman' from Mailman URLs, set
DEFAULT_URL_PATTERN = 'http://%s/'
Otherwise, the setting in Defaults.py
DEFAULT_URL_PATTERN = 'http://%s/mailman/'
should be fine without any mm_cfg.py override.
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['my-domain.com.ua'] VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'my-domain.com.ua'
The above is clearly wrong. Either 'my-domain.com.ua' is a virtual domain in Postfix or it is a local domain. If it is a local domain, you don't want either of the above two lines and you don't want 'hash:/var/lib/mailman/data/virtuailman' in Postfix virtual_alias_maps.
If ti is a virtual domain in Postfix, you absolutely don't want
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'my-domain.com.ua'
as that will map the virtual address mylist@my-domain.com.ua to the supposedly local address mylist@my-domain.com.ua, which at best is a loop. Normally, setting VIRTUAL_MAILMAN_LOCAL_DOMAIN in mm_cfg.py is not required, but if it is set, it needs to be set to one of the domains in Postfix my_destination, e.g. 'localhost'.
Something is very wrong here. The above aliases indicate you have set
USE_MAILDIR = Yes
but I don't see that in mm_cfg.py above. In any case, maildir delivery to Mailman is experimental, as far as I know no one uses it, and it also requires that MaildirRunner be enabled. See the documentation in Defaults.py.
Here we see the mappings I mentioned above. The 'virtual' addresses are mapped to themselves which can't work.
It makes a difference. Mailman's aliases should be in /var/lib/mailman/data/aliases(.db) because the owner of the .db file in which the alias is found determines the user under which Postfix delivers the mail.
Probably because of the incorrect mapping in data/virtual-mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Dec 16, 2012, at 1:17 PM, ДП <aspamkiller@yandex.ru> wrote:
Giving us main.cf is NOT the same as postconf -n output. Main.cf shows us how you THINK the system is configured. Postconf -n shows us how the system is ACTUALLY configured.
Requiring postconf -n rather than main.cf is one of the rules of the Postfix support mailing list for reasons (as stated above) that are just as valid here.
-- Larry Stone lstone19@stonejongleux.com http://www.stonejongleux.com/
participants (3)
-
Larry Stone
-
Mark Sapiro
-
ДП