procmail
[Top] [All Lists]

Re: writing in mbox file after formail command.

2005-02-09 04:13:54
Hi,

I use /etc/procmailrc with procmail 3.22
It works with your line :

* MATCH ?? ^^\/[a-z0-9]+
{ OTRE = "$MATCH" }

do you know why my sed command doesn't work ?
without sed the variable contains the email of X-Original-To header field.

perhabs i can't use the "|" in command.

thank you.

Selon "Ruud H.G. van Tol" <rvtol(_at_)isolution(_dot_)nl>:

Toen wij Mohamed Badri kietelden, kwam er dit uit:

I try to write emails to mbox file after extracting the recipient
in the header with formail.

my procmailrc lokks like that :

Is that /etc/procmailrc, or some (special) user's .procmailrc?

Does your mail-server create copies of the message for each 
local SMTP-Recipient?


-------------------
:0
{
  OTRE=`formail -xX-Original-To | /bin/sed -e 's/@.*//' -e 's/ //'`

  :0
  /var/spool/mail/$OTRE
}
-------------------


   OTRE = 'mohamed'   # or some other default
   :0
   * ^X-Original-To:.*\/[a-z0-9]*@
   * MATCH ?? ^^\/[a-z0-9]+
   { OTRE = "$MATCH" }


# Then, if you are not really sure that 
# /var/spool/mail/$OTRE is an mbox-file:

   :0
   ! $OTRE

# Otherwise

   :0:   # don't forget locking
   /var/spool/mail/$OTRE


-- 
Grtz, Ruud

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail






---------------------------
http://webmail.netbadri.com

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail