OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Bugtraq archives for 3rd quarter (Jul-Sep) 1994: Re: Mail flags for using procmail instead of /bin/mail?

Re: Mail flags for using procmail instead of /bin/mail?

Adam Shostack (adambwh.harvard.edu)
Fri, 30 Sep 94 18:14:13 EDT

Jim Ault wrote:

| Could someone post some suitable lines with proper flags to give
| procmail that I could include in sendmail.cf ? We run sendmail 8.6.9
| on sunos 4.1.3, and we have procmail already installed.


This is taken from procmail3.06/examples/advanced.  I chose not to go
with the h flag.  Flag meanings are added where the flags are
different.  Also, if you're running 8.6.9, you might want to add plus
addressing.  The directions in the advanced file don't work, since
8.6.9 gives you many routes to get to Mlocal.  Warrantied to work or
your money back.



# flags different are
#  S dont reset ID
#  !h preserve uppercase in hostname
#  P need return-path header
#  f delivery agent adds -f to argv
#  r delivery agent adds -r to argv
#  m multiple recipients possible

Mlocal, P=/software/bin/procmail, F=lsSDFMPfn, S=10, R=20/40,
        A=procmail -a $h -d $u

# replaces:
# Mlocal,       P=/bin/mail, F=lsDFMrmn, S=10, R=20/40,
#               A=mail -d $u

---------plus addressing -----------------

	The following changes seem to work for me.  All lines with a
++ were added manually.  The others are there as reference points.


# short circuit local delivery so forwarded email works
R$+ <  $=w . >         $: $1 <  $2  $H >             first try hub
R$++$* < $+  $+ >      $#local $$2 $: $1              yep+arg ....
R$+ < $+  $+ >         $#local $: $1                   yep ....
R$++$* < $+  >         $#local $:  $1                 nope, local address+
R$+ < $+  >            $#local $:  $1                 nope, local address

# modified for plus addressing.
# handle locally delivered names
R$=L                    $#local $:  $1                 special local names
R$++$*                  $#local $$2 $: $1              local argument
R$+                     $#local $: $1                   regular local names