Hi,
My mail server is running on CentOS 7 with Postfix, Dovecot and Spamassassin. I get quite a lot of spam on a few accounts, and Spamassassin does its job fine. Spam mail is identified correctly, and it looks like there are no false positives, e. g. valid mail is never identified as spam.
When a message is flagged as spam, the subject line is rewritten to begin with [SPAM]. Then, a filter in Mozilla Thunderbird is setup, and when a subject line begins with [SPAM] the message is directly sent to Trash.
I've documented the whole configuration here:
* https://blog.microlinux.fr/spamassassin-centos/
The problem with this setup is that spam mail is still delivered, and I need Thunderbird's filters to weed out incoming mail. And when I'm using my webmail (running SquirrelMail), my inbox is a tsunami of unread [SPAM] messages.
So I'd like to go a step further and delete all messages flagged [SPAM] directly on the server. It doesn't look like Spamassassin provides this functionality.
Did any of you guys succeed in doing this anyway?
Cheers,
Niki
On 18/12/2018 08:08, Nicolas Kovacs wrote:
Hi,
My mail server is running on CentOS 7 with Postfix, Dovecot and Spamassassin. I get quite a lot of spam on a few accounts, and Spamassassin does its job fine. Spam mail is identified correctly, and it looks like there are no false positives, e. g. valid mail is never identified as spam.
When a message is flagged as spam, the subject line is rewritten to begin with [SPAM]. Then, a filter in Mozilla Thunderbird is setup, and when a subject line begins with [SPAM] the message is directly sent to Trash.
I've documented the whole configuration here:
The problem with this setup is that spam mail is still delivered, and I need Thunderbird's filters to weed out incoming mail. And when I'm using my webmail (running SquirrelMail), my inbox is a tsunami of unread [SPAM] messages.
So I'd like to go a step further and delete all messages flagged [SPAM] directly on the server. It doesn't look like Spamassassin provides this functionality.
Did any of you guys succeed in doing this anyway?
Cheers,
Niki
I've used for quite some time now a combination of postfix+SA+MailScanner for this, not delivering mails, but letting those in a quarantine, and using Mailwatch (http frontend) to let people release mail from the quarantine, etc ..
https://www.mailscanner.info/ https://mailwatch.org/
And the ansible role that I initially used for this on CentOS 7 : https://github.com/arrfab/ansible-role-mail-gateway
Cheers,
On 12/18/18 3:34 AM, Fabian Arrotin wrote:
On 18/12/2018 08:08, Nicolas Kovacs wrote:
Hi,
My mail server is running on CentOS 7 with Postfix, Dovecot and Spamassassin. I get quite a lot of spam on a few accounts, and Spamassassin does its job fine. Spam mail is identified correctly, and it looks like there are no false positives, e. g. valid mail is never identified as spam.
When a message is flagged as spam, the subject line is rewritten to begin with [SPAM]. Then, a filter in Mozilla Thunderbird is setup, and when a subject line begins with [SPAM] the message is directly sent to Trash.
I've documented the whole configuration here:
The problem with this setup is that spam mail is still delivered, and I need Thunderbird's filters to weed out incoming mail. And when I'm using my webmail (running SquirrelMail), my inbox is a tsunami of unread [SPAM] messages.
So I'd like to go a step further and delete all messages flagged [SPAM] directly on the server. It doesn't look like Spamassassin provides this functionality.
Did any of you guys succeed in doing this anyway?
Cheers,
Niki
I've used for quite some time now a combination of postfix+SA+MailScanner for this, not delivering mails, but letting those in a quarantine, and using Mailwatch (http frontend) to let people release mail from the quarantine, etc ..
Thanks, Fabian. I was looking for something like that for long time. I was using the above under amavisd-new. And as I didn't find GUI front-end ;-( I ended up using maia mailguard. By that point I switched servers to FreeBSD, and there is FreeBSD maia port which is being actively maintained by brilliant person, so that may be the best source to get maia from, not the main maia website.
Thanks again, it looks like mailwatch does everything I needed (and found in maia): per user white/blacklists, other individual setting, quarantene release, etc.
Valeri
https://www.mailscanner.info/ https://mailwatch.org/
And the ansible role that I initially used for this on CentOS 7 : https://github.com/arrfab/ansible-role-mail-gateway
Cheers,
CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
On 18 Dec 2018, at 16:37, Valeri Galtsev galtsev@kicp.uchicago.edu wrote:
On 12/18/18 3:34 AM, Fabian Arrotin wrote:
On 18/12/2018 08:08, Nicolas Kovacs wrote:
Hi,
My mail server is running on CentOS 7 with Postfix, Dovecot and Spamassassin. I get quite a lot of spam on a few accounts, and Spamassassin does its job fine. Spam mail is identified correctly, and it looks like there are no false positives, e. g. valid mail is never identified as spam.
When a message is flagged as spam, the subject line is rewritten to begin with [SPAM]. Then, a filter in Mozilla Thunderbird is setup, and when a subject line begins with [SPAM] the message is directly sent to Trash.
I've documented the whole configuration here:
The problem with this setup is that spam mail is still delivered, and I need Thunderbird's filters to weed out incoming mail. And when I'm using my webmail (running SquirrelMail), my inbox is a tsunami of unread [SPAM] messages.
So I'd like to go a step further and delete all messages flagged [SPAM] directly on the server. It doesn't look like Spamassassin provides this functionality.
Did any of you guys succeed in doing this anyway?
Cheers,
Niki
I've used for quite some time now a combination of postfix+SA+MailScanner for this, not delivering mails, but letting those in a quarantine, and using Mailwatch (http frontend) to let people release mail from the quarantine, etc ..
Thanks, Fabian. I was looking for something like that for long time. I was using the above under amavisd-new. And as I didn't find GUI front-end ;-( I ended up using maia mailguard. By that point I switched servers to FreeBSD, and there is FreeBSD maia port which is being actively maintained by brilliant person, so that may be the best source to get maia from, not the main maia website.
Thanks again, it looks like mailwatch does everything I needed (and found in maia): per user white/blacklists, other individual setting, quarantene release, etc.
Another alternative that does not alter the original configuration is to use the dovecot sieve plugin. It can manage both global and per user filters, so you can provide a global filter that discards - or, better, move into a dedicated folder - all the messages marked as spam. References: https://wiki1.dovecot.org/LDA/Sieve https://wiki1.dovecot.org/LDA/Sieve https://wiki2.dovecot.org/Pigeonhole
Valeri
Best, Andrea -- Andrea Dell'Amico http://adellam.%10sevenseas.org/
The problem with this setup is that spam mail is still delivered, and I need Thunderbird's filters to weed out incoming mail. And when I'm using my webmail (running SquirrelMail), my inbox is a tsunami of unread [SPAM] messages.
So I'd like to go a step further and delete all messages flagged [SPAM] directly on the server. It doesn't look like Spamassassin provides this functionality.
Spamassassin just tags things, it doesn't interact with the final mail delivery. What you need is some form of server-side filtering
My (limited) expertise in MTAs is with Exim and that has an extensive filter syntax that goes in the user's .forward file - I use that to pre-filter my mail before the MUA sees it. From my .forward file:
if $h_X-Spam-Flag: contains "Yes" then save Maildir/.spam/ finish endif
if $header_subject: contains "[CentOS" then save Maildir/.CentOS/ finish endif
If you don't want to use a different MTA, then the classic way of doing server side filtering is using procmail. I'm certain there will be lots of HowTos out there on how to set it all up with Postfix.
Finally, I would be quite surprised if there is no built-in filtering of some form with Postfix, but from the articles I've just been looking at it doesn't seem to be a simple process.
P.
Hi,
Procmail, it can move messages around based on many rules. Use something like this in postfix main.cf: mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
And something like this in /etc/procmailrc or $HOME/.procmailrc
SPAMDIR=$HOME/Maildir/.Spam/ :0fw | /usr/bin/spamc :0 * ^X-Spam-Status: Yes $SPAMDIR DEFAULT=$HOME/Maildir/ ORGMAIL=$HOME/Maildir/ DROPPRIVS=yes
HTH
-- Sent from the Delta quadrant using Borg technology!
Nux! www.nux.ro
----- Original Message -----
From: "Nicolas Kovacs" info@microlinux.fr To: "CentOS mailing list" centos@centos.org Cc: "scholae >> AA Tous les salariés" scholae@lists.tuxfamily.org Sent: Tuesday, 18 December, 2018 07:08:55 Subject: [CentOS] Spamassassin + Postfix : delete spam mail on the server ?
Hi,
My mail server is running on CentOS 7 with Postfix, Dovecot and Spamassassin. I get quite a lot of spam on a few accounts, and Spamassassin does its job fine. Spam mail is identified correctly, and it looks like there are no false positives, e. g. valid mail is never identified as spam.
When a message is flagged as spam, the subject line is rewritten to begin with [SPAM]. Then, a filter in Mozilla Thunderbird is setup, and when a subject line begins with [SPAM] the message is directly sent to Trash.
I've documented the whole configuration here:
The problem with this setup is that spam mail is still delivered, and I need Thunderbird's filters to weed out incoming mail. And when I'm using my webmail (running SquirrelMail), my inbox is a tsunami of unread [SPAM] messages.
So I'd like to go a step further and delete all messages flagged [SPAM] directly on the server. It doesn't look like Spamassassin provides this functionality.
Did any of you guys succeed in doing this anyway?
Cheers,
Niki
-- Microlinux - Solutions informatiques durables 7, place de l'église - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32 _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
On 12/18/18 4:02 AM, Nux! wrote:
Hi,
<snip>
HTH
-- Sent from the Delta quadrant using Borg technology!
I am just curios how much do they pay you for advertising them in all your posts to this mail list. Or what is different - non-monetary - incentive you have for doing so?
Valeri
Nux! www.nux.ro
<snip>
Valeri Galtsev wrote:
On 12/18/18 4:02 AM, Nux! wrote:
Hi,
<snip> > > HTH > -- > Sent from the Delta quadrant using Borg technology!
I am just curios how much do they pay you for advertising them in all your posts to this mail list. Or what is different - non-monetary - incentive you have for doing so?
Who, Paramount? That's who owns Trek....
mark "beam me up, Scotty, there's *no* intelligent life here"
At Tue, 18 Dec 2018 08:08:55 +0100 CentOS mailing list centos@centos.org wrote:
Hi,
My mail server is running on CentOS 7 with Postfix, Dovecot and Spamassassin. I get quite a lot of spam on a few accounts, and Spamassassin does its job fine. Spam mail is identified correctly, and it looks like there are no false positives, e. g. valid mail is never identified as spam.
When a message is flagged as spam, the subject line is rewritten to begin with [SPAM]. Then, a filter in Mozilla Thunderbird is setup, and when a subject line begins with [SPAM] the message is directly sent to Trash.
You have two options:
If you have mimedefang installed and using it run spamassassin over all incoming messages, you can change mimedefang's default spamassassin filter interface from merely tagging messages to actually rejecting them -- mimedefang can return a code to tell Postfix to boot the spam message with a 5xx status.
Or you can have a recipe in .procmailrc to file (or otherwise) messages tagged as spam.
(Another thing you can do is configure Postfix's access and client.cidr files to refuse to even talk to various hosts that are known spam sources -- pretty much all of China, Vietnam, Russia (and former USSR countries), and Brazil as well as all of the "silly" TLDs: .science, .stream, .store, .webcam, .acountant, .life, .today, and many more.)
I've documented the whole configuration here:
The problem with this setup is that spam mail is still delivered, and I need Thunderbird's filters to weed out incoming mail. And when I'm using my webmail (running SquirrelMail), my inbox is a tsunami of unread [SPAM] messages.
So I'd like to go a step further and delete all messages flagged [SPAM] directly on the server. It doesn't look like Spamassassin provides this functionality.
Did any of you guys succeed in doing this anyway?
Cheers,
Niki
Am 18.12.2018 um 08:08 schrieb Nicolas Kovacs:
The problem with this setup is that spam mail is still delivered, and I need Thunderbird's filters to weed out incoming mail. And when I'm using my webmail (running SquirrelMail), my inbox is a tsunami of unread [SPAM] messages.
So I'd like to go a step further and delete all messages flagged [SPAM] directly on the server. It doesn't look like Spamassassin provides this functionality.
What's the point of delivering identified SPAM and then deleting it? Reject SPAM at SMTP level on your MTA. Easy to do with amavisd-new in a smtp proxy setup with Postfix.
Alexander
Am 18.12.2018 um 08:08 schrieb Nicolas Kovacs:
The problem with this setup is that spam mail is still delivered, and I need Thunderbird's filters to weed out incoming mail. And when I'm using my webmail (running SquirrelMail), my inbox is a tsunami of unread [SPAM] messages.
So I'd like to go a step further and delete all messages flagged [SPAM] directly on the server. It doesn't look like Spamassassin provides this functionality.
What's the point of delivering identified SPAM and then deleting it? Reject SPAM at SMTP level on your MTA. Easy to do with amavisd-new in a smtp proxy setup with Postfix.
There are good reasons to not reject detected SPAM because your SPAM filter could be wrong and you reject legitimate mail.
For businesses depending on email communication that's a no go, because you may lose customers that way.
Regards, Simon
Absolutely, never reject spam at MTA level!
Usually I put it in a spam folder, then add a cronjob that deletes messages older than 6 months, ymmv.
-- Sent from the Delta quadrant using Borg technology!
Nux! www.nux.ro
----- Original Message -----
From: "CentOS mailing list" centos@centos.org To: "CentOS mailing list" centos@centos.org Sent: Wednesday, 19 December, 2018 04:59:21 Subject: Re: [CentOS] Spamassassin + Postfix : delete spam mail on the server ?
Am 18.12.2018 um 08:08 schrieb Nicolas Kovacs:
The problem with this setup is that spam mail is still delivered, and I need Thunderbird's filters to weed out incoming mail. And when I'm using my webmail (running SquirrelMail), my inbox is a tsunami of unread [SPAM] messages.
So I'd like to go a step further and delete all messages flagged [SPAM] directly on the server. It doesn't look like Spamassassin provides this functionality.
What's the point of delivering identified SPAM and then deleting it? Reject SPAM at SMTP level on your MTA. Easy to do with amavisd-new in a smtp proxy setup with Postfix.
There are good reasons to not reject detected SPAM because your SPAM filter could be wrong and you reject legitimate mail.
For businesses depending on email communication that's a no go, because you may lose customers that way.
Regards, Simon
CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Am 19.12.2018 um 14:49 schrieb Nux!:
Absolutely, never reject spam at MTA level!
Usually I put it in a spam folder, then add a cronjob that deletes messages older than 6 months, ymmv.
-- Sent from the Delta quadrant using Borg technology!
Nux! www.nux.ro
Sorry, I see it totally different. But do what you like to do as your own postmaster. There are good reasons to reject SPAM messages instead of initially accepting them.
Alexander