Invitation or subscription on behalf list-owner

Hi there,
I just set up mailman 2.14 integrate with postfix 2.8.2 under Ubuntu 11.04 for may small community to replace my old ecartis (aka listar).
The one that I still struggling is how to send invitation or new member subscription or password reminder on behalf listname-owner@domain.com so that when list owner invite or add new member which have no valid <address> will known at first place.
Is there a way to to change invitation or adding new member on behalf listname-owner@domain.com?
From postfix log and mailman bounce log I see as below.
Sep 4 16:20:31 dip13 amavis[9116]: (09116-11) Passed CLEAN, LOCAL [127.0.0.1] [127.0.0.1] <mylist-bounces@list.dutaint.com> -> <syafril.hermansyah@yahoo.com>, Message-ID: <mailman.0.1315128025.13728.mylist@list.dutaint.com>, mail_id: aJ$ Sep 4 16:20:31 dip13 postfix/smtp[13733]: 692F919C22B7: to=<syafril.hermansyah@yahoo.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=5.4, delays=0.04/0.03/0.01/5.4, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 $ Sep 4 16:20:31 dip13 postfix/qmgr[6484]: 692F919C22B7: removed Sep 4 16:20:34 dip13 postfix/smtp[13742]: C95D619C2387: to=<syafril.hermansyah@yahoo.com>, relay=b.mx.mail.yahoo.com[74.6.136.65]:25, delay=2.5, delays=0.01/0.02/0.68/1.8, dsn=5.0.0, status=bounced (host b.mx.mail.yahoo.com[74.6.136.65]$ Sep 4 16:20:34 dip13 postfix/cleanup[13732]: 530D419C2392: message-id=<20110904092034.530D419C2392@dip13.dutaint.com> Sep 4 16:20:34 dip13 postfix/qmgr[6484]: 530D419C2392: from=<>, size=3613, nrcpt=1 (queue active) Sep 4 16:20:34 dip13 postfix/bounce[13749]: C95D619C2387: sender non-delivery notification: 530D419C2392 Sep 4 16:20:34 dip13 postfix/qmgr[6484]: C95D619C2387: removed
and mailman bounce log
Sep 04 16:48:08 2011 (4903) mylist: syafril.hermansyah@yahoo.com bounce score: 1.0
-- syafril
Syafril Hermansyah

On 9/4/2011 3:19 AM, Syafril Hermansyah wrote:
Mailman is designed to send all mail with envelope from LISTNAME-bounces@... so that Mailman can process bounces.
If you prefer that all bounces be processed manually by the list owner, and you control the MTA that delivers to Mailman, you could arrange aliases or whatever so that mail to -bounces addresses is delivered as if addressed to -owner.
If you want only some bounces to be handled manually by the list owner, you would have to modify the source code that generates those messages.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/04/2011 10:09 PM, Mark Sapiro wrote:
No, I only need (mass) invitation, adding new (mass) subscription (and password reminder) send on behalf list-owner@domain.com while the rest I let Mailman bounce handler to handle the job. Base on my experience on old Ecartis, there are a lot of occasion the the new member <address> are not valid either because the person who inform him/her are not correct or the list-owner made typo. I know that sooner or later non-valid member will be automatically unsubcribe by Mailman bounce handler, but if list-owner known first they can make correction as soon as possible. This kind of features will help to make my Mailman more efficient while using my limited resources.
If you want only some bounces to be handled manually by the list owner, you would have to modify the source code that generates those messages.
I am not programmer, I would prefer other workaround (if any) :-)
I have made/add recipient_bcc_map to handle all mail address to listname-bounce@domain.com always bcc: to listname-owner@domain.com, but apparently this setting not working as expected when the receiver MTA reject the message on smtp level.
-- syafril
Syafril Hermansyah

