On Sat, Jun 12, 2004 at 09:05:11PM +0200, László 'GCS' Böszörményi wrote: > Hi, > > I am looking for a command line based program, which can grep the email > address/domain from the 'From:' field of a mail message; and based on the > invokation it can write the address into separate files like > whitelist/greylist/blacklist. I would like to filter based on that file, so > it should have one address per line format. > Anyone knows one?
In ~/.muttrc: macro index Y "| grep '\^From:' | sed -e 's/^.*\<\\([EMAIL PROTECTED])>.*$/\\1/' >> ~/addresses" should append the From: address to the file ~/addresses when hitting 'Y' in the index view. But _only_ if the address is surrounded by angle brackets. Regards Matthias -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]