[Exim] Two queries: Address writing and embedded perl

Top Page
Delete this message
Reply to this message
Author: David Pashley
Date:  
To: exim-users
Subject: [Exim] Two queries: Address writing and embedded perl
I have a couple of questions. One about Address rewriting and one about
using the embedded perl to check for viruses.

Address Rewriting

I found a similar problem in the archives, but that was using mysql. I
own my own domain and use different email addresses for different
mailing lists. For example I'm subscribed to exim-users with
exim-users@???, but use david@??? for usual
mail. I can not find a MUA that is clever enough to change the From
address depending on the To address (except perhaps mutt). I therefore
want the MTA to change it. I have the following rewrite rule in my
configuration.

david@???
${lookup{$header_to:}lsearch{/home/david/.mailing-lists}\
                        {$value}fail} frFs


[that should be on 2 lines, but got wrapped in my editor]

.mailing-lists contains:

exim-users@???: exim-users@???
david-test@???: test@???

This seems to work. This message should go through the rewrite.
Does anyone have experience of doing something like this? Are there any
pitfalls to look out for. Will it cope with messages where the mailing
list is CCed?


Embedded Perl

I currently use exiscan to check mail for viruses, but I'm not entirely
happy with the method it uses. I was considering using a perl function
in a condition on a director or router, which returned true or false
depending on whether the mail was infected. It this realistic? Again are
there any pitfalls to lookout for? Would it be bad for the perl function
to change the file in the spool directory?