Differences
This shows you the differences between two versions of the page.
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 09:01] – [future improvements] Pascal Suter | setup_basic_mailserver_with_postfix_dovecot_sieve [02.01.2020 11:57] – [proxmox mail gateway] Pascal Suter | ||
---|---|---|---|
Line 468: | Line 468: | ||
* 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 | + | ==== tag and deliver spam instead of quarantine |
- | === Bayesian learning by moving | + | I'm not sure I or my users would be happy with waiting for reports to find out why a recently sent mail did not reach them. after all it' |
- | in order for proxmox' | + | |
- | some information i will need to do this: | + | First you need to make sure that spam is no longer quarantined but instead marked and forwarded. |
- | * the command on PMG to submit a ham or spam to the learning system | + | |
- | * 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:// | + | |
- | === tag and deliver spam instead of quarantine === | + | you can either mark an email by modifying its subject |
- | I'm not sure I or my users would be happy with waiting for reports to find out why a recently sent mail did not reach them. after all it's always a good feeling if you can tell someone on the phone that you didn't find their email in your spam folder either, to convince them that they might have had a typo in your email address :) .. | + | |
- | i've started this already. First you need to make sure that spam is no longer quarantined but instead marked | + | to create it, go to the ''Mail Filter--> |
- | in the PMG web interface click on '' | + | next we need to make sure that all spam mail is tagged with this header field instead of quarantined. |
+ | |||
+ | in the PMG web interface click on '' | ||
now on to your postfix mail server.. we need to add a global sieve rule to dovecot that will move spam into a spam folder.. edit ''/ | now on to your postfix mail server.. we need to add a global sieve rule to dovecot that will move spam into a spam folder.. edit ''/ | ||
Line 492: | Line 490: | ||
require [" | require [" | ||
- | if header :contains "X-SPAM-LEVEL" { | + | if header :contains "x-spam-mail" "yes" { |
| | ||
stop; | stop; | ||
Line 498: | Line 496: | ||
EOF | EOF | ||
</ | </ | ||
- | ** this filter won't compile.. i need to fix this!** | ||
now compile the sieve filter: | now compile the sieve filter: | ||
sievec / | sievec / | ||
+ | lastly restart dovecot to re-read the config we altered bove | ||
+ | systemctl restart dovecot | ||
+ | to test, send an email from outside to your mail account with the following line in the body: | ||
+ | < | ||
+ | XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X | ||
+ | </ | ||
+ | |||
+ | ==== future improvements ==== | ||
+ | === Bayesian learning by moving mail to junk folder === | ||
+ | in order for proxmox' | ||
+ | |||
+ | some information i will need to do this: | ||
+ | * the command on PMG to submit a ham or spam to the learning system is < | ||
+ | * 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:// | ||
+ | |||
==== adjustments to postfix settings on our mailserver ==== | ==== adjustments to postfix settings on our mailserver ==== |