Re: Mailscanner on cPanel, send spam to spam/junk folder globally

Peter Lemieux <mailscanner-fNwzQDfiNKu4/[email protected]>
Newsgroups gmane.mail.virus.mailscanner
Message-ID <[email protected]>
Don't know anything about CPanel, but if your SMTP servers use the 
popular Mail Delivery Agent procmail, then you can write a "recipe" and 
put it in /etc/procmailrc that will look for "{Spam?}" in the Subject 
line and route the offending message to /home/$USER/mail/likely-spam or 
wherever you prefer.  Something like this (untested):

# File: /etc/procmailrc
# route all mail with "{Spam?}" header to user's spam box
:0:
* ^Subject:.*\{Spam
$HOME/mail/likely-spam

The message is scanned by root but delivered, I believe, to the 
recipient's spam folder (here in mbox format).

See "man procmailrc" and especially "man procmailex" for examples.

Peter


On 12/15/20 4:36 PM, Donato Pisani wrote:
> Hello everyone,
> 
> I hope you are fine.
> 
> I am having some problems with mailscanner inside a server with cPanel.
> 
> Mailscanner adds the message "{Spam?}" to the subject of the message and leaves it in inbox, I know that with a filter in each account generated by cPanel I can make it send to another folder if the subject contains that phrase, but it becomes unsustainable when there are too many accounts on the server.
> 
> Is there a way to filter globally for existing and new domains?
> 
> Thank you a lot for your time and help!
> 
> 




-- 
MailScanner mailing list
mailscanner-qhrM8SXbD5JTOyd/[email protected]
http://lists.mailscanner.info/mailman/listinfo/mailscanner
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.