troubleshooting Question

Need to modify a new cpanel exim mail filter

Avatar of sabecs
sabecs asked on
Email ServersApache Web ServerLinux
4 Comments2 Solutions116 ViewsLast Modified:
Hi,
I am modifying a new exim mail filter as per below, all works well but.

1. wondering how to log the output to logfile /var/log/filter.log which has been created with permission 0644?

2. How would I just fail the message and not send a reply back to the spammer?

3. is there a $header_to option to stop mail sent to a specific addresses

Thanks in advance.

/etc/cpanel_exim_system_filter_new


# Filters all incoming an outgoing mail logfile /var/log/filter.log 0644
# reject spam based on email body
# logfile /var/log/filter.log 0644 

if
    $message_body contains "Good Day" or
    $message_body contains "Hello PayPal" or
    $message_body contains "Dear valued PayPal" or
    $message_body contains "forward to your positive reply"
then
    fail text "This message has been rejected because it looks like you are spamming us."
endif

if
    $header_from contains "rezult" or 
    $header_from contains "secret"  
then
    fail text "Your email has been rejected because it looks like you are spamming us."
endif
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros