It is possible to setup a spam report?

Exim4 and Spamassassin move spam mails to a Spam folder in my mailbox.
I am using Outlook via Pop3 to receive E-Mails. However only the mails in the Inbox are transferred this way. When I login to Roundcube I can see some mails in the Spam folder.
Is it somehow possible to generate a daily spam report or something like this?
So that I see which mails have been moved to the Spam folder? I am afraid that there might be a false-positive. In my current situation I wouldn’t see this mail, unless I login to Roundcube.

While it is certainly a worthwhile feature request, you, or someone, would need to write such a function. You might want to switch to IMAP in your Outlook. If you haven’t used IMAP, you may find yourself wondering why you hadn’t switched from POP sooner.

Thanks. :slightly_smiling_face:

IMAP would indeed be an option, but I do like to not be bothered by limiations of available space on the server. That’s the main reason I’m using POP3.

1 Like

You could modify exim conf so it sends messages marked as spam to you inbox instead of Spam folder but I don’t know whether it is possible to do it per user, this solution will affect all mail users.

First, backup your exim4 conf

cp /etc/exim4/exim4.conf.template /root/

Edit /etc/exim4/exim4.conf.template

Locate section local_spam_delivery and replace this:

directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}/.Spam"

by this (it just replaces .Spam by .)

directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}/."

Save file and restart exim:

systemctl restart exim4

Now, spam messages should arrive to your inbox and you could use Outlook rule to move them to local junk folder (to do that you could use header X-Spam-Status: Yes in outlook rule).

If you want to test whether it works, you can send a mail from an external account with this body and the mail will be marked with the higher spam score:


Note: if you configured your mail domain to Reject Spam, the mail sent with above body won’t reach your inbox because due the high score it will be rejected during smtp session.

I hope this helps.


Somehow I didn’t receive a notification for you post…

Thanks a lot!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.