On 13 Mar, Ralf(_dot_)Gross(_at_)STZ-Softwaretechnik(_dot_)de wrote:
| our company is changing from M$ Exchange to LotusNotes (don't know if I
| should laugh or cry...). At the moment there is a forward from the new
| NotesAccount to our old Exchange mailbox, where we (LinuxUsers) fetch our
| mail via IMAP. Since mail is forwarded to the Exchange Server there are
| multiple @ that are added to the From: Field. It looks like this:
| bar(_dot_)foo(_at_)ourdomain(_dot_)com@domain(_at_)other_domain (domain and
| always the same...)
| The reponsible people told us that this is a problem with the "notes
| connector" (or whatever). Now I'm looking for a way to filter the part
| after foo(_dot_)bar(_at_)domain(_dot_)com at the beginning of my procmailrc,
| From:-field is displayed correctly.
| Any idea?
I'm not sure I understand this. In your example above is
"bar(_dot_)foo(_at_)ourdomain(_dot_)com" the content that you want remaining?
this should work:
| formail -i "From:$NEWFROM"
Note there is no space in "From:$NEWFROM", the expected space is there
from the match operator on the condition line above. This will preserve
an Old-From: field. If that's unnecessary change the -i to -I.
If I haven't understood correctly, I think you need to answer the
following questions. If domain and other_domain are always the same,
they could be represented as "@domain(_at_)domain" right? And are they
always the same for every message, or are they same for any one message
but vary from message to message? Real examples with real domain names
are almost always preferable to fictional ones.
Don Hammond \ / ASCII RIBBON CAMPAIGN
Raleigh, NC US X AGAINST HTML MAIL,
/ \ AND NEWS TOO
procmail mailing list