Monthly Archive for October, 2008

Maildrop: Generate accept-rule for your friends email address

I wanted to create a nice rule in my SPAM-filter, accepting emails from my friends.
I filter my mails after spam flagging, by making maildrop do the delivery to each mailbox on my system.
I have a copy of all my outgoing emails on my imap server in Maildir format. The folder is called Sent. I’m going to create a filter for maildrop which will accept mails from any of the email addresses I’ve sendt email to.

The command below is run in /@PathTo@/vpopmail/domains/@Domain.Name@/@MailboxName@/Maildir/.Sent/cur

fgrep -h "To: " * | grep -v "Reply-To: " | grep "^To: " | sed s/To:\ //gi | sed 's/\,/\
/gi' | cut -d\< -f2  |cut -d\> -f1 | grep "@" | sed s/\ //gi |sort | uniq | xargs | sed 's/\ /\/ \|\| \/\^From: /gi'

Continue reading ‘Maildrop: Generate accept-rule for your friends email address’