procmail
[Top] [All Lists]

Best solution to prevent mail loops?

1999-06-25 17:54:23
Greets,

I need to devise a scheme in which procmail pipes a piece of
administrative email to a script which may or may not alter the message,
but then the message needs to be sent on its merry way to the intended
recipient.  How do I keep from creating an endless mail loop in this
instance?

Sender (usually a logfile of somekind) -> procmail (stores an umolested
copy and forwards the other) -> script (in some cases needs to abridge the
message, in others, just needs to forward it onto the recipient (root) ->
recipient.  What's the most robust and elegant way to ensure that when the
newly modified (or not) message is sent from the script, that it doesn't
go through the script again, and again, and again...

One solution I was considering, was to flag the message in such a way, so
that procmail just delivers it.  What's the best way to flag a message.
I'd prefer not to change the subj line.  I get the impression that X-loop
is some kind of flag to sendmail that warns of potential mail loops.  Is
this the case?

Thanks for any help,
Shane

-------------------------------------------------------------------------
Shane M. Fisher
Student Intern, Administrative Computing Services,
Western Washington University
EMail: fishers(_at_)admcs(_dot_)wwu(_dot_)edu Ext:3362
-------------------------------------------------------------------------



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