On Saturday 29 May 2004 23:10, Leon Stedman wrote:
On Wed, 26 May 2004, Graham Trott wrote:
I'm trying to write a mail filter shell script to be used from KMail, whereby each incoming mail message will be piped through it. The filter needs to read each line of the message and then write it back suitably modified.
Are you mad? Messing with mailboxes in this way will make strong men weep! There's things such as file locking, and file permissions, to be considered and you may lose all your e-mails or make them all unreadable.
Take a long and careful look at procmail this may be able to do what you want directly or it can call an external program.
Leon Stedman. (Not a bash expert!)
I was hoping to avoid procmail as the syntax is so impenetrable. But I don't intend to go anywhere near the mailbox, merely attach a filter to KMail. My server is already catching a lot of spam, but even with 90% accuracy that still lets through ten or more a day so something more drastic is needed. I know bogofilter and spamassassin can be set up to take a stream from KMail and return it back again with suitable modifications to indicate spam or not. I'd like to do something similar but using different criteria based on a list of approved sender addresses.
-- GT