How do I set up an email server that automatically maintains a list of previous recipients?
- by hsivonen
I want to set up an email server with the following characteristics. What software (besides bogofilter and clamav that I'm naming) should I use and what HOWTOs should I read?
The server should run some flavor of Linux that's as low-maintenance as possible and self-updates for security patches in a timely fashion. (Debian stable?)
When email is sent, all the recipients are stored in the list of previous recipients maintained by the server.
Scan incoming messages with clamav and treat as spam if it contains viruses.
When email arrives (if it passed clamav), if the sender is on the list of previous recipients, bypass spam filter.
If the List-Id header names a mailing list on a manually maintained list of known-clean mailing lists, bypass spam filter and deliver into a mailbox depending on the mailing list name.
Email that wasn't from previous recipients, manually white listed domains or mailing lists gets filtered by bogofilter. Spam goes into a spam mailbox.
Email considered to be ham should automatically be fed to bogofilter training as ham.
Email considered to be spam (incl. messages with viruses) should be automatically fed to bogofilter training as spam.
There should be mailboxes for false ham and false spam that an IMAP client can move email into so that the server retrains bogofilter appropriately.
Email sending requires SMTP over SSL.
Email reading requires IMAPS.
Should I also want to use SpamAssassin in addition to bogofilter?