setup_basic_mailserver_with_postfix_dovecot_sieve

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
setup_basic_mailserver_with_postfix_dovecot_sieve [02.01.2020 01:17] – [proxmox mail gateway] Pascal Sutersetup_basic_mailserver_with_postfix_dovecot_sieve [02.01.2020 11:56] – [future improvements] Pascal Suter
Line 460: Line 460:
   * under "Relay Domains" enter all your domains you want to accept emails for on your mailserver   * under "Relay Domains" enter all your domains you want to accept emails for on your mailserver
   * in the Options tab i've enabled "Verify Receivers" which will verify that the receiver address is actually valid before accepting the email. i've set it to "Yes(550)" to work with my above postfix setup.    * in the Options tab i've enabled "Verify Receivers" which will verify that the receiver address is actually valid before accepting the email. i've set it to "Yes(550)" to work with my above postfix setup. 
 +  * i have disabled Greylisting as this delays mail delivery significantly and that's a bit of a pain if you wait for account confirmation emails or booking confirmations etc. i'll re-enable it if the spam detection rate is too low. 
 +  * also in Options, i have enabled DNSBL and i've entered the following two blacklists to query: ''b.barracudacentral.org,zen.spamhaus.org''. please note that you need to register your dns servers at barracudacentral prior to using them and spamhaus asks you to rsync their database to your own dns if you have a high volume server.. i don't :) 
   * there is no need to configure any transports. this is only needed if you want to route incoming mails for different domains or addresses to different servers.    * there is no need to configure any transports. this is only needed if you want to route incoming mails for different domains or addresses to different servers. 
   * in the networks tab, you can add the network or ip of your mailserver, in case it is not in the same subnet as your filter.. if it's in the same subnet there is no need to add anything here, as the same subnet is allowed to relay through PMG by default.    * in the networks tab, you can add the network or ip of your mailserver, in case it is not in the same subnet as your filter.. if it's in the same subnet there is no need to add anything here, as the same subnet is allowed to relay through PMG by default. 
Line 465: Line 467:
   * for DKIM to work you need to add a TXT entry to your domian's DNS record. you can click on "View DNS Record" to get a copy-paste snippet to paste right into your bind zone file if you're using bind as your name-server.    * for DKIM to work you need to add a TXT entry to your domian's DNS record. you can click on "View DNS Record" to get a copy-paste snippet to paste right into your bind zone file if you're using bind as your name-server. 
   * once all these settings where done, i had to login to the filter via ssh and **manually restart postfix**. otherwise postfix would bind port 25 to 127.0.0.1 only. i guess rebooting the entire filter would fix this issue as well.   * once all these settings where done, i had to login to the filter via ssh and **manually restart postfix**. otherwise postfix would bind port 25 to 127.0.0.1 only. i guess rebooting the entire filter would fix this issue as well.
 +
 +==== future improvements ====
 +=== Bayesian learning by moving mail to junk folder ===
 +in order for proxmox's Bayesian filter to learn and start working you need to provide spam and ham mails. to do this, one needs to copy spam that passed the filter to a temporary location on the proxmox mail gateway and then tell the Bayesian filter that this is spam. it needs at least 200 spam and ham mails to start working. ideally, we should be able to do this by simply moving an email to the spam folder on our imap account and the email should then be submitted to the bayesian filter of PMG automatically.. 
 +
 +some information i will need to do this: 
 +  * the command on PMG to submit a ham or spam to the learning system is <code>sa-learn --spam filename</code>
 +  * a solution on how to use imap sieve filters to trigger a bash script when a mail is moved into a specific folder can be found in the [[https://workaround.org/ispmail/buster/filtering-out-spam-with-rspamd-2/|all mighty ISPmail tutorial]]
 +
  
 ==== adjustments to postfix settings on our mailserver ==== ==== adjustments to postfix settings on our mailserver ====
  • setup_basic_mailserver_with_postfix_dovecot_sieve.txt
  • Last modified: 20.03.2021 07:47
  • by Pascal Suter