Re: [Exim] Virtual Email and Auto Reply

Top Page
Delete this message
Reply to this message
Author: Tabor J. Wells
Date:  
To: kimor79
CC: exim-users
Subject: Re: [Exim] Virtual Email and Auto Reply
On Thu, Aug 28, 2003 at 10:27:56AM -0700,
kimor79@??? <kimor79@???> is thought to have said:

> I have Exim 4.20 running on FreeBSD 4.8 which forwards all incoming mail
> to an exchange server behind a firewall. I have a question about setting
> up auto-replies and filters for virtual users.
>
> Would it be possible to have a list (external file) that has names in it
> (abuse, noc, root, support). And then a directory with files for each name
> in the list. Each file would have text for an auto reply (or better yet a
> procmail recipe to perform additional tasks). Basically this is similar to
> localusers with a .forward file, but I do not want to create a localuser,
> instead I want the lookup to happen against a file.
>
> The email would also have to be passed on the exchange server.


I use the following router and transport to do this:

# Autoresponder router
autoresponse:
driver = accept
domains = example.com
local_parts = dbm;/etc/exim/db/autoresponders.db
retry_use_local_part
transport = autoresponder
unseen


# Autoresponders transport
autoresponder:
driver = autoreply
from = ${lookup{$local_part-from}dbm{/etc/exim/db/autoresponderdata.db}}
reply_to = ${lookup{$local_part-reply}dbm{/etc/exim/db/autoresponderdata.db}}
once = /var/log/exim/autoresponders/$local_part.once
once_repeat = 7d
log = /var/log/exim/autoresponders/$local_part.log
file = ${lookup{$local_part-response}dbm{/etc/exim/db/autoresponderdata.db}}
to = $return_path
subject = ${lookup{$local_part-subject}dbm{/etc/exim/db/autoresponderdata.db}}

Where autoresponderdata.db contains sets of headers like:

###########################################################################
#
# Careers
#
careers-from: My Company Careers <nobody@???>
careers-reply: My Company Careers <careers@???>
careers-subject: AutoReply: My Company Careers
careers-response: /etc/exim/txt/careers.response
###########################################################################
#
# Abuse
#
[snip]

And autoresponders.db contains a list of local_parts that autoresponders
exist on. Because of the unseen in the router the mail will fall through and
go to it's intended destination after the autoresponse fires.

The file referred to in *-response above contains the body of the email I
send in reply for each reply.

Tabor

--
--------------------------------------------------------------------
Tabor J. Wells                                     twells@???
Fsck It!                 Just another victim of the ambient morality