Re: [exim] Exim4 RCPT ACL

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Tony Finch
Datum:  
To: Steen \"Miravlix\" Poulsen
CC: exim-users
Betreff: Re: [exim] Exim4 RCPT ACL
On Tue, 25 Jul 2006, Steen "Miravlix" Poulsen wrote:

> I have the following rule in an attempt to allow my users to whitelist
> forwarders, but if the mail is for the users alias,
> the /home/xxxx/.forwarders file obviously doesn't exist.
> So how do I catch things after alias has been resolved?


Set the location of the forwarders file in the address_data option on the
router that verifies the existence of local users. e.g.

localuser:
  driver = accept
  check_local_user
  address_data = ${if exists{$home/.forwarders} \
                            {forwarders=$home/.forwarders} }
  transport = local_delivery
  cannot_route_message = Unknown user


Then in the ACL, after verifying the address, the address_data is
available so it can be used to check the file:

FLAG = acl_m0

  require
    verify = recipient


  warn
    log_message = User .forwarders whitelist rule
    hosts       = ${extract {forwarders}{$address_data} }
    set FLAG    = do-not-reject


I hope your users are very technical and diligent because otherwise these
forwarders files are going to be wrong, and if they are ever right they
will become wrong when machines are renumbered.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}