procmail
[Top] [All Lists]

Re: [Q] unreadable From field

1999-01-19 11:00:58
Julien Gilles wrote,

| sometimes I receive mail with header like that :
| 
|  From: 
meulenc/OU=SMTP/DD(_dot_)RFC-822=meulenc#a#rc#f#bel#f#alcatel#f#be(_at_)nsfhh11
| 
| I think it's possible to decode it, and have a correct
| adress. (meulenc(_at_)rc(_dot_)bel(_dot_)alcatel(_dot_)be)
| 
| Perhaps procmail is able to do it, before any other action on the
| message ?

It could, but you'd need a recursive INCLUDERC, so I think that it's worth-
while to fork sed.

 savemetas=$SHELLMETAS
 SHELLMETAS

 :0fwh
 * ^From:.*/.*RFC-822=.*#[af]#
 | sed -e '/^From:/!b' -e 's/:.*RFC-822=\(.*\)@.*$/: \1/' \
   -e 's/#a#/@/' -e 's/#f#/./g'

 SHELLMETAS=$savemetas

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