Archiving mails with postfix: how to filter mails?

Posted by Tronic on Server Fault See other posts from Server Fault or by Tronic
Published on 2012-03-25T20:43:11Z Indexed on 2012/03/25 23:33 UTC
Read the original article Hit count: 374

Filed under:

i wanto to implement the following scenario:

we use a postfix mailserver. to archive all old and new mails, i want to setup a second postfix on our fileserver and create a single mailbox "archive". then every mail gets forwarded as bcc to this mailbox automatically. now, i want to create different folders in a maildir structure and let the server move each mail to the right subfolder of the mailbox based on its sender or receiver.

e.g. when we get a mail to one of our employees named "John Doe" at [email protected], the mail should be moved to "Inbox/John Doe Incoming". the same applies when john doe sends a mail, folder would be "Inbox/John Doe Outgoing".

how can i implement this filter behaviour. i heard of Procmail and Maildrop. Which of the two would you prefer? Which is more easy to configure? Any out-of-box solutions here?

thanks in advance!

© Server Fault or respective owner

Related posts about filter