User Tools

Site Tools


info:mail

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
info:mail [2015/01/26 11:44] – [Mail aggregation aka unified inbox] hartmutinfo:mail [2015/01/29 20:10] – [Sieve] hartmut
Line 26: Line 26:
  
 Important: sieve scripts will only work when formatted with DOS-type CRLF linebreaks. The above extension takes care of that. Important: sieve scripts will only work when formatted with DOS-type CRLF linebreaks. The above extension takes care of that.
 +
 +If you set up a new user, do not forget that dovecot looks for a .dovecot.sieve script in that user's home directory (which may be also a symlink to an include script in a sieve folder).
  
 For specific information about managing sieve on antiguru.de look at [[moritz:antiguru.de|moritz:antiguru.de]]. For specific information about managing sieve on antiguru.de look at [[moritz:antiguru.de|moritz:antiguru.de]].
Line 39: Line 41:
 ==== TLDR; ==== ==== TLDR; ====
  
-Now that the system wide setup is  working, it is simple to add a service that is polling an external inbox into your user's IMAP inbox here. Just create a file called .fetchmailrc in your user directory and adjust the permissions so that fetchmail is going to accept them.+Now that the system wide setup is  working, it is simple to add a service that is polling an external inbox into your user's IMAP inbox here. Just create a file called .fetchmailrc in your user directory and adjust the  
 +permissions so that fetchmail is going to accept them. 
 +<code> 
 +  $ touch ~/.fetchmailrc 
 +  $ chmod 0600 /etc/fetchmailrc 
 +</code> 
 +Then, edit this file to match your credentials for the inbox you want to poll: 
 +<code> 
 +#log to system log - enable after verifying your setup 
 +#set syslog 
 +poll pop.gmx.net protocol pop3: 
 + username "XXXXXX" password "..........", is someuser here smtphost localhost/2345 
 +  # use secure connection relying on CA certificates 
 +  ssl 
 +  # do not delete from server (for testing) 
 +  keep 
 +  # get all messages, not just the ones that arrived after the last poll (use this after commenting out keep) 
 +  #fetchall 
 +</code> 
 +Now, run fetchmail verbosely: 
 + 
 +  $ fetchmail -v 
 + 
 +and check the output. If all is well, change the .fetchmailrc to delete messages from the remote inbox and log to system log, and add it to your crontab, so that it will be executed regularly by the system. 
 + 
 + 
 +  $ crontab -e 
 +   
 +Add a line like this to your crontab: 
 +<code> 
 +*/5 * * * * /usr/bin/fetchmail &> /dev/null 
 +</code> 
 +(this will poll every 5 minutes). Then, save and exit the editor. Now, the fetchmail job will run unattended as set in the crontab. 
 + 
 +Once this works, one could filter mail using the sieve method described above. 
  
 +==== For the administrator ====
  
 +To fine-tune the setup, there are some things to be taken into account:
 +  * spam scores: In /etc/amavis/50-user, we define numerical spam score levels. The sa_tag2_level_deflt variable lets the spam filter decide if a mail is to be considered SPAMMY. This variable is set to 4.51 on our server at the time of writing, which may have to be adjusted after a test period.
 +  * spam from the inboxes polled by fetchmail will be silently deleted when the score of sa_kill_level_deflt (now 20) is reached. You might want to review the logs for some time to look for false-positives being discarded.
 +  * on the server, the rewriting of the subject lines of messages considered spam has been disabled. This makes it easier to deal with false positives. Just move them out of the spam folder.
 +  * learning: do not delete true spam messages. After collecting lots of them, they should be used to train the spam filter.
 +  * Ports: now, all clients submitting messages on port 465 (smtps) are considered local. Check if this is a valid assumption. If not, modify the system to accept these submissions on port 587 (submission). See below.
  
 ==== Setup details  ==== ==== Setup details  ====
info/mail.txt · Last modified: 2024/02/20 12:46 by hartmut

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki