Outgoing mail filters

Outgoing mail filters

am 04.02.2004 17:06:44 von Scott Taylor

Hello all,

I use sendmail and procmail to filter incoming messages for spam and
windoze executable attachments. How can I filter outgoing mail?

Cheers.

Scott.

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Outgoing mail filters

am 04.02.2004 22:52:06 von Glynn Clements

Scott Taylor wrote:

> I use sendmail and procmail to filter incoming messages for spam and
> windoze executable attachments. How can I filter outgoing mail?

One possible approach:

The easy part: change confSMTP_MAILER to a custom mailer (e.g.
procmail invoked on a specialised procmailrc file) which performs the
filtering then re-sends the message. See section 5.4 of the Sendmail
Installation and Operation Guide (op.ps/op.txt) for details on writing
the mailer definition.

The hard (or, at least, awkward) part: preventing loops; you have to
ensure that the re-sent message doesn't get sent back to the filter.
Probably the simplest solution is to run two sendmail daemons (on
separate ports), one which filters and one which doesn't. You can do
it with one daemon, but that involves writing custom sendmail
rulesets.

Other approaches include using sendmail's "milter" API (you probably
wouldn't want to use this directly, but there may be suitable products
which use it to "plug in" to sendmail) or the header-matching features
which were added in 8.10.

--
Glynn Clements
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html