Exim Configuration Manager > Custom Filter. Not Working
Hi all.
I have an issue with the custom filter functionality.
I need to configure some custom filters and I need that these filters not be excluded in futures cpanel updates, then I followed the instrucitions to create custom filter rules here:
How to Customize the Exim System Filter File - cPanel Knowledge Base - cPanel Documentation
I created a file called spamsubject at "/usr/local/cpanel/etc/exim/sysfilter/options/"
Then, in the "WHM > Exim Configuration Manager > Basic Editor > Filters tab" I see at the bottom the "Custom Filter: subjectspam [?] ON (default)".
This little code bellow is working well when I insert directly at "/etc/antivirus.exim", I tested and the filter works fine, but when I put in the "/usr/local/cpanel/etc/exim/sysfilter/options/subjectspam", the filter don't works. I already restart exim all the times.
What could be the problem?
The server is WHM 54.0 (build 21), is this version working well with exim custom filters?
Thanks in advance by any help.
# test
if
$header_subject: contains "viagra"
then
fail text "Rejected by spam words at subject"
seen finish
endifThanks in advance by any help.
-
Hello :) Could you post the output from /var/log/exim_mainlog for the test message you sent after enabling this system filter rule? EX: exigrep user@test /var/log/exim_mainlog
Was this test email sent from a remote mail server? Thank you.0 -
Hello, cPanelMichael :) Sure, let's go. Yes, I did the tests from a @gmail.com to local This is the log when the filter is in /usr/local/cpanel/etc/exim/sysfilter/options/subjectspam Filter didn't worked. Message arrives in local mail. 2016-04-25 20:39:52 1auq6Z-003Lh9-Cd H=mail-ob0-f173.google.com [209.85.214.173]:36659 I=[98.142.98.102]:25 Warning: "SpamAssassin as digitalc detected message as NOT spam (-100.0)" 2016-04-25 20:39:52 1auq6Z-003Lh9-Cd <= celsopecuraro@gmail.com H=mail-ob0-f173.google.com [209.85.214.173]:36659 I=[98.142.98.102]:25 P=esmtps X=TLSv1.2:RC4-SHA:128 CV=no S=4932 id=CAE-F3gTU7tv_T3ew6FKhe8-t8sGHN80bzBWnK6oJs4MPf-sWkQ@mail.gmail.com T="compre viagra" from for celso@digitalcomunic.com.br 2016-04-25 20:39:52 1auq6Z-003Lh9-Cd => celso F= R=virtual_user T=virtual_userdelivery S=5058 2016-04-25 20:39:52 1auq6Z-003Lh9-Cd Completed
And this is the filter in antivirus.exim Filter worked, same message subject, and the email returned to @gmail with the message error.2016-04-25 20:45:26 1auqBw-003M5h-QN H=mail-oi0-f50.google.com [209.85.218.50]:35704 I=[98.142.98.102]:25 Warning: "SpamAssassin as digitalc detected message as NOT spam (-100.0)" 2016-04-25 20:45:26 1auqBw-003M5h-QN <= celsopecuraro@gmail.com H=mail-oi0-f50.google.com [209.85.218.50]:35704 I=[98.142.98.102]:25 P=esmtps X=TLSv1.2:RC4-SHA:128 CV=no S=4927 id=CAE-F3gSn5VArgqh0rjoM8Vyfqe3uEKoqBa64=U9u9K-rORyodQ@mail.gmail.com T="compre viagra" from for celso@digitalcomunic.com.br 2016-04-25 20:45:26 1auqBw-003M5h-QN cancelled by system filter: Rejected by spam words at subject 2016-04-25 20:45:26 1auqBw-003M5h-QN Completed
Seems the files in /usr/local/cpanel/etc/exim/sysfilter/options/ are not working even the Exim Configuration Manager > Custom Filter are activated. regards.0 -
Hello, I believe the issue is with your filter syntax, as I was unable to reproduce the issue on a test system. Please try updating your custom filter rule to an entry such as this: # test if $header_subject: contains "viagra" then fail text "Rejected by spam words at subject" endif
Thank you.0
Please sign in to leave a comment.
Comments
3 comments