Syafril Hermansyah wrote:
You can't quite get that level of granularity withoud making more extensive code modifications, but you can set the envelope sender to listname-owner for all list welcome messages by finding the definition of the SendSubscribeAck() method in the Deliverer class in Mailman/Deliverer.py and changing the last line from
msg.send(self, verp=mm_cfg.VERP_PERSONALIZED_DELIVERIES)
to
msg.send(self, verp=mm_cfg.VERP_PERSONALIZED_DELIVERIES,
envsender=self.GetOwnerEmail())
You can set the envelope sender to listname-owner for all invitations by finding the definition of the InviteNewMember() method in the MailList class in Mailman/MailList.py and changing the last line from
msg.send(self)
to
msg.send(self, envsender=self.GetOwnerEmail())
Password reminders are trickier. In standard GNU Mailman, a user gets a single reminder for all subscribed lists for a given host. Thus, this reminder comes from the site list, not from the list(s) to which the user is subscribed, but normally password reminders don't bounce. If the address is undeliverable, the user will get delivery disabled and eventually unsubscribed by normal bounce processing. The only time this doesn't occur is if the user has set nomail and then the user's address goes bad. In any case, for various complicated reasons (read all the comments in Mailman/Queue/BounceRunner.py), bounces of password reminders are sent to the owner of the site list.
Understood.
[...]
<http://www.postfix.org/postconf.5.html> says about recipient_bcc_maps:
Optional BCC (blind carbon-copy) address lookup tables, indexed by recipient address. The BCC address (multiple results are not supported) is added when mail enters from outside of Postfix.
I.e., if the mail is accepted by a remote MX and then bounced, recipient_bcc_maps will be effective as the bounce comes from outside, but as you observe, if the outgoing message is regected during SMTP, the bounce does not enter from outside of Postfix so recipient_bcc_maps is not consulted.
What you could do is change the alias from
LISTNAME-bounces: "|/path/to/mailman/mail/mailman bounces LISTNAME"
to
LISTNAME-bounces: "|/path/to/mailman/mail/mailman bounces LISTNAME", LISTNAME-owner
If you have Mailman/Postfix integration, you could even automate this by setting POSTFIX_ALIAS_CMD in mm_cfg.py to point to a script that would edit the -bounce aliases appropriately and then invoke /usr/sbin/postalias.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/05/2011 12:20 PM, Mark Sapiro wrote:
Wow, it work as expected, hura :-) Thank you very much!
OK, no problem
Understood, thanks.
I have manually changes either on /etc/aliases and /var/lib/mailman/data/virtual-mailman, and now all listname-bounce copied to list-owner <Address> as expected. Again, thank you for your help Mark.
BTW. What is the proper format of VIRTUAL_MAILMAN_LOCAL_DOMAIN in mm_cfg.py (or /var/lib/mailman/Mailman/Defaults.py) when I have multiple domain in POSTFIX_STYLE_VIRTUAL_DOMAINS?
-- syafril
Syafril Hermansyah

