[Mailman-Users] VIrtual_Mailman_Local_Domain ( was Re: Invitationor subscription on behalf list-owner)

Syafril Hermansyah syafril at dutaint.co.id
Fri Sep 9 16:26:11 CEST 2011


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 :-(
---

>> >From my trial and error putting up domain on
>> VIRTUAL_MAILMAN_LOCAL_DOMAIN affect the filling text on # LOOP ADDRESSES
>> START section on /var/lib/mailman/data/virtual-mailman
> 
> 
> 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.

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.

> 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

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 at list.dutaint.com   mailman-loop
mailman-loop at dip13.dutaint.com  mailman-loop

# STANZA START: mylist
# CREATED: Tue Sep  6 12:54:05 2011

mylist at list.dutaint.com              mylist at list.dutaint.com
mylist-admin at list.dutaint.com        mylist-admin at list.dutaint.com
mylist-bounces at list.dutaint.com      mylist-bounces at list.dutaint.com,
mylist-confirm at list.dutaint.com      mylist-confirm at 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 at 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 at example.com listname-request
        listname at example.com         listname
        owner-listname at 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.

>> 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
> 
> 
> 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]

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 at dip13.dutaint.com

but it does not.

-- 
syafril
-------
Syafril Hermansyah




More information about the Mailman-Users mailing list