Re: [exim] autoreply vacation complexity troubles

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Kjetil Torgrim Homme
Dátum:  
Címzett: Wolfgang Hennerbichler
CC: exim-users
Tárgy: Re: [exim] autoreply vacation complexity troubles
On Mon, 2007-05-07 at 21:18 +0200, Wolfgang Hennerbichler wrote:
> What I am looking for is the 'personal' implementation (which can be
> found in #Exim filter) but written in exim.conf with the knowlege of
> all personal aliases which are stored inside a db. (I would do it in
> exim filter, but to my knowledge there is no way of querying a DB for
> personal alises in exim filter)


well, I don't think you really need to do that to make it good enough.
here's our router:

vacation:
  driver = accept
  # Accept if the attribute 'tripnoteActive' == 'TRUE' and the LDAP
  # object has a 'tripnote' attribute.  The header Auto-Submitted is
  # documented in RFC 3834.
  condition = ${if and {{eq {${extract{tripnoteActive}{$address_data}}}\
                            {TRUE}}\
                        {!match {$h_X-UiO-Spam-score:}\
                                {ssssss}}\
                        {!def:h_Precedence:}\
                        {or {{!def:h_Auto-Submitted:}\
                             {eqi {$h_Auto-Submitted:}\
                                  {no}}}}}\
                   {${extract{tripnote}{$address_data}{true}}}}
  # Don't send autoreplies to common administrative addresses.
  senders = ! : !^.+-request@ : !^owner-.+@ : !^.+-owner@ : !^postmaster@ : \
    !^listmaster@ : !^mailer-daemon@ : !^root@ : !^.+-admin@ : !^nobody@ : \
    !^.+=.+\\..+@ : !^.+-bounces@
  transport = vacation_message
  unseen


we set $address_data to contain all the attributes for that user from
LDAP early on.

to do a proper personal test, you need to upgrade to 4.67 and use ${map
do to an LDAP (or equivalent) lookup for every address in $h_To: and
$h_Cc:. I don't think it's worth it.

--
Kjetil T.