procmail
[Top] [All Lists]

Re: extract receivers address from host address and forward message

2003-12-02 15:52:14
On Tue, Dec 02, 2003 at 12:15:21PM +0100, Danielle Rijkeboer wrote:

I made the following procmail script by searching for examples on the
internet and was wondering if this is correct:

:0
#Extract the receivers address from host address
* TO_=`formail -rt -xTo: \
         | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`


Danielle,

While you were searching, too bad you didn't come upon my response from
six weeks ago to the party who first proposed such an ugly pipe.  :-)

Please see
http://www.xray.mpe.mpg.de/cgi-bin/w3glimpse2html/procmail/2003-10/msg00170.html?42#mfs
 

(I went to the list archives and searched for "\| expand \| sed", and
that was the first (most recent) hit.

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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