Re: [Exim] exim 4 and multiple alias files

Pàgina inicial
Delete this message
Reply to this message
Autor: Odhiambo G. Washington
Data:  
A: exim-users
Assumpte: Re: [Exim] exim 4 and multiple alias files
* David W Smith <dwsmith@???> [20040330 15:04]: wrote:
> On Tue, 30 Mar 2004, Odhiambo Washington wrote:
>
> > * David W Smith <dwsmith@???> [20040330 12:06]: wrote:
> >
> > [snip]
> > > Does anyone else have any thoughts on/ideas about pointing exim to more
> > > than one alias file (in this case one containing mailing list aliases)?
> >
> > The mailman list should be transparent to Exim, so there is no need for
> > alias files. If you really need alias files, let's hear what you need
> > them for.
>
> --- Interesting. For each mailing list created with mailman 2.1.4 10
> aliases are produced, which have to be pasted into your alias file in
> order to complete the list creation. I have 45 mailing lists and thus 450
> entries in my alias file (I use NIS). Thus my thinking was to move these
> 450 aliases out of the NIS alias file and into their own such file, and
> point exim at it via amending its config file. Now you seem to be saying
> that I can dispense with my 450 mailman aliases.


Yes, that is what I am saying. See this:

55$ cat $MTA | grep 'mail/aliases'
SYSTEM_ALIASES_FILE = /etc/mail/aliases

56$ grep members /etc/mail/aliases

57$ /usr/local/mailman/bin/list_lists | grep members
           members - Kenya Rwanda Association


58$ exim -bt members
members@???
router = mailman_router, transport = mailman_transport

60$ exim -bt members-owner
members-owner@???
router = mailman_router, transport = mailman_transport

61$ exim -bt members-subscribe
members-subscribe@???
router = mailman_router, transport = mailman_transport

So that proves my point, doesn't it? I nothing at all about the
list called "members" in my aliases file.


> But I have tried removing the aliases for one list, after which sending to that list
> failed. So it would seem the aliases need to be placed somewhere. Thus
> I was wondering if a router like the one belong would do the job.
>
> mailman_aliases:
> driver = redirect
> allow_fail
> allow_defer
> data = ${lookup{$local_part}lsearch{/local/etc/mm-aliases}}
> user = mailman
> file_transport = address_file
> pipe_transport = address_pipe
>


Under my routers configuration, I have the following router
(strategically placed AFTER the lookuphost router)

mailman_router:
 driver            = accept
 require_files     = MAILMAN_HOME/lists/$local_part/config.pck
 local_part_suffix_optional
 local_part_suffix = -bounces : -bounces+* : -confirm : -confirm+* : -join : \
                     -leave : -owner : -request : -admin : -subscribe : -unsubscribe
 transport         = mailman_transport




..and the following is the mentioned mailman_transport... placed
ANYWHERE after the line that says "begin transports"..

mailman_transport:
 driver              = pipe
 command             = MAILMAN_WRAP \
                      '${if def:local_part_suffix \
                      {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \
                      {post}}' \
                      $local_part
 current_directory   = MAILMAN_HOME
 home_directory      = MAILMAN_HOME
 user                = MAILMAN_UID
 group               = MAILMAN_GID




That way, even though when I create a list using mailman it spews all
that junk into my screen saying I should put those on my aliases file, I
simply ignore them ;-)


Hope that helps.


        cheers
       - wash
+----------------------------------+-----------------------------------------+
Odhiambo Washington                     . WANANCHI ONLINE LTD (Nairobi, KE)  |
<wash at wananchi dot com>              . 1ere Etage, Loita Hse, Loita St.,  |
GSM: (+254) 722 743 223                 . # 10286, 00100 NAIROBI             |
GSM: (+254) 733 744 121                 . (+254) 020 313 985 - 9             |
+---------------------------------+------------------------------------------+
"Oh My God! They killed init! You Bastards!"
                         --from a /. post