Syafril Hermansyah wrote:
VIRTUAL_MAILMAN_LOCAL_DOMAIN is not normally required to be set. See the comments preceding the line
VIRTUAL_MAILMAN_LOCAL_DOMAIN = None
in Defaults.py for a description of what it does. If it does need to be set, it doesn't matter how many POSTFIX_STYLE_VIRTUAL_DOMAINS you have or what they are because it specifies the domain of the address in the 'to' side of the mapping and all of these should be the same local domain.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/06/2011 12:32 AM, Mark Sapiro wrote:
VIRTUAL_MAILMAN_LOCAL_DOMAIN is not normally required to be set. See the comments preceding the line
The wording text said: # Whatever string value you set will be literally appended with an '@' # to the listaddress local parts on the right hand side.
My problem in the past related to this LOOP ADDRESSES, when the right hand side have empty domain name, all posting has rejected because the domain part change/convert to whatever domain I put on VIRTUAL_MAILMAN_LOCAL_DOMAIN.
If I put empty (none), it would appended with @localhost which rejected by my helo_access checker protection :-(. The problem is if I put more than one domains such VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'list.example.com', 'others.domain.com', etc.domain.com
makes error while generate aliases $ sudo /usr/lib/mailman/bin/genaliases
-- syafril
Syafril Hermansyah

Syafril Hermansyah wrote:
Correct.
It affects every address in /var/lib/mailman/data/virtual-mailman. If you didn't see the effect on all addresses, it's because you didn't run bin/genaliases after setting VIRTUAL_MAILMAN_LOCAL_DOMAIN.
I don't understand. If you just don't set VIRTUAL_MAILMAN_LOCAL_DOMAIN at all, i.e.accept the default setting of None, no domain information at all is appended to the "to" addresses. If this is not what you see, leave it out of mm_cfg.py and run bin/genaliases and look at the result after genaliases.
Here's an example.
In mm_cfg.py I have
MTA = 'Postfix' POSTFIX_STYLE_VIRTUAL_DOMAINS = ['grizz.org', 'msapiro.net']
The beginning of data/virtual-mailman has (with comments removed)
mailman-loop@grizz.org mailman-loop mailman-loop@msapiro.net mailman-loop gpc-website@grizz.org gpc-website gpc-website-admin@grizz.org gpc-website-admin ...
This tells Postfix that the virtual address mailman-loop@grizz.org maps to the address mailman-loop, the virtual address mailman-loop@msapiro.net maps to the address mailman-loop, the virtual address gpc-website@grizz.org maps to the address gpc-website, the virtual address gpc-website-admin@grizz.org maps to the address gpc-website-admin and so forth.
These "to" addresses are unqualified so Postfix treats them (assuming the default append_at_myorigin = yes) as though they are @$myorigin or (again assuming the default) @$myhostname. This should be a locally deliverable domain so that the corresponding aliases
mailman-loop: /var/lib/mailman/data/owner-bounces.mbox gpc-website: "|/usr/local/mailman/mail/mailman post gpc-website" gpc-website-admin: "|/usr/local/mailman/mail/mailman admin gpc-website"
are effective for those addresses.
If for some reason in your Postfix configuration, myorigin is set to some value which is not a locally deliverable domain, you then need to append a domain to the "to" addresses in virtual-mailman. This may be localhost or some other domain. For example. if you set
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost'
then all the "to" addresses in virtual-mailman become like
mailman-loop@grizz.org mailman-loop@localhost mailman-loop@msapiro.net mailman-loop@localhost gpc-website@grizz.org gpc-website@localhost gpc-website-admin@grizz.org gpc-website-admin@localhost
The intent is to add qualification so they become local addresses if the bare name is not understood to be in a local domain.
If bare names such as mailman-loop, gpc-website, gpc-website-admin, etc are understood to be local, VIRTUAL_MAILMAN_LOCAL_DOMAIN should be set to None (the default). If not, VIRTUAL_MAILMAN_LOCAL_DOMAIN should be set to one and only one of the domains in Postfix's mydestination
That's because
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'list.example.com', 'others.domain.com', etc.domain.com
is not valid Python, and even if you were to make it a valid list like
VIRTUAL_MAILMAN_LOCAL_DOMAIN = ['list.example.com', 'others.domain.com', etc.domain.com]
It would make no sense.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/06/2011 10:06 AM, Mark Sapiro wrote:
Sorry for long delay response, I have problem with my postfix log (/var/log/mail.log) which have the date stamp differ from current local time, but while trying to fixed it up makes /mail.log no longer update :-(
Oops you're right, I just check again to /var/lib/mailman/data/virtual-mailman, it does affect all addresses there not merely LOOP ADDRESSES, sorry.
I use myorigin = /etc/hostname
and after set VIRTUAL_MAILMAN_LOCAL_DOMAIN = None and run /usr/lib/mailman/bin/genaliases I got in virtual-mailman
mailman-loop@list.dutaint.com mailman-loop mailman-loop@dip13.dutaint.com mailman-loop
# STANZA START: mylist # CREATED: Tue Sep 6 12:54:05 2011
mylist@list.dutaint.com mylist@list.dutaint.com mylist-admin@list.dutaint.com mylist-admin@list.dutaint.com mylist-bounces@list.dutaint.com mylist-bounces@list.dutaint.com, mylist-confirm@list.dutaint.com mylist-confirm@list.dutaint.com ....
while /var/lib/mailman/data/aliases consist
# The ultimate loop stopper address mailman-loop: /var/lib/mailman/data/owner-bounces.mbox
# STANZA START: mailman # CREATED: Fri Sep 9 20:55:34 2011 mailman: "|/var/lib/mailman/mail/mailman post mailman" mailman-admin: "|/var/lib/mailman/mail/mailman admin mailman" ....
this kind of aliases makes posting not working, the error said
DBB8E2C238A 3104 Fri Sep 9 17:26:32 syafril@dutaint.co.id (user unknown) |/var/lib/mailman/mail/mailman post mailman"@dip13.dutaint.com
as you see there is "@dip13.dutaint.com appended
The intent is to add qualification so they become local addresses if the bare name is not understood to be in a local domain.
Yeah it should be like that, but I found that my problem is because I used all domain as virtual domain. I have virtual_alias_maps to forward mail address to certain address being redirecting to my account on different mailserver, see
http://www.postfix.org/VIRTUAL_README.html
section Mail forwarding domains.
I follow suggestion on this page
Mailing lists ... There is one major limitation: virtual aliases and virtual mailboxes can't directly deliver to mailing list managers such as majordomo. The solution is to set up virtual aliases that direct virtual addresses to the local delivery agent:
/etc/postfix/main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual
/etc/postfix/virtual:
listname-request@example.com listname-request
listname@example.com listname
owner-listname@example.com owner-listname
/etc/aliases:
listname: "|/some/where/majordomo/wrapper ..."
owner-listname: ...
listname-request: ...
And after putting complete address (right hand site of @) mailman working as expected.
Still no go. While run $ sudo /usr/lib/mailman/bin/genaliases I got error
Traceback (most recent call last): File "/usr/lib/mailman/bin/genaliases", line 122, in <module> main() File "/usr/lib/mailman/bin/genaliases", line 112, in main MTA.create(mlist, nolock=True, quiet=quiet) File "/var/lib/mailman/Mailman/MTA/Postfix.py", line 237, in create _do_create(mlist, VIRTFILE, _addvirtual) File "/var/lib/mailman/Mailman/MTA/Postfix.py", line 219, in _do_create func(mlist, fp) File "/var/lib/mailman/Mailman/MTA/Postfix.py", line 127, in _addvirtual loopdest += '@' + mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN TypeError: cannot concatenate 'str' and 'list' objects
BTW. What is the purpose of DEB_LISTMASTER?
On postfix-to-mailman.py mentioned as
# This script is meant to be called as a postfix transport pipe.
# It catches all mail to a virtual domain, eg "lists.example.com". It # looks at the recipient for each mail message and decides if the mail # is addressed to a valid list or not, and optionally bounces the # message with a helpful suggestion if it's not addressed to a # list. It decides if it is a posting, a list command, or mail to the # list administrator, by checking for the -admin, -owner, -request, # -join, -leave, -subscribe and -unsubscribe addresses. It will # recognize a list as soon as the list is created, there is no need to # add _any_ aliases for any list. It recognizes mail to postmaster, # abuse and mailer-daemon, and routes those mails to DEB_LISTMASTER as # defined in mm_cfg.py
But I didn't see it's working (I expect all bounce distribution mail will copied to postmaster@$myhostname) since I put DEB_LISTMASTER = postmaster@dip13.dutaint.com
but it does not.
-- syafril
Syafril Hermansyah

Syafril Hermansyah wrote:
I don't see how this is possible. If you run bin/genaliases, it should recreate data/aliases and data/virtual-mailman (and the associated .db files) from empty, and if VIRTUAL_MAILMAN_LOCAL_DOMAIN = None, there should be no "@domain" on the right hand side of any of the entries. It should not be possible that the mailman-loop addresses are unqualified and list addresses are qualified immediately after running genaliases.
Do you possibly have more that one data/ directory, e.g., /usr/lib/mailman/data/ as well as /var/lib/mailman/data/?
I also note that the timestamp on the mailman list above is "Fri Sep 9 20:55:34 2011" while that on the mylist list in virtual-mailman is "Tue Sep 6 12:54:05 2011". This is additional evidence that the data/virtual-mailman you are looking at above is not the one updated by genaliases.
Of course it doesn't work. You left out the next line of my statement above, namely "It would make no sense."
Please see the FAQ at <http://wiki.list.org/x/OIDD>.
Please note that postfix_to_mailman.py is a third party module officially unsupported by the GNU Mailman project. Further, it is an alternative to delivery via virtual alias maps and aliases and the two methods are incompatible.
I am completely lost in trying to understand your configuration, To help further, I would need to see the complete contents of mm_cfg.py and the output from 'postconf -n'. Then I will undoubtedly have additional questions.
Also, I'm not sure what you are trying to accomplish with virtual-mailman. but things like
mylist@list.dutaint.com mylist@list.dutaint.com
make no sense as they say to map the virtual address mylist@list.dutaint.com to itself. If Postfix knows how to deliver to mylist@list.dutaint.com, the virtual mapping is unnecessary and if it doesn't, mapping the address to itself doesn't help.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/10/2011 01:01 AM, Mark Sapiro wrote:
Oops my fault, I still use my old setting. After revert back to default setting I got
# LOOP ADDRESSES START mailman-loop@dip13.dutaint.com mailman-loop mailman-loop@list.dutaint.com mailman-loop # LOOP ADDRESSES END
# STANZA START: mailman # CREATED: Fri Sep 9 21:31:17 2011 mailman@dip13.dutaint.com mailman mailman-admin@dip13.dutaint.com mailman-admin mailman-bounces@dip13.dutaint.com mailman-bounces mailman-confirm@dip13.dutaint.com mailman-confirm mailman-join@dip13.dutaint.com mailman-join mailman-leave@dip13.dutaint.com mailman-leave mailman-owner@dip13.dutaint.com mailman-owner mailman-request@dip13.dutaint.com mailman-request mailman-subscribe@dip13.dutaint.com mailman-subscribe mailman-unsubscribe@dip13.dutaint.com mailman-unsubscribe # STANZA END: mailman
# STANZA START: mylist # CREATED: Sun Sep 11 00:06:33 2011 mylist@list.dutaint.com mylist mylist-admin@list.dutaint.com mylist-admin mylist-bounces@list.dutaint.com mylist-bounces mylist-confirm@list.dutaint.com mylist-confirm mylist-join@list.dutaint.com mylist-join mylist-leave@list.dutaint.com mylist-leave mylist-owner@list.dutaint.com mylist-owner mylist-request@list.dutaint.com mylist-request mylist-subscribe@list.dutaint.com mylist-subscribe mylist-unsubscribe@list.dutaint.com mylist-unsubscribe # STANZA END: mylist
And the list working fine as it should.
Yeah, another fault from me, sorry. I start compose reply before rebuilt my postfix (I need it to solved problem with postfix log not update), and continue after rebuilt the postfix (and mailman).
I found the source of this problem, it is because I put in postfix's main.cf
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman
but after commented it out, and keep
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
It's working fine.
Ups, OK then :-)
BTW. What is the purpose of DEB_LISTMASTER?
Please see the FAQ at <http://wiki.list.org/x/OIDD>.
Ok, thanks for the explanation.
Sorry to make you confused, my apologies. My mailman now working fine, I can add any new list without problems. Thanks for your help.
-- syafril
Syafril Hermansyah

On 9/4/2011 3:19 AM, Syafril Hermansyah wrote:
Mailman is designed to send all mail with envelope from LISTNAME-bounces@... so that Mailman can process bounces.
If you prefer that all bounces be processed manually by the list owner, and you control the MTA that delivers to Mailman, you could arrange aliases or whatever so that mail to -bounces addresses is delivered as if addressed to -owner.
If you want only some bounces to be handled manually by the list owner, you would have to modify the source code that generates those messages.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/04/2011 10:09 PM, Mark Sapiro wrote:
No, I only need (mass) invitation, adding new (mass) subscription (and password reminder) send on behalf list-owner@domain.com while the rest I let Mailman bounce handler to handle the job. Base on my experience on old Ecartis, there are a lot of occasion the the new member <address> are not valid either because the person who inform him/her are not correct or the list-owner made typo. I know that sooner or later non-valid member will be automatically unsubcribe by Mailman bounce handler, but if list-owner known first they can make correction as soon as possible. This kind of features will help to make my Mailman more efficient while using my limited resources.
If you want only some bounces to be handled manually by the list owner, you would have to modify the source code that generates those messages.
I am not programmer, I would prefer other workaround (if any) :-)
I have made/add recipient_bcc_map to handle all mail address to listname-bounce@domain.com always bcc: to listname-owner@domain.com, but apparently this setting not working as expected when the receiver MTA reject the message on smtp level.
-- syafril
Syafril Hermansyah

