Re: Outgoing mail filters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <glynn.clements@xxxxxxxxxx>
-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux