Image

Imagebeknatok wrote in Imagelinux

E-mail header parser

Does anyone know where I can locate an e-mail parsing script/snippet? PHP is preferable, but I can deal with shell or perl scripts too. I want to be able to take a standard 'nix mailbox, and for each message, pull out all of the various portions of the header.

For the curious, I'd like to be able to take all of my incoming spam, which is already filtered into a separate box, and try and identify common originating networks and/or mail servers, and blacklist them.