I am using
Ubuntu 18.04 64 bit
dovecot 2.2.33.2
spamassassin 3.4.1
amavisd
The goal is to run an e-mail server, which I achieved already. I can access the e-mails at the server using Thunderbird and the imap protocol.
For the postfix configuration I followed this tutorial: https://help.ubuntu.com/community/PostfixBasicSetupHowto but using Maildir instead.
Dovecot got configured following:
https://www.linuxbabe.com/mail-server/secure-email-server-ubuntu-16-04-postfix-dovecot https://help.ubuntu.com/community/Dovecot
In addition I installed fail2ban
, which got tested successfully.
The next step is e-mail filtering. Following https://help.ubuntu.com/lts/serverguide/mail-filtering.html.en worked out nicely. Spamassassin is blocking all spam. But acutally I do not want to block it, I just want that spamassassin marks it as spam and that the spam gets redirected into my spam-folder. This is just in case something gets filtered out that was not a spam.
For that I set /etc/amavis/conf.d/21-ubuntu_defaults
:
$final_spam_destiny = D_PASS;
and the subject gets added ****SPAM****
The next step is that dovecot automatically moves this mail to my junk folder. And there I get stuck. I followed this tutorial: https://workaround.org/ispmail/stretch/filtering-out-spam-with-rspamd
and there the part "Sending spam to the Junk folder". But it doesn't work. I have seen that sieve is not working for imap. But I cannot find any tutorial or manual on imap_sieve, that would solve my problem. Does anyone of you has an idea? I also do not find any log entry where I could see that sieve is working (or not)?