Help. Script autoblock spam flag

Started by Augusto22xb, April 07, 2020, 12:41:24 PM

Previous topic - Next topic

Augusto22xb

Hi,

Is it possible to create a script that sees all the emails in the spam folder and adds the postfix blacklist?

I receive a lot of spam from confirmed emails. It's actually normal emails from consulting companies, but I wanted to block them all.


Augusto22xb

Hi,

I have already used and configured my Spamassassin. But I wanted a way for the server to "learn" that when I throw an email in the SPAM folder, it will assimilate other similar emails. Similar to gmail that "learns" the types of emails that are SPAM.

By default all emails that Spamassassin thinks is SPAM, it will only replace the header with ***** SPAM ***** and will appear in the inbox. How to send this email marked with ***** SPAM ***** to the SPAM folder?

rcschaff

Google is your friend.


https://serverfault.com/questions/764641/spamassassin-dovecot-and-postfix-move-spam-to-folder
QuoteTo manage filter rule you can use sieve on dovecot. You can put it as global sieve or per user sieve.

For global sieve use configuration in /etc/dovecot/dovecot.conf :

sieve_global_path = /home/vmail/sieve/dovecot.sieve
For sieve per user use configuration :

sieve = /%Lh/sieve/dovecot.sieve
which %Lh===dovecot will change it to user mailbox dir

This is example for sieve files content:

if header :contains "*****SPAM*****" "YES"
{
    fileinto "Junk";
    stop;
}
Google Hangouts:  rcschaff82@gmail.com

ejsolutions