procmail
[Top] [All Lists]

Re: HELP! Processing Cc: field

1996-12-28 14:41:26
In message 
<32BF9278(_dot_)41C6(_at_)galeb(_dot_)etf(_dot_)bg(_dot_)ac(_dot_)yu>you write:
I've got a file with a lot of mail and we have to prepare a list of
addresses coming from From:, Cc: and Bcc: fields. I was able to get out
the first one using formail -r. Since I'm new to procmail and SmartList,
couldn't find a way to parse carbon copy fields (there should be
something for that) and there is no time to read RFC822 and make a
proper parser. I've scanned best_of_procmail (!!), but to no avail.
multigram can get rid of comments in an address, but I still have to
split a list.

This is really *urgent*, so I'll cross post it to both the procmail and
SmartList mail lists (sorry for that).

A sleazy hack, but should work, takes 3 passes:

1 once like you have above, to get the From: addresses
2 then pipe the file through sed, switch all the From:'s with all the Cc:'s
        repeat step 1
3 repeat step 2 with Bcc:

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