Re: [exim] aliases, :fail:, include text from a file?

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Troy Engel
CC: exim-users
Assumptes nous: Finished/FAQ! (Re: [exim] aliases, :fail:, include text from a file?)
Assumpte: Re: [exim] aliases, :fail:, include text from a file?
On Fri, 10 Mar 2006, Troy Engel wrote:

> like this? In my aliases file, I would route the closed job to this user
> somehow?
>
>   job-1234:    jobclosed
>   jobclosed:   <system filter>?


You wouldn't need the jobclosed id in an alias file.

> I'm assuming the actual filter commandfile would go something like:
>
> == snip ==
> # Exim filter
> if error_message then finish endif
> mail \
> subject "Job Closed: ${local_part}@${qualify_domain}" \
> from "do-not-reply@${qualify_domain}" \
> reply_to "do-not-reply@${qualify_domain}" \
> expand file "/etc/mail/jobclosed.txt"
> seen finish
> == snip ==
>
> That part is clear, not sure how I'd hook it up to the exim delivery engine
> though without an actual user...


Yes, that looks OK. You could use a router like this:

some_name:
driver = redirect
local_parts = jobclosed
allow_filter
file = /filter/file
user = exim

I *think* that's all; maybe I've missed something...

Another alternative is to use a router/transport pair; then you don't
need a filter file:

#router
some_name:
driver = accept
local_parts = jobclosed
transport = job_closed

...

#transport
job_closed:
driver = autoreply
to = $reply_address
from = ...
reply_to = ...
expand
file = /the/file/with/the/message/in/it
user = exim

Something like that.       


-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book