procmail
[Top] [All Lists]

Searching complete headers

1998-10-13 01:14:53
We are using procmail to filter messages which are sent to the same account
but actually have different domain names, e.g. we have two virtual mail
servers abc.com and def.com and both wanted the address xy.  All messages
sent to either address will therefore be delivered to the xy account.  To
filter the messages we use procmail to look in the To field and if it finds
abc.com it forwards it to abc's account and if it finds def.com it forwards
it to def's mail account.  This works fine most of the time but the problem
is with messages sent from mailing lists and messages which have already
been redirected.  The address of the recipient is not in these cases in the
To field.  Is there any way of using procmail to filter out these messages
properly as well?  As the address of the final recipient must be in the
header somewhere is it possible, for example, to search the whole header for
abc.com or def.com?

Thanks very much

Richard Lewin

<Prev in Thread] Current Thread [Next in Thread>