Re: [exim] ${if exists{/home/joe/.vacation.msg}}

Góra strony
Delete this message
Reply to this message
Autor: Hans Schou
Data:  
Dla: Cyborg, exim-users
Temat: Re: [exim] ${if exists{/home/joe/.vacation.msg}}
Den 07/16/2012 02:16 PM, Cyborg skrev:
> Am 16.07.2012 13:03, schrieb Hans Schou:
>> Hi
>>
>> I am trying to make it easier for the users to activate the vacation
>> mechanism. My idea was that they should just add a file with the name
>> "vacation.msg" in here home directory, and then remove it or rename
>> when they are back from vacation.
>
> Pls adjust this for your needs, it offers way more options than your
> approach. I.E. from-to-timestamps in the database ;)

looks very interesting.
>
> hide mysql_servers = localhost/DBNAME/DBUSER/DBPASS


OK and that goes into say: /etc/exim4/conf.d/vacation/100_vacation

and also the config below?

>
> ....
>
> autoresponder:
> driver = redirect
> domains = +local_domains
> condition = ${if eq{1}{${lookup mysql{SELECT '1' FROM mail_config
> WHERE address = '${quote_mysql:${local_part}@${domain}}' and type in
> ( 'VACATION') limit 1 }}}{yes}{no}}
> data = "${lookup mysql{ SELECT '|/tools/VacateMessage' FROM
> mail_config as mc where mc.address =
> '${quote_mysql:${local_part}@${domain}}' and mc.type in ( 'VACATION')
> }}"


I don't understand that one. If the user has type='VACATION' then you
execute a script called /tools/VacateMessage

Could it be like:
data = "${lookup mysql{SELECT message FROM mail_config WHERE ...same...}}"


> allow_fail
> allow_defer
> no_verify
> no_expn
> check_ancestor
> unseen
> more
> pipe_transport = address_pipe
> reply_transport = address_reply
> redirect_router = autoresponder
>
> The "Autorepsonder" file could also be a perl script, a bash script,
> php whatever you like OR i.e. the HORDE framework.
> You get the entire message via stdin , parse it and can react to what
> you find.


What is the "Autoresponder" set to in your example above?

> All you have to avoid is writing to stdout, this will cause a
> deliverymessage to the sender. and of course, pls don't get exploited
> by passing something to bash that hasn't to be there. We don't want to
> see Mr <;rm -rf /*;#@help.is.coming.com> remove your server from the
> net ;)

Mr. bad guy :-)



--
Venlig hilsen
Hans Schou
tel:46923438