[Dovecot] about filtering and dovecot
Hi
I would like to set up a local mailserver but I'm getting lost with all the available options. As I have already decided to use dovecot I hope someone here will be able to point me to the right docs/HOWTO's/...
Here's my wish-list:
- download mail from my ISP's POP3-server
- scan with spamassassin
- scan with ClamAV
- filter messages (mailing lists/sender/...)
- store messages in dovecot
- be able to read messages on my desktop (where all of the above will be running) and on my laptop
- be able to send messages (currently using evolution) from both my desktop and laptop so sent messages are stored in dovecot (the idea is to be able to see all sent messages on both PC's)
I have already created a test-account om my ISP's POP3-server, installed and configured fetchmail and dovecot. Exim has been installed as well but I haven't touched it's configuration yet. Running fetchmail manually collects the mail and stores it in /var/mail/m8ram where dovecot finds it.
So I would like to know (how to find out) how I can achieve 2), 3), 4) and 7).
I have looked around and have discovered that there are many programs that can do some or all of this. But I haven't been able to figure out how to get them to work with dovecot.
e.g. I don't understand what I would have to change to dovecot's config if exim or procmail or whatever moves certain messages to different folders (or even where these folders would be created).
Perhaps I'm missing a HOWTO that explains all this, if so please let me know.
TIA
Bram
# Mertens Bram "M8ram" <bram-mertens@linux.be> Linux User #349737 # # debian testing kernel 2.6.8-1-686 i686 512MB RAM # # 12:40:02 up 26 days, 18:53, 9 users, load average: 0.56, 0.46, 0.29 #
On Thu, 2005-04-21 at 12:56 +0200, Bram Mertens wrote:
I would like to set up a local mailserver but I'm getting lost with all the available options. As I have already decided to use dovecot I hope someone here will be able to point me to the right docs/HOWTO's/...
Its a little off-topic for here, since dovecot ends up being very peripheral to this.
Here's my wish-list:
- download mail from my ISP's POP3-server
thats probably fetchmail (spit).
- scan with spamassassin
- scan with ClamAV
- filter messages (mailing lists/sender/...)
this can be done either in your MTA/MDA config, or you could do it purely with an MDA. The MDA method would just use procmail (probably). You can probably find decent HOWTOs to do this with procmail around. You most likely want to be storing mail in Maildir format for dovecot - I believe this can be done with procmail, but I have never used it to do so...
If you are using the MTA method, and using Exim then have a look at http://www.timj.co.uk/linux/exim.php
That will set you up with the SPAM/Virus scanning. There is a wrinkle - with fetchmail you do not really want to be rejecting unwanted stuff at SMTP time when its coming from fetchmail, since that has problems with SMTP rejection, and you aren't saving bandwidth or preventing yourself accepting unwanted mail in this case.
The filtering into folders can be done using an Exim filter.
Documentation for all of this is on the Exim website and wiki or you can try talking to the Exim list - we rarely bite much.
- store messages in dovecot
- be able to read messages on my desktop (where all of the above will be running) and on my laptop
- be able to send messages (currently using evolution) from both my desktop and laptop so sent messages are stored in dovecot (the idea is to be able to see all sent messages on both PC's)
That should just work. If you want mail on the laptop when disconnected then look at something like offlineimap to sync your server and laptop data set.
I have already created a test-account om my ISP's POP3-server, installed and configured fetchmail and dovecot. Exim has been installed as well but I haven't touched it's configuration yet. Running fetchmail manually collects the mail and stores it in /var/mail/m8ram where dovecot finds it.
Ah - so you are mostly there... although using mbox format.
So I would like to know (how to find out) how I can achieve 2), 3), 4) and 7).
Tim J's guide should help with 2,3 and maybe 4. 7 is a case of having your sent folder set as an imap folder - easy in evolution but needs setting up on your client.
I have looked around and have discovered that there are many programs that can do some or all of this. But I haven't been able to figure out how to get them to work with dovecot.
dovecot is almost irrelevant here - it just works for this...
Nigel.
-- [ Nigel Metheringham Nigel.Metheringham@InTechnology.co.uk ] [ - Comments in this message are my own and not ITO opinion/policy - ]
On Thu, 2005-04-21 at 12:18 +0100, Nigel Metheringham wrote:
On Thu, 2005-04-21 at 12:56 +0200, Bram Mertens wrote:
I would like to set up a local mailserver but I'm getting lost with all the available options. As I have already decided to use dovecot I hope someone here will be able to point me to the right docs/HOWTO's/...
Its a little off-topic for here, since dovecot ends up being very peripheral to this.
I know but since dovecot is the only component of which I'm relatively certain that it's what I'm looking for I posted here.
Here's my wish-list:
- download mail from my ISP's POP3-server
thats probably fetchmail (spit).
Maybe I'm not getting some slang but I get the impression you'd prefer something else. If so why and what? I am by no means married to fetchmail, if there's another tool that will suit my needs and that has some advantages of fetchmail I'd like to here about it.
- scan with spamassassin
- scan with ClamAV
- filter messages (mailing lists/sender/...)
this can be done either in your MTA/MDA config, or you could do it purely with an MDA. The MDA method would just use procmail (probably). You can probably find decent HOWTOs to do this with procmail around. You most likely want to be storing mail in Maildir format for dovecot - I believe this can be done with procmail, but I have never used it to do so...
If you are using the MTA method, and using Exim then have a look at http://www.timj.co.uk/linux/exim.php
That will set you up with the SPAM/Virus scanning. There is a wrinkle - with fetchmail you do not really want to be rejecting unwanted stuff at SMTP time when its coming from fetchmail, since that has problems with SMTP rejection, and you aren't saving bandwidth or preventing yourself accepting unwanted mail in this case.
Again this is probably off-topic but if e-mail arrives at an ISP's POP3-server is there a way to reject mail at SMTP time? From what I'v gathered so far this is only possible when you have your own mail-server (and your own webdomain).
The filtering into folders can be done using an Exim filter.
Documentation for all of this is on the Exim website and wiki or you can try talking to the Exim list - we rarely bite much.
Aha, first page I opened on the wiki (which I must admit escaped my attention until I started looking for it) answers one of my questions: all folders are subfolders of the INBOX. That's probably why there's no need to reconfigure dovecot.
Just for completeness: is there a way to have these folders outside the INBOX (I'm used to this behaviour so I'd like to keep it. But I'll get over it if it would turn out quite difficult to achieve.)
- store messages in dovecot
- be able to read messages on my desktop (where all of the above will be running) and on my laptop
- be able to send messages (currently using evolution) from both my desktop and laptop so sent messages are stored in dovecot (the idea is to be able to see all sent messages on both PC's)
That should just work. If you want mail on the laptop when disconnected then look at something like offlineimap to sync your server and laptop data set.
That might be interesting to add in the future, for now I'll be happy to achieve this much.
I have already created a test-account om my ISP's POP3-server, installed and configured fetchmail and dovecot. Exim has been installed as well but I haven't touched it's configuration yet. Running fetchmail manually collects the mail and stores it in /var/mail/m8ram where dovecot finds it.
Ah - so you are mostly there... although using mbox format.
Yes, since I couldn't find a way to get fetchmail to deliver in maildir format. If I decide to use exim for filtering
So I would like to know (how to find out) how I can achieve 2), 3), 4) and 7).
Tim J's guide should help with 2,3 and maybe 4. 7 is a case of having your sent folder set as an imap folder - easy in evolution but needs setting up on your client.
I'm sorry I don't understand, I consider evolution to be the client...
I have looked around and have discovered that there are many programs that can do some or all of this. But I haven't been able to figure out how to get them to work with dovecot.
dovecot is almost irrelevant here - it just works for this...
Thanks Nigel, I'll subscribe to the exim list since your answers have given me hope that I'm on the right track!
Regards
Bram
# Mertens Bram "M8ram" <bram-mertens@linux.be> Linux User #349737 # # debian testing kernel 2.6.8-1-686 i686 512MB RAM # # 13:56:57 up 26 days, 20:10, 9 users, load average: 0.30, 0.13, 0.05 #
On Thu, 2005-04-21 at 14:19 +0200, Bram Mertens wrote:
On Thu, 2005-04-21 at 12:18 +0100, Nigel Metheringham wrote:
On Thu, 2005-04-21 at 12:56 +0200, Bram Mertens wrote:
Here's my wish-list:
- download mail from my ISP's POP3-server
thats probably fetchmail (spit).
Maybe I'm not getting some slang but I get the impression you'd prefer something else. If so why and what? I am by no means married to fetchmail, if there's another tool that will suit my needs and that has some advantages of fetchmail I'd like to here about it.
I've just looked at fetchmail again having managed to avoid it for ages. Its obscure, it loses mail, it does truely stupid things (for example the way it treats the IDLE extension), it doesn't check return codes correctly from IMAP (meaning I'm currently getting mail duplicated). At present I don't know of a good alternative, although someone must have written one considering how crap fetchmail is.
The bit that really scares me is that fetchmail is considered a poster child for the whole open source gun toting community. Umm... that last part was me letting my annoyances get away with me...
I'll now stop the flamefest.
[...snip...]
Again this is probably off-topic but if e-mail arrives at an ISP's POP3-server is there a way to reject mail at SMTP time? From what I'v gathered so far this is only possible when you have your own mail-server (and your own webdomain).
Basically yes. However you can set your mail server up as though it is directly listening on the internet and receiving your external mail directly, but in reality its getting stuff from fetchmail (or a better alternative). If you do this and reject spam at SMTP time you may have problems (for example in my case the machine I was forwarding it to does sender address verification - giving rejections to the recipients in this case[*] - that makes fetchmail barf).
Aha, first page I opened on the wiki (which I must admit escaped my attention until I started looking for it) answers one of my questions: all folders are subfolders of the INBOX. That's probably why there's no need to reconfigure dovecot.
Thats how they appear, and are implemented in Maildir setups. I have never tried to use it with mbox so don't want to make wild guesses here. However the folders (mbox files) will need to be somewhere in your home directory, and will (probably) be mapped in IMAP to appear under INBOX.
[...snip...] [7 is about storing outgoing mail]
7 is a case of having your sent folder set as an imap folder - easy in evolution but needs setting up on your client.
I'm sorry I don't understand, I consider evolution to be the client...
SOrry - yes evolution is a client. As is kmail, mutt.... any of these will need to be configured (or may have as default configuration) to save their sent mail on the imap server.
Thanks Nigel, I'll subscribe to the exim list since your answers have given me hope that I'm on the right track!
OK, although I am an exim developer etc, I think in this case your interests would be best served by using procmail as an MDA of fetchmail (or similar), doing spam scanning, virus scanning and filtering from within that. Pushing stuff through the MTA here is not really gaining you much and probably making things more complex especially as you really need to tune the MTA config to make sure you don't generate strange bounce messages when things go wrong.
Not that I'm saying being on the exim lists are a bad thing :-) I spend far too much of my time looking after them.
Nigel.
-- [ Nigel Metheringham Nigel.Metheringham@InTechnology.co.uk ] [ - Comments in this message are my own and not ITO opinion/policy - ]
On 2005-04-21 13:41:41 +0100, Nigel Metheringham wrote:
- download mail from my ISP's POP3-server
thats probably fetchmail (spit).
getmail-4 : http://pyropus.ca/software/getmail/ http://monsters.rsn.uni-rostock.de./~darix/site/public/settings/getmailrc
maildrop for local sorting: http://www.courier-mta.org/maildrop/ http://monsters.rsn.uni-rostock.de./~darix/site/public/settings/mailfilter
hope this helps
darix
-- irssi - the client of the smart and beautiful people
http://www.irssi.de/
!DSPAM:4267b52784312066250057!
On Thu, 2005-04-21 at 13:41 +0100, Nigel Metheringham wrote: [...]
OK, although I am an exim developer etc, I think in this case your interests would be best served by using procmail as an MDA of fetchmail (or similar), doing spam scanning, virus scanning and filtering from within that. Pushing stuff through the MTA here is not really gaining you much and probably making things more complex especially as you really need to tune the MTA config to make sure you don't generate strange bounce messages when things go wrong.
I've been reading about procmail and exim and the latter appears to be overkill for my situation. I may still look into get and/or maildrop (thanks Marcus) before using this on my main accounts but for now I'll try to set this up.
So far I've configured fetchmail to deliver messages to procmail and the filtering is working fine.
However I don't know what directories the mail should be delivered to and how to configure dovecot to see it there.
I tried the ".some-folder/" notation from the procmail quick start which results in hidden (dir-names starting with a dot) subfolders in ~/Maildir.
What should then be the value of default_maildir in /etc/dovecot/dovecot.conf? (something like /home/%u/Maildir/?)
Not that I'm saying being on the exim lists are a bad thing :-) I spend far too much of my time looking after them.
Perhaps I'll join this list later, right now I'm already having trouble keeping up with the lists I'm subscribed to.
TIA
Bram
# Mertens Bram "M8ram" <bram-mertens@linux.be> Linux User #349737 # # debian testing kernel 2.6.8-1-686 i686 512MB RAM # # 18:42:03 up 30 days, 55 min, 12 users, load average: 0.44, 0.33, 0.18 #
take a look at MailScanner (www.mailscanner.info). The greatest thing since home-brewed beer, IMHO.
Jeff Earickson Colby College
On Thu, 21 Apr 2005, Bram Mertens wrote:
Date: Thu, 21 Apr 2005 12:56:08 +0200 From: Bram Mertens <bram-mertens@linux.be> To: mailing list dovecot <dovecot@dovecot.org> Subject: [Dovecot] about filtering and dovecot
Hi
I would like to set up a local mailserver but I'm getting lost with all the available options. As I have already decided to use dovecot I hope someone here will be able to point me to the right docs/HOWTO's/...
Here's my wish-list:
- download mail from my ISP's POP3-server
- scan with spamassassin
- scan with ClamAV
- filter messages (mailing lists/sender/...)
- store messages in dovecot
- be able to read messages on my desktop (where all of the above will be running) and on my laptop
- be able to send messages (currently using evolution) from both my desktop and laptop so sent messages are stored in dovecot (the idea is to be able to see all sent messages on both PC's)
I have already created a test-account om my ISP's POP3-server, installed and configured fetchmail and dovecot. Exim has been installed as well but I haven't touched it's configuration yet. Running fetchmail manually collects the mail and stores it in /var/mail/m8ram where dovecot finds it.
So I would like to know (how to find out) how I can achieve 2), 3), 4) and 7).
I have looked around and have discovered that there are many programs that can do some or all of this. But I haven't been able to figure out how to get them to work with dovecot.
e.g. I don't understand what I would have to change to dovecot's config if exim or procmail or whatever moves certain messages to different folders (or even where these folders would be created).
Perhaps I'm missing a HOWTO that explains all this, if so please let me know.
TIA
Bram
# Mertens Bram "M8ram" <bram-mertens@linux.be> Linux User #349737 # # debian testing kernel 2.6.8-1-686 i686 512MB RAM # # 12:40:02 up 26 days, 18:53, 9 users, load average: 0.56, 0.46, 0.29 #
Jeff A. Earickson wrote:
take a look at MailScanner (www.mailscanner.info). The greatest thing since home-brewed beer, IMHO.
Jeff Earickson Colby College
I used to run MailScanner, but then I switched to Exim+SA+Sophie. As Exim has now integrated the exiscan patch, it's much easier to set up. In addition, I find it extremely flexible, and uses less resources than MailScanner. In addition, I do not believe MailScanner will reject messages at smtp-time (if the spam score is greater than a threshold, or whatever rules you decide), which can cause problems. If my smtp server accepts the email, it's guaranteed to be delivered, which is how mail servers should be operate. There's no guarantee that a bounce message will ever get to its destination, especially not if it is spoofed, it's just a waste of time.
-- Chris Hills IT Services North East Worcestershire College
On Thu, 2005-04-21 at 14:03 +0100, news.gmane.org wrote:
I used to run MailScanner, but then I switched to Exim+SA+Sophie. As Exim has now integrated the exiscan patch, it's much easier to set up. In addition, I find it extremely flexible, and uses less resources than MailScanner. In addition, I do not believe MailScanner will reject messages at smtp-time (if the spam score is greater than a threshold, or whatever rules you decide), which can cause problems. If my smtp server accepts the email, it's guaranteed to be delivered, which is how mail servers should be operate. There's no guarantee that a bounce message will ever get to its destination, especially not if it is spoofed, it's just a waste of time.
I *absolutely* agree with that *EXCEPT* in the earlier messages in the thread we were talking about redelivery of messages that have already been delivered to his ISP pop server. In this situation SMTP rejection of SPAM is actually a nuisance (although can be coped with presuming fetchmail doesn't louse things up).
We're way off topic for the dovecot list. Feel free to discuss this on the exim list if you want.
Nigel.
-- [ Nigel Metheringham Nigel.Metheringham@InTechnology.co.uk ] [ - Comments in this message are my own and not ITO opinion/policy - ]
participants (6)
-
Bram Mertens
-
Jeff A. Earickson
-
Marcus Rueckert
-
news.gmane.org
-
Nigel Metheringham
-
Robert Cooper