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

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Ben Hardy
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] how to do qmail-style alias partial wildcards?
*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 :)

thanks?





--
Ben Hardy <ben@???>