Syafril Hermansyah wrote:
You can't quite get that level of granularity withoud making more extensive code modifications, but you can set the envelope sender to listname-owner for all list welcome messages by finding the definition of the SendSubscribeAck() method in the Deliverer class in Mailman/Deliverer.py and changing the last line from
msg.send(self, verp=mm_cfg.VERP_PERSONALIZED_DELIVERIES)
to
msg.send(self, verp=mm_cfg.VERP_PERSONALIZED_DELIVERIES,
envsender=self.GetOwnerEmail())
You can set the envelope sender to listname-owner for all invitations by finding the definition of the InviteNewMember() method in the MailList class in Mailman/MailList.py and changing the last line from
msg.send(self)
to
msg.send(self, envsender=self.GetOwnerEmail())
Password reminders are trickier. In standard GNU Mailman, a user gets a single reminder for all subscribed lists for a given host. Thus, this reminder comes from the site list, not from the list(s) to which the user is subscribed, but normally password reminders don't bounce. If the address is undeliverable, the user will get delivery disabled and eventually unsubscribed by normal bounce processing. The only time this doesn't occur is if the user has set nomail and then the user's address goes bad. In any case, for various complicated reasons (read all the comments in Mailman/Queue/BounceRunner.py), bounces of password reminders are sent to the owner of the site list.
Understood.
[...]
<http://www.postfix.org/postconf.5.html> says about recipient_bcc_maps:
Optional BCC (blind carbon-copy) address lookup tables, indexed by recipient address. The BCC address (multiple results are not supported) is added when mail enters from outside of Postfix.
I.e., if the mail is accepted by a remote MX and then bounced, recipient_bcc_maps will be effective as the bounce comes from outside, but as you observe, if the outgoing message is regected during SMTP, the bounce does not enter from outside of Postfix so recipient_bcc_maps is not consulted.
What you could do is change the alias from
LISTNAME-bounces: "|/path/to/mailman/mail/mailman bounces LISTNAME"
to
LISTNAME-bounces: "|/path/to/mailman/mail/mailman bounces LISTNAME", LISTNAME-owner
If you have Mailman/Postfix integration, you could even automate this by setting POSTFIX_ALIAS_CMD in mm_cfg.py to point to a script that would edit the -bounce aliases appropriately and then invoke /usr/sbin/postalias.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/05/2011 12:20 PM, Mark Sapiro wrote:
Wow, it work as expected, hura :-) Thank you very much!
OK, no problem
Understood, thanks.
I have manually changes either on /etc/aliases and /var/lib/mailman/data/virtual-mailman, and now all listname-bounce copied to list-owner <Address> as expected. Again, thank you for your help Mark.
BTW. What is the proper format of VIRTUAL_MAILMAN_LOCAL_DOMAIN in mm_cfg.py (or /var/lib/mailman/Mailman/Defaults.py) when I have multiple domain in POSTFIX_STYLE_VIRTUAL_DOMAINS?
-- syafril
Syafril Hermansyah

