Re: [exim] ACL rewrite

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Searcher
Date:  
À: exim-users
Sujet: Re: [exim] ACL rewrite
I tried to use your last suggestion but to no avail
If I understand it correctly though, it does not rewrite anything but sends
the email to the *new* recipient?

I tried couple (zillion) of other things with my previous settings and
suddenly realized that the config file number is actually a sequential order
how the files are being loaded (dummy) and managed to get it working by a
quite simple, eh:
> 30_exim4-config_check_rcpt

set acl_m7 =
${lookup{$local_part@$domain}lsearch{/etc/exim4/sc_clients}{$value}{}}
> 31_exim4-config_rewriting

*@*    $local_part@$acl_m7    Ffrsq


Where /etc/exim4/sc_clients uses the alias format
recipient@???: new_sender_domain

And this does exactly what I was after: if the recipient is in the alias
file it rewrites the sender, if the recipient is not in the list nothing
happens.

Thank you for all your help Bill
But if you still think I'm doing it wrong and have the patience to explain
it - I'm all yours

Thanks
-src-


-----Original Message-----
From: exim-users-bounces@??? [mailto:exim-users-bounces@exim.org] On
Behalf Of W B Hacker
Sent: Thursday, May 15, 2008 20:45
To: exim users
Subject: Re: [exim] ACL rewrite

Searcher wrote:
>> - all recipients to be handled are your clients
> Yes they are
>> - all affected deliveries are 'local'.
> None of the deliveries are local, this is just a forwarder of emails to be
> modified or to be left untouched - the only purpose of this instance of

exim
> is to sort emails 2 ways

*snip*

- Dump all the acl stuff and single-recipient limit stuff.

- pick up the 'default' system_aliases router:

====

system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
user = mailnull
group = mail
file_transport = address_file
pipe_transport = address_pipe

=====

rename it from "system_aliases:" to, for example "probationary:"

Change the path and filename {/etc/aliases} in

" data = ${lookup{$local_part}lsearch{/etc/aliases}}"

to some other /path/filename that Exim's 'group' can read, and that your
appointed admin (person or script or web interface) can write to.

Example ownership: specialadmin:mail

Use a script, web interface, SQL DB trigger, or POT editor to put
those-who-are-to-be re-written into that new file and take them out later.

Use the conventional alias file format:

recipient[1]@our.domain.special.domain: recipient[1]@our.domain
.
.
.
.

recipient[n]@our.domain.special.domain: recipient[n]@our.domain

Delete them or comment them out when they are off probation.

No need to restart Exim.

No need to do a 'newaliases' or such - Exim will read the specified file
directly, not a db/cdb of it.

Place this ahead of whatever router handles those who are no longer to
be re-written - e.g. 'normal' folks.

AFAIK, that relieves you of the need to re-write headers manually at all.

KISS. You *could* just use the stock router and /etc/aliases file,
though on ownership/perms and location grounds alone, I'd suggest not
mixing them.

HTH,

Bill


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/