procmail
[Top] [All Lists]

Re: procmail and sendmail

1997-06-30 08:10:00
From guenther(_at_)gac(_dot_)edu  Mon Jun 30 08:22:07 1997
Thomas Techer Bear <ttb(_at_)kew(_dot_)com> writes:

(An avatar of me, actually, where I was testing procmail.)

...
Given tokens passed for the command line as the -a and -d flags in

Mlocal, P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=10/30, R=20/40,
       T=DNS/RFC822/X-Unix,
       A=procmail -Y -a $h -d $u

How would I match on them in the procmailrc?  Clearly they should be
variable names, but the man pages do not make clear what or how.

The username argument(s) ($u) control who is receiving the mail.  If a
.procmailrc is unsure whom it is running as, it can always examine
$LOGNAME.

No, I need the detail part (which you handle below for me) and the sender.
Upon review (and compare to the UUCP-DOM mailer, not quoted in this message), I 
need 
an additional flag to procmail to give it the sender.

As for the extra argument passed via -a ($h, usually originating in the
+detail of user+detail addresses), that's passed in as $1.  You can
match against it by copying it to a real variable and using the "var
??" condition special:

      OPT = $1
      :0
      * OPT ?? ^^some-value^^
      some-folder

The double carets (not carats, karats, or carrots) anchor the regexp to
match the entire value of the variable, not just part of it.

That's the part I needed, thanks.  I guess I also need to something
like SENDER=$g (need to check the $g, don't have the bat book handy)
on the procmail line in sendmail.cf to get the sender.

--
Drew Derbyshire                 Internet:       ahd(_at_)kew(_dot_)com
Kendra Electronic Wonderworks   Telephone:      617-279-9812

 Overflow on /dev/null; please empty the bit bucket.

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