procmail
[Top] [All Lists]

Re: Removing an address from To & Cc headers.

2010-01-12 09:41:25

Just out of curiosity, what is the *point* in removing this information
and shuffling it around? You are only delivering this mail to a single
recipient? Given that 'To' and 'Cc' headerss are essentially for 
informational purposes by the time the message is delivered to the final 
recipient, there should be no *need* to move addresses from one to the 
other. I can see the possibility that removing an address from headers 
offers some convenience when you want to 'reply all' but not include that 
one address. But maybe that one address could be 'blocked' on the outgoing 
mail server?

- C


On Tue, 12 Jan 2010, Tony K Lindstrom wrote:
: I have this:
: 
: :0
: * ^TO(testipelle|kestipelle|toberemoved)
: {
:         ORIGTO=`formail -c -xTo:`
:         ORIGCC=`formail -c -XCc:`
: 
:         :0fhw
:         | formail -I "To: pelletesti(_at_)some(_dot_)com" -I "Cc: $ORIGTO, 
$ORIGCC"
: }
: 
: :0
: * ^TOpelletesti(_at_)some(_dot_)com
: ! realman(_at_)some(_dot_)com
: 
: 
: It does what it is supposed to do. If matching, it will move all
: recipient addresses to the Cc: header, add a new To header and send it
: to realman(_at_)some(_dot_)com(_dot_)
: 
: 
: But this is not enough. What I need now is a way to do the same as
: above, but also remove all "toberemoved(_at_)some(_dot_)com" email-addresses 
both
: from TO and Cc headers.
: 
: The problem is of course, that the "toberemoved(_at_)some(_dot_)com" address 
could
: show in many different ways: "To Be Removed" 
<toberemoved(_at_)some(_dot_)com> or
: toberemoved(_at_)some(_dot_)com (To Be removed) or whatever.
: 
: And there could also be several recipients in both the To and the
: Cc-headers which shouldn't be removed but all added to the Cc-header.
: Additionally it shouldn't break the Cc -header syntax.
: 
: I have tried to figure out how to use Mail::Address or Email::Address
: packages on perl to accomplish this, but I just not get it. :-( 
: 
: I did a lot of googling and searching through this list, but seems no
: one has tried to do this before.
: 
: 
: 
: 
: 
: 
: -- 
: *** tonyk(_at_)iki(_dot_)fi ***
: * Tony K Lindström *
:  ******************
: 
: 
: ______________________________________________________________________
: This email has been scanned by the MessageLabs Email Security System.
: For more information please visit http://www.messagelabs.com/email 
: ______________________________________________________________________
: ____________________________________________________________
: 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
: 
____________________________________________________________
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
<Prev in Thread] Current Thread [Next in Thread>