Re: [exim] forwarding based on subject line.

Pàgina inicial
Delete this message
Reply to this message
Autor: W B Hacker
Data:  
A: exim-users
Assumpte: Re: [exim] forwarding based on subject line.
Servando Garcia wrote:

> Hello List
> I need to forward emails based on the subject line. I just started this
> job , today to be exact, so I am not completely sure of the
> configuration of the server. I am sure that the mail application is Exim
> and that my new employer wants to forward emails based on the subject
> line. I have been reading the manual but seeing as it is getting close
> to go to work I don't have time to finishing reading.
>
> Thanks in advance.
> Sam Garcia.
>


"First, do no harm.."

If you cannot wangle enough time to read the manual, at least
save a copy of, then print out the Exim configuration file.

Try to understand what is already in-place, then read at least
the manual sections on the command-line debugging and testing tools.

On FreeBSD, 'configure' will ordinarily be found:

/usr/local/etc/exim/configure

On Linux, it could be anywhere the distro-maker chose to put it
on a given moon-phase - split into several pieces on some Debian
generations, and 'managed' by some intermediate kit.

Exim configuration is about as flexible as anything in MTA-land,
and you can shoot both legs off at the armpits if what you
introduce is at odds with what your predecessor has done.

That said, you 'probably' want to craft a router/transport set
that looks for the subject(s) in question - which can be a
one-shot singularity, or lookup of an exact or
partially-wildcarded entry in an arbitrarily long list or DB of
subjects. It can also be case-sensitive - or not, and you can
use regular expression matches as complex as you care to make
them as well as wildcard.

That router will have to preceed any other router that might
match the traffic in question, else the message will have gone
out another door before it ever reaches the 'custom' router.

The subject can be recovered from the variable:

$header_subject:

do not forget the terminating ":"

You can also test for the subject well before reaching the
routers, add a custom header, and work against that header, as
your setup may already have the subject being re-written, for
example with '***SPAM***' inserted.

While the 'original' subject is preserved, and Exim knows the
difference (if asked) you may become more confused than Exim if
trying to troubleshoot by looking at less than the full headers.

Whatever else you do, use a test account, and let the 'live'
traffic alone until you are satisfied with the tests.

Better to keep doing what is working for a while longer than to
divert *all* the traffic 'coz you negated a positive test or the
reverse...

BT,DT,GTTS

HTH,

Bill Hacker