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
Assumpte: Re: [exim] aliases, :fail:, include text from a file?
On Wed, 8 Mar 2006, Troy Engel wrote:

> Can't seem to figure out the best way to do this; searching the mailing lists
> has at least told me :include: won't work. What's the cleanest way to include
> the text from a file in a :fail: from /etc/aliases ?
>
> E.g., instead of:
>
> job-1234: :fail: Sorry, the job has been filled
>
> to:
>
> job-1234: :fail: < /etc/mail/jobfilled.txt
>
> Basically for things like closed jobs (among other one-time tear off aliases)
> we want to reply with a nicely formatted message, and not have to try and keep
> the entire text in /etc/aliases.


In your aliasing router you probably have something like

data = ${lookup{$local_part}lsearch{/etc/aliases}}

Try changing it to

data = ${expand:${lookup{$local_part}lsearch{/etc/aliases}}}

and then you can use

job-1234: :fail: ${readfile{/some/file}{}}


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