[Esa-l] Revised sanitizer-on-relay nano-HOWTO

John D. Hardin jhardin at wolfenet.com
Wed Jul 26 20:05:40 PDT 2000


 John Hardin KA7OHZ   ICQ#15735746   http://www.wolfenet.com/~jhardin/
 jhardin at wolfenet.com      pgpk -a finger://gonzo.wolfenet.com/jhardin
  768: 0x41EA94F5 - A3 0C 5B C2 EF 0D 2C E5  E9 BF C8 33 A7 A9 CE 76 
 1024: 0xB8732E79 - 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
  "Bother," said Pooh as he struggled with /etc/sendmail.cf, "it never
  does quite what I want. I wish Christopher Robin was here."
				-- Peter da Silva in a.s.r
   95 days until Daylight Savings Time ends
-------------- next part --------------
Implementing procmail on a sendmail 8.8.8 gateway:
(Note: This is still undergoing testing and refinement)
<jhardin at wolfenet.com>

1. Add the following delivery agent:

Mprocmail,      P=/usr/bin/procmail, F=DFMmShu, S=11/31, R=21/31, T=DNS/RFC822/X-Unix,
                A=procmail -m MAIL_FROM="$_" MAIL_TO="$u" $h


2. Add the following to ruleset 0, between the "handle virtual
users" and "short-circuit local delivery" stanzas:

# pipe through procmail for processing
R$*<@example.com>$*     $#procmail $@/etc/procmail/filter.rc $:$1 at example.com.procmail$2
R$*<@$*.procmail>$*     $1<@$2>$3

Vary the domain name and script name (/etc/procmail/filter.rc) for your needs.

If you are relaying mail for multiple domains, the following alteration **may** work:

R$*<@$=w>$*     $#procmail $@/etc/procmail/filter.rc $:$1@$2.procmail$3


3. Here is a sample filter.rc file:

# procmail rules to filter mail on a gateway


# other configuration stuff here as well


* ^From:.+\/[^ ,]+@[^ ,]+

:0                              # pass along all other mail
! -oi -f "$FROM" "$MAIL_TO"

More information about the esd-l mailing list