Syafril Hermansyah wrote:
VIRTUAL_MAILMAN_LOCAL_DOMAIN is not normally required to be set. See the comments preceding the line
VIRTUAL_MAILMAN_LOCAL_DOMAIN = None
in Defaults.py for a description of what it does. If it does need to be set, it doesn't matter how many POSTFIX_STYLE_VIRTUAL_DOMAINS you have or what they are because it specifies the domain of the address in the 'to' side of the mapping and all of these should be the same local domain.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/06/2011 12:32 AM, Mark Sapiro wrote:
VIRTUAL_MAILMAN_LOCAL_DOMAIN is not normally required to be set. See the comments preceding the line
The wording text said: # Whatever string value you set will be literally appended with an '@' # to the listaddress local parts on the right hand side.
My problem in the past related to this LOOP ADDRESSES, when the right hand side have empty domain name, all posting has rejected because the domain part change/convert to whatever domain I put on VIRTUAL_MAILMAN_LOCAL_DOMAIN.
If I put empty (none), it would appended with @localhost which rejected by my helo_access checker protection :-(. The problem is if I put more than one domains such VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'list.example.com', 'others.domain.com', etc.domain.com
makes error while generate aliases $ sudo /usr/lib/mailman/bin/genaliases
-- syafril
Syafril Hermansyah

Syafril Hermansyah wrote:
Correct.
It affects every address in /var/lib/mailman/data/virtual-mailman. If you didn't see the effect on all addresses, it's because you didn't run bin/genaliases after setting VIRTUAL_MAILMAN_LOCAL_DOMAIN.
I don't understand. If you just don't set VIRTUAL_MAILMAN_LOCAL_DOMAIN at all, i.e.accept the default setting of None, no domain information at all is appended to the "to" addresses. If this is not what you see, leave it out of mm_cfg.py and run bin/genaliases and look at the result after genaliases.
Here's an example.
In mm_cfg.py I have
MTA = 'Postfix' POSTFIX_STYLE_VIRTUAL_DOMAINS = ['grizz.org', 'msapiro.net']
The beginning of data/virtual-mailman has (with comments removed)
mailman-loop@grizz.org mailman-loop mailman-loop@msapiro.net mailman-loop gpc-website@grizz.org gpc-website gpc-website-admin@grizz.org gpc-website-admin ...
This tells Postfix that the virtual address mailman-loop@grizz.org maps to the address mailman-loop, the virtual address mailman-loop@msapiro.net maps to the address mailman-loop, the virtual address gpc-website@grizz.org maps to the address gpc-website, the virtual address gpc-website-admin@grizz.org maps to the address gpc-website-admin and so forth.
These "to" addresses are unqualified so Postfix treats them (assuming the default append_at_myorigin = yes) as though they are @$myorigin or (again assuming the default) @$myhostname. This should be a locally deliverable domain so that the corresponding aliases
mailman-loop: /var/lib/mailman/data/owner-bounces.mbox gpc-website: "|/usr/local/mailman/mail/mailman post gpc-website" gpc-website-admin: "|/usr/local/mailman/mail/mailman admin gpc-website"
are effective for those addresses.
If for some reason in your Postfix configuration, myorigin is set to some value which is not a locally deliverable domain, you then need to append a domain to the "to" addresses in virtual-mailman. This may be localhost or some other domain. For example. if you set
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost'
then all the "to" addresses in virtual-mailman become like
mailman-loop@grizz.org mailman-loop@localhost mailman-loop@msapiro.net mailman-loop@localhost gpc-website@grizz.org gpc-website@localhost gpc-website-admin@grizz.org gpc-website-admin@localhost
The intent is to add qualification so they become local addresses if the bare name is not understood to be in a local domain.
If bare names such as mailman-loop, gpc-website, gpc-website-admin, etc are understood to be local, VIRTUAL_MAILMAN_LOCAL_DOMAIN should be set to None (the default). If not, VIRTUAL_MAILMAN_LOCAL_DOMAIN should be set to one and only one of the domains in Postfix's mydestination
That's because
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'list.example.com', 'others.domain.com', etc.domain.com
is not valid Python, and even if you were to make it a valid list like
VIRTUAL_MAILMAN_LOCAL_DOMAIN = ['list.example.com', 'others.domain.com', etc.domain.com]
It would make no sense.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/06/2011 10:06 AM, Mark Sapiro wrote:
Sorry for long delay response, I have problem with my postfix log (/var/log/mail.log) which have the date stamp differ from current local time, but while trying to fixed it up makes /mail.log no longer update :-(
Oops you're right, I just check again to /var/lib/mailman/data/virtual-mailman, it does affect all addresses there not merely LOOP ADDRESSES, sorry.
I use myorigin = /etc/hostname
and after set VIRTUAL_MAILMAN_LOCAL_DOMAIN = None and run /usr/lib/mailman/bin/genaliases I got in virtual-mailman
mailman-loop@list.dutaint.com mailman-loop mailman-loop@dip13.dutaint.com mailman-loop
# STANZA START: mylist # CREATED: Tue Sep 6 12:54:05 2011
mylist@list.dutaint.com mylist@list.dutaint.com mylist-admin@list.dutaint.com mylist-admin@list.dutaint.com mylist-bounces@list.dutaint.com mylist-bounces@list.dutaint.com, mylist-confirm@list.dutaint.com mylist-confirm@list.dutaint.com ....
while /var/lib/mailman/data/aliases consist
# The ultimate loop stopper address mailman-loop: /var/lib/mailman/data/owner-bounces.mbox
# STANZA START: mailman # CREATED: Fri Sep 9 20:55:34 2011 mailman: "|/var/lib/mailman/mail/mailman post mailman" mailman-admin: "|/var/lib/mailman/mail/mailman admin mailman" ....
this kind of aliases makes posting not working, the error said
DBB8E2C238A 3104 Fri Sep 9 17:26:32 syafril@dutaint.co.id (user unknown) |/var/lib/mailman/mail/mailman post mailman"@dip13.dutaint.com
as you see there is "@dip13.dutaint.com appended
The intent is to add qualification so they become local addresses if the bare name is not understood to be in a local domain.
Yeah it should be like that, but I found that my problem is because I used all domain as virtual domain. I have virtual_alias_maps to forward mail address to certain address being redirecting to my account on different mailserver, see
http://www.postfix.org/VIRTUAL_README.html
section Mail forwarding domains.
I follow suggestion on this page
Mailing lists ... There is one major limitation: virtual aliases and virtual mailboxes can't directly deliver to mailing list managers such as majordomo. The solution is to set up virtual aliases that direct virtual addresses to the local delivery agent:
/etc/postfix/main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual
/etc/postfix/virtual:
listname-request@example.com listname-request
listname@example.com listname
owner-listname@example.com owner-listname
/etc/aliases:
listname: "|/some/where/majordomo/wrapper ..."
owner-listname: ...
listname-request: ...
And after putting complete address (right hand site of @) mailman working as expected.
Still no go. While run $ sudo /usr/lib/mailman/bin/genaliases I got error
Traceback (most recent call last): File "/usr/lib/mailman/bin/genaliases", line 122, in <module> main() File "/usr/lib/mailman/bin/genaliases", line 112, in main MTA.create(mlist, nolock=True, quiet=quiet) File "/var/lib/mailman/Mailman/MTA/Postfix.py", line 237, in create _do_create(mlist, VIRTFILE, _addvirtual) File "/var/lib/mailman/Mailman/MTA/Postfix.py", line 219, in _do_create func(mlist, fp) File "/var/lib/mailman/Mailman/MTA/Postfix.py", line 127, in _addvirtual loopdest += '@' + mm_cfg.VIRTUAL_MAILMAN_LOCAL_DOMAIN TypeError: cannot concatenate 'str' and 'list' objects
BTW. What is the purpose of DEB_LISTMASTER?
On postfix-to-mailman.py mentioned as
# This script is meant to be called as a postfix transport pipe.
# It catches all mail to a virtual domain, eg "lists.example.com". It # looks at the recipient for each mail message and decides if the mail # is addressed to a valid list or not, and optionally bounces the # message with a helpful suggestion if it's not addressed to a # list. It decides if it is a posting, a list command, or mail to the # list administrator, by checking for the -admin, -owner, -request, # -join, -leave, -subscribe and -unsubscribe addresses. It will # recognize a list as soon as the list is created, there is no need to # add _any_ aliases for any list. It recognizes mail to postmaster, # abuse and mailer-daemon, and routes those mails to DEB_LISTMASTER as # defined in mm_cfg.py
But I didn't see it's working (I expect all bounce distribution mail will copied to postmaster@$myhostname) since I put DEB_LISTMASTER = postmaster@dip13.dutaint.com
but it does not.
-- syafril
Syafril Hermansyah

Syafril Hermansyah wrote:
I don't see how this is possible. If you run bin/genaliases, it should recreate data/aliases and data/virtual-mailman (and the associated .db files) from empty, and if VIRTUAL_MAILMAN_LOCAL_DOMAIN = None, there should be no "@domain" on the right hand side of any of the entries. It should not be possible that the mailman-loop addresses are unqualified and list addresses are qualified immediately after running genaliases.
Do you possibly have more that one data/ directory, e.g., /usr/lib/mailman/data/ as well as /var/lib/mailman/data/?
I also note that the timestamp on the mailman list above is "Fri Sep 9 20:55:34 2011" while that on the mylist list in virtual-mailman is "Tue Sep 6 12:54:05 2011". This is additional evidence that the data/virtual-mailman you are looking at above is not the one updated by genaliases.
Of course it doesn't work. You left out the next line of my statement above, namely "It would make no sense."
Please see the FAQ at <http://wiki.list.org/x/OIDD>.
Please note that postfix_to_mailman.py is a third party module officially unsupported by the GNU Mailman project. Further, it is an alternative to delivery via virtual alias maps and aliases and the two methods are incompatible.
I am completely lost in trying to understand your configuration, To help further, I would need to see the complete contents of mm_cfg.py and the output from 'postconf -n'. Then I will undoubtedly have additional questions.
Also, I'm not sure what you are trying to accomplish with virtual-mailman. but things like
mylist@list.dutaint.com mylist@list.dutaint.com
make no sense as they say to map the virtual address mylist@list.dutaint.com to itself. If Postfix knows how to deliver to mylist@list.dutaint.com, the virtual mapping is unnecessary and if it doesn't, mapping the address to itself doesn't help.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/10/2011 01:01 AM, Mark Sapiro wrote:
Oops my fault, I still use my old setting. After revert back to default setting I got
# LOOP ADDRESSES START mailman-loop@dip13.dutaint.com mailman-loop mailman-loop@list.dutaint.com mailman-loop # LOOP ADDRESSES END
# STANZA START: mailman # CREATED: Fri Sep 9 21:31:17 2011 mailman@dip13.dutaint.com mailman mailman-admin@dip13.dutaint.com mailman-admin mailman-bounces@dip13.dutaint.com mailman-bounces mailman-confirm@dip13.dutaint.com mailman-confirm mailman-join@dip13.dutaint.com mailman-join mailman-leave@dip13.dutaint.com mailman-leave mailman-owner@dip13.dutaint.com mailman-owner mailman-request@dip13.dutaint.com mailman-request mailman-subscribe@dip13.dutaint.com mailman-subscribe mailman-unsubscribe@dip13.dutaint.com mailman-unsubscribe # STANZA END: mailman
# STANZA START: mylist # CREATED: Sun Sep 11 00:06:33 2011 mylist@list.dutaint.com mylist mylist-admin@list.dutaint.com mylist-admin mylist-bounces@list.dutaint.com mylist-bounces mylist-confirm@list.dutaint.com mylist-confirm mylist-join@list.dutaint.com mylist-join mylist-leave@list.dutaint.com mylist-leave mylist-owner@list.dutaint.com mylist-owner mylist-request@list.dutaint.com mylist-request mylist-subscribe@list.dutaint.com mylist-subscribe mylist-unsubscribe@list.dutaint.com mylist-unsubscribe # STANZA END: mylist
And the list working fine as it should.
Yeah, another fault from me, sorry. I start compose reply before rebuilt my postfix (I need it to solved problem with postfix log not update), and continue after rebuilt the postfix (and mailman).
I found the source of this problem, it is because I put in postfix's main.cf
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman
but after commented it out, and keep
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
It's working fine.
Ups, OK then :-)
BTW. What is the purpose of DEB_LISTMASTER?
Please see the FAQ at <http://wiki.list.org/x/OIDD>.
Ok, thanks for the explanation.
Sorry to make you confused, my apologies. My mailman now working fine, I can add any new list without problems. Thanks for your help.
-- syafril
Syafril Hermansyah
participants (2)
-
Mark Sapiro
-
Syafril Hermansyah