Control Web Panel

WebPanel => E-Mail => Topic started by: Augusto22xb on April 07, 2020, 12:41:24 PM

Title: Help. Script autoblock spam flag
Post by: Augusto22xb on April 07, 2020, 12:41:24 PM
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.
Title: Re: Help. Script autoblock spam flag
Post by: Sandeep on April 07, 2020, 01:15:44 PM
why not using Spamassassin
http://wiki.centos-webpanel.com/how-to-configure-spamassassin
Title: Re: Help. Script autoblock spam flag
Post by: Augusto22xb on April 07, 2020, 05:34:51 PM
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?
Title: Re: Help. Script autoblock spam flag
Post by: rcschaff on April 08, 2020, 02:14:12 PM
Google is your friend.


https://serverfault.com/questions/764641/spamassassin-dovecot-and-postfix-move-spam-to-folder
Quote
To 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;
}
Title: Re: Help. Script autoblock spam flag
Post by: ejsolutions on April 08, 2020, 02:19:17 PM
Google is your friend.
...
Oi! That's my saying.  :P :D