Re: [Exim] how to do qmail-style alias partial wildcards?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Kirill Miazine
Dátum:  
Címzett: Ben Hardy
CC: exim-users
Tárgy: Re: [Exim] how to do qmail-style alias partial wildcards?
Look for "local_part_suffix" in the Exim documentation.

Have a normal system_aliases director that picks up alias entries of the
form:

    local_part: destination


After it put a system_aliases_wc director that picks up alias entries of
the form:

    local_part-*: destination


I cannot provide an example off my head, as I remember nothing about
Exim 3 directors.

Actually the fact that I remember nothing about Exim 3 made me check
Exim 3 docs - the name of the option you will have to look for is
"suffix", not "local_part_suffix".

http://www.no.exim.org/exim-html-3.30/doc/html/spec_21.html#SEC620

Below is a configuration file for converting a qmail system to Exim 3,
written by Nico (where is he now?). You may find some hints there.

    http://mail.tmtowtdi.de/exim/exim3.qmail


Ben Hardy wrote:
> *delurk*
>
> Hi folks,
>
> I've been trying to figure out how to get Exim to do qmail-style
> aliases. This is for bounce handling.
>
> Basically I want any incoming message whose addressee matches the
> regular expression ^boing-.+@???$ (or more intuitively,
> boing@???) to be shoved into a pipe to my bounce processing
> program, without affecting other existing users at the domain.
>
> I haven't been able to determine how to do a wildcard match which is
> only a wildcard for part of $local.
>
> I've added a wildcard director as follows, it's the last director too.
>
> =excerpt=/etc/exim/exim.conf===============
> system_aliases_wc:
>         driver = aliasfile
>         file_transport = address_file
>         pipe_transport = address_pipe
>         file = /etc/aliases.wildcards
>         include_domain = true
>         search_type = lsearch*
> =end=======================================

>
> The wildcard aliases file is as follows. At the moment I'm just trying
> to get the messages to come straight to me, before I try getting a pipe
> working:
>
> =/etc/aliases.wildcards====================
> boing*@???: ben
> nowild@???: ben        # to test that this file works at all
> =end=======================================

>
> Testing
> First I test a normal address that I know works, ben@???
> Then the flat address (nowild) in the wildcard aliases file
>
> # exim -d2 -bt
> Exim version 3.36 debug level 2 uid=0 gid=0
> Berkeley DB: Sleepycat Software: Berkeley DB 2.7.7: (08/20/99)
> Caller is an admin user
> Caller is a trusted user
> > ben@???
> system_aliases director: lsearch key=ben
> file="/etc/aliases"
> system_aliases director declined for ben:
> userforward director: file = .forward
> set uid=0 gid=0 euid=1001 egid=1001
> successful stat of /home/ben/.
> /home/ben/.forward not found
> restored uid=0 gid=0 euid=8 egid=8
> queued for local_delivery transport: local_part=ben
> domain=mydomain.org.au
> errors_to=NULL
> domain_data=NULL local_part_data=NULL
> localuser director succeeded for ben
> ben@???
> deliver to ben in domain mydomain.org.au
> director = localuser, transport = local_delivery
> >
>
>  - bad address: empty address
> > nowild@???
> system_aliases director: lsearch key=nowild
>   file="/etc/aliases"
> system_aliases director declined for nowild:
> userforward director declined for nowild (not a user)
> user "nowild" for file existence test not found
> localuser director declined for nowild: no such user
> system_aliases_wc director: lsearch* key=nowild@???
>   file="/etc/aliases.wildcards"
> system_aliases_wc director generated ben@???
>   errors_to=NULL transport=NULL
>   uid=unset gid=unset home=NULL
> system_aliases_wc director succeeded for nowild
> system_aliases director: lsearch key=ben
>   file="/etc/aliases"
> system_aliases director declined for ben:
> userforward director: file = .forward
> set uid=0 gid=0 euid=1001 egid=1001
> successful stat of /home/ben/.
> /home/ben/.forward not found
> restored uid=0 gid=0 euid=8 egid=8
> queued for local_delivery transport: local_part=ben
> domain=aethersanctum.net
>   errors_to=NULL
>   domain_data=NULL local_part_data=NULL
> localuser director succeeded for ben
> ben@???
>     <-- nowild@???
>   deliver to ben in domain aethersanctum.net
>   director = localuser, transport = local_delivery

>
>
> > boing-1@???
> system_aliases director: lsearch key=boing-1
> file="/etc/aliases"
> system_aliases director declined for boing-1:
> userforward director declined for boing-1 (not a user)
> user "boing-1" for file existence test not found
> localuser director declined for boing-1: no such user
> system_aliases_wc director: lsearch* key=boing-1@???
> file="/etc/aliases.wildcards"
> system_aliases_wc director declined for boing-1:
> boing-1@??? is undeliverable:
> unknown local-part "boing-1" in domain "mydomain.org.au"
>
>
>
> The problem seems to be something to do with lsearch, but damned if I
> know where I'm screwing it up.
>
> Can anyone offer any pointers? I imagine this must be a pretty simple
> thing, but I can't make sense of the docs :)


--
Kirill Miazine
mailto:km@krot.org
http://km.krot.org/