procmail
[Top] [All Lists]

Re: writing in mbox file after formail command.

2005-02-09 04:12:28
salut,

thanks for your reply,
I changed my line in /etc/procmailrc to :

  OTRE=`formail -x X-Original-To: | /bin/sed -e "s/@.*//" -e "s/\ //"`

but it still doens't work.
the original header is : 

================================================================================
From root(_at_)el38sr009(_dot_)momchy(_dot_)com  Wed Feb  9 11:38:34 2005
Return-Path: <root(_at_)el38sr009(_dot_)momchy(_dot_)com>
X-Original-To: 0251003403(_at_)mobile(_dot_)eliot(_dot_)com
Delivered-To: 0251003403(_at_)mobile(_dot_)eliot(_dot_)com
Received: from momchy.com (localhost [127.0.0.1])
        by EL38SR009.momchy.com (Postfix) with SMTP id E44E4D9
        for <0251003403(_at_)mobile(_dot_)eliot(_dot_)com>; Wed,  9 Feb 2005 
11:38:34 +0100 (CET)
Message-Id: <20050209103834(_dot_)E44E4D9(_at_)EL38SR009(_dot_)momchy(_dot_)com>
Date: Wed,  9 Feb 2005 11:38:34 +0100 (CET)
From: root(_at_)el38sr009(_dot_)momchy(_dot_)com
To: undisclosed-recipients:;
================================================================================

The problem is probably in the sed command as without sed the variable
contains the value of X-Original-To header field.

now I use :

* MATCH ?? ^^\/[a-z0-9]+

as suggested by Ruud H.G. van Tol's email
and it works, I have the right username in $OTRE.

=> merci pour le coup de main, mais j'aimerai bien comprendre pourquoi cette
commande ne marche pas.


Selon Michelle Konzack <linux4michelle(_at_)freenet(_dot_)de>:

Salam Mohamed,

Am 2005-02-08 17:56:44, schrieb Mohamed Badri:
Hi,

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

It's quite simple, but after a lot of modifications, it still don't work.
the email address is in "X-Original-To" header field.

Can you send the FULL "X-original-To:" Header line ?

I have to use " instead of ' and the Header with : and a <SPACE> must
be quoted in sed like

    OTRE=`formail -x X-Original-To: | /bin/sed -e "s/@.*//" -e "s/\ //"`

what's wrong with his procmailrc ?

thank's for your help. 

Salam
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)





---------------------------
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