By now you will have a fully functional email server. There are further features that you may want to use. Pick what you need.
Fetching and filtering using fetchmail and sieve
Mathias Geat wrote an article on integrating fetchmail and sieve that fits this setup.
Removing old deleted mails
With IMAP you can mark emails as deleted and some email clients will not even show them any more. But the emails are still there and occupy space. Usually there is an option to purge all marked emails but many users do not care. So Michael Weisgerber suggests to run this command frequently via crontab to remove such emails:
$> find /var/vmail -type f -ctime +7 -name '*,ST' -delete
Dovecot renames all deleted emails so that they get a ,ST added at the end of the filename. Adjust the parameter to -ctime as you like. In this example deleted mails older than 7 days are purged.
10 Comments
I find a easy way to use
Submitted by Anonymous (not verified) on
I find a easy way to use fetchmail. But i dont know how to work with variables, so i "hardcoded" my idea :-). Just install fetchmail and create /var/vmail/.fetchmailrc You have to grant vmail own and 710 rights for .fetchmailrc put these lines into: #fetchmail.rc server mail.example.com proto pop3 user username pass password keep mda "/usr/lib/dovecot/deliver -d username@example.net" For me its easier to understand. I am a linux newbie ;-)
Some more info on a fitting fetchmail setup
Submitted by Anonymous (not verified) on
It would be nice to have some more up-to-date info, on what's the best way to implement fetchmail into this mailserver setup. Looks like the info from the article of Mathias Geat is not suitable for the actual Lenny setup any more.
is it possible to use getmail ?
Submitted by Anonymous (not verified) on
Removing old deleted mails
Submitted by Anonymous (not verified) on
I prefer to use the following:
find /home/vmail -type f -ctime +7 -name *,ST -print0 | xargs -0 rm -f
this will work even if user has IMAP folders containing spaces (eg. "Junk E-mail")
Thanks
Submitted by Christoph Haas on
You are right. print0 is pretty important. Fixed it. Thank you.
Cleanup
Submitted by Anonymous (not verified) on
To cleanup the spam-folder I use the following command:
find syntax
Submitted by Anonymous (not verified) on
Since this is an HOWTO for Debain Lenny it's better to use all the facilities that a moder OS gives you.
So instead of using old/compatible syntax, you can use moder GNU find features like -delete
$ find /var/vmail -type f -ctime +7 -name '*,ST' -deleteit's the same, but in a more compact, clear and readable way
Thanks
Submitted by Christoph Haas on
Thanks for the hint. Honestly I wasn't aware that the find command nowadays has a -delete option. Very nice.
dovecot trash plugin
Submitted by Anonymous (not verified) on
hi,
first of all:
thanks Christoph for this great tutorial. I managed to work it out and now have a functioning mail server.
As commented in the "prepare your system" I used PostgreSQL instead of MySQL and few other customizations,
since I don't fancy LAMP at all. if you want I can send you the additions for you to integrate them in this howto.
trash plugin:
There's an interesting dovecot plugin that works with quota and deletes folders' content based on your rules:
http://wiki.dovecot.org/Plugins/Trash
cheers
MySQL db web interface panel
Submitted by Anonymous (not verified) on
Hello,
I've created a simple set of PHP scripts for use with this set up. I don't recommend you expose it to the internet, but it's good for administration by people who don't want to use mysql cli.
http://github.com/jmadler/ispmail-panel
Please email me for any questions, concerns, or patches.