Autor: Chad Leigh Fecha: A: Exim Mailing List Asunto: Re: [exim] Vacation function
On Feb 20, 2007, at 1:35 AM, Steven Wayne wrote:
> On Mon, Feb 19, 2007 at 11:16:11PM +0100, Stefan Klatt wrote:
>>
>> Hello,
>>
>> what's the best way to implement a vacation function?
>> With a router or with a filter?
>>
>> Mfg.
>> Stefan Klatt
>>
>
> I would say in a .forward file. Either as an Exim filter or a
> regular file
> calling the vacation program.
>
This is more difficult in purely virtual systems without local
users. There is no place to put a .forward or user filter or for the
user to update it.
I have a vacation facility that works out of an ldap db (as are all
mailbox definitions) and works as a router and special transport.
The router checks the mailbox definition in the ldap for the vacation
message flag, and also to make sure the incoming is not a bulk
precedence message. It then hands off to the vacation transport
Here is the router (with some details of the actual ldap lookup
removed or obfuscated)
vacation_msg:
driver = accept
condition = ${if and { {eq {${lookup ldap {some ldap dn stuff
mailAccountName=${local_part},mailDomain=${domain},stuff?mailVacation?
base?}{$value}fail}}{Y}} { ! eq {$h_precedence:} {bulk}}}{yes}{no}}
group = daemon
retry_use_local_part
transport = vacation_autoreply
unseen
user = exim
here is the router transport
vacation_autoreply:
driver = autoreply
from = $local_part@$domain
once = /var/spool/exim/vacation/$domain-$local_part-vacation_once_db
once_repeat = 4d
subject = ${lookup ldap {ldap mumbo jumbo dn stuff mailAccountName=
${local_part},mailNetDomain=${domain}, more dn stuff mailVacatio
nSubject?base?}{$value}fail} ($h_Subject:)
text = ${lookup ldap {ldap dn mumbo jubmbo mailAccountName=$
{local_part},mailNetDomain=${domain},more dn stuff ?mailVacationTe
xt?base?}{$value}fail}
to = $sender_address
I did this ages ago and cannot remember why exactly I chose to do
things this way but it works :-)
best
Chad
---
Chad Leigh -- Shire.Net LLC
Your Web App and Email hosting provider. Tee
chad at shire.net
---
Chad Leigh -- Shire.Net LLC
Your Web App and Email hosting provider
chad at shire.net