John R Pierce wrote:
cornel panceac wrote:
talkin' about perl, i remember once i used something called milter for things like this .
milters are plugins for sendmail that are used to filter ALL the mail passing through a given sendmail installation. most commonly used for anti-spam and anti-virus plugins.
You actually could do it with a milter - especially a comprehensive one like MimeDefang that knows how to deal with attachments. But if they are sent to a single known address it probably makes more sense to pipe to a program or use procmail during delivery.