Move SPAM to another folder... Amavisd/spamassassin

Hi,

I read this guide step by step and configured spamassassin/amavisd.

I can't fine the email marked as spam on my system…

where I can find the spam?

please help.

13 Replies

@sblantipodi:

where I can find the spam?

Canned goods, aisle 6.

@sblantipodi:

Hi,

I read this guide step by step and configured spamassassin/amavisd.

I can't fine the email marked as spam on my system…

where I can find the spam?

please help.
SPAM above a certain threshold typically gets discarded

SPAM below that threshold typically gets delivered but is tagged (e.g., changing the "Subject:" to prepend something like "[SPAM]"). What you do with the delivered, tagged email is up to you. If you set up procmail, you can automatically deliver tagged emails to alternate locations (or even /dev/null). If you set up your mail client's junk control tools, you can either move it to another folder (e.g., "Junk") or automatically delete it. Thunderbird can be configured to "trust" the tags put in by SpamAssassin such that you won't need to "train" it.

@mwalling:

@sblantipodi:

where I can find the spam?

Canned goods, aisle 6.

I asked that because sometime some important mail can finish in the spam trap an be rejected.

I'm using amavisd e spamassassins,

it is possible to move ALL the spam in a directory for quarantine,

and after 7 days, delete it automatically?

I used to think along those lines, sblantipodi. I had three possible levels of spam: not spam, which would go to my inbox; possibly spam, which would go to a spam folder; and definitely spam, which would be rejected at SMTP time.

What ended up happening was that I never looked in the spam folder, because a real message in spam was so exceedingly rare.

So for me, it was much better to remove that middle category. Either accept the mail entirely or reject it at SMTP time. That way, the legitimate sender of a borderline email gets a bounce, rather than an acceptance that gets stuck in a folder I never read.

@Xan:

I used to think along those lines, sblantipodi. I had three possible levels of spam: not spam, which would go to my inbox; possibly spam, which would go to a spam folder; and definitely spam, which would be rejected at SMTP time.

What ended up happening was that I never looked in the spam folder, because a real message in spam was so exceedingly rare.

So for me, it was much better to remove that middle category. Either accept the mail entirely or reject it at SMTP time. That way, the legitimate sender of a borderline email gets a bounce, rather than an acceptance that gets stuck in a folder I never read.

This is right but having a directory that delete automatically SPAM older than 7 days, (also two o three can be enough) is also better :)

@sblantipodi:

This is right but having a directory that delete automatically SPAM older than 7 days, (also two o three can be enough) is also better :)

Not really… The problem isn't deleting old spam messages, it's that any legitimate mail flagged as spam would be neither bounced nor read. Just bounce it, then at least everybody knows the score.

@Xan:

@sblantipodi:

This is right but having a directory that delete automatically SPAM older than 7 days, (also two o three can be enough) is also better :)

Not really… The problem isn't deleting old spam messages, it's that any legitimate mail flagged as spam would be neither bounced nor read. Just bounce it, then at least everybody knows the score.

so I can't do it?

if yes, how can I do it?

I can't believe that I cannot put my span in a trash folder

for a quarantine and automatically remove it every seven days…

@sblantipodi:

I can't believe that I cannot put my span in a trash folder

for a quarantine and automatically remove it every seven days…
Sorting messages and delivering them into different folders is typically the job of an MDA such as procmail. To get it to operate on messages identified as spam, you'll want to set it to look for the headers that Spamassassin adds, such as "X-Spam-Flag," "X-Spam-Level," and "X-Spam-Status."

@Vance:

@sblantipodi:

I can't believe that I cannot put my span in a trash folder

for a quarantine and automatically remove it every seven days…
Sorting messages and delivering them into different folders is typically the job of an MDA such as procmail. To get it to operate on messages identified as spam, you'll want to set it to look for the headers that Spamassassin adds, such as "X-Spam-Flag," "X-Spam-Level," and "X-Spam-Status."

do you know if is there a guide on how to do that?

thanks.

@sblantipodi:

@Vance:

@sblantipodi:

I can't believe that I cannot put my span in a trash folder

for a quarantine and automatically remove it every seven days…
Sorting messages and delivering them into different folders is typically the job of an MDA such as procmail. To get it to operate on messages identified as spam, you'll want to set it to look for the headers that Spamassassin adds, such as "X-Spam-Flag," "X-Spam-Level," and "X-Spam-Status."

do you know if is there a guide on how to do that?

thanks.

in my main.cf I set

mailbox_command = /usr/bin/procmail -a "$USER"

then in the user directory .procmailrc

# Spam via SpamAssassin
:0
*^X-Spam-Flag:.*YES
{
:0
*^X-Spam-Status:.*autolearn=no
{
:0
*!^X-Spam-Status:.*BAYES_99
mail/spam/learn
}
:0
*^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
mail/spam/sure
:0
mail/spam/probable
} 

In that way should work but it seems that amavisd puts the SPAM in quarantine before than postfix move it into spam folder.

Is there a way to avoid using procmail and use amavisd to move the quarantined mail to my Maildir/.Trash directory?

I know that amavisd has a quarantine dir, but in amavisd.conf it seems that I cannot modify the original quarantine dir path or service doesn't starts well…

Is there also a way to makes amavisd/spamassassin to not compress spam into .gz format?

at the moment my

Postfix, Dovecot, Amavisd, SpamAssassin, ClamAV, Squirrelmail works like a charm…

when some spam is caught, it will be copied in .gz format under

/var/virusmails

may I make a command that move daily all the spam from /var/virusmails into /home/directory/Maildir/.Trash/cur with crontab?

in that way I don't need to use ALSO procmail and I can delete spam when I want using squirrelmail…

do you think that it could works well?

@sblantipodi:

at the moment my

Postfix, Dovecot, Amavisd, SpamAssassin, ClamAV, Squirrelmail works like a charm…

when some spam is caught, it will be copied in .gz format under

/var/virusmails

may I make a command that move daily all the spam from /var/virusmails into /home/directory/Maildir/.Trash/cur with crontab?

in that way I don't need to use ALSO procmail and I can delete spam when I want using squirrelmail…

do you think that it could works well?

Ok, I solved moving spam into trash folder using cron.daily and cron.weekly to delete it.

I think that is better in that way… thanks to all.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct