Exim filter : cpanel_exim_system_filter file related issue

Sameer Shah

Registered
Aug 29, 2017
2
0
1
Dubai
cPanel Access Level
Root Administrator
Hi

We were not able to send and receive emails today, hence I checked the Email Queue and it was full. I tried to force deliver the message I got the following error,
Code:
LOG: MAIN
cwd=/usr/local/cpanel/whostmgr/docroot 4 args: /usr/sbin/exim -v -M 1dmdEb-0004Yz-Ku
delivering 1dmdEb-0004Yz-Ku
LOG: MAIN PANIC
Error in system filter: unrecognized condition word "not" near line 240 of filter file

Then I disabled the system filter file and tried to force deliver the message I got the following error,

LOG: MAIN
cwd=/usr/local/cpanel/whostmgr/docroot 4 args: /usr/sbin/exim -v -M 1dmdEb-0004Yz-Ku
delivering 1dmdEb-0004Yz-Ku
LOG: MAIN PANIC
failed to expand condition "${if and{{bool_lax{${if eq {$authenticated_id}{root}{0}{1}}}}{bool_lax{${perl{check_mail_permissions}}}}}}" for check_mail_permissions router: Undefined subroutine &main::check_mail_permissions called.
inside "and{...}" condition
LOG: MAIN PANIC
failed to expand condition "${if and{{bool_lax{${if eq {$authenticated_id}{root}{0}{1}}}}{bool_lax{${perl{enforce_mail_permissions}}}}}}" for enforce_mail_permissions router: Undefined subroutine &main::enforce_mail_permissions called.
inside "and{...}" condition
LOG: MAIN PANIC
failed to expand condition "${if and{{bool_lax{${if eq {$authenticated_id}{root}{0}{1}}}}{bool_lax{${perl{increment_max_emails_per_hour_if_needed}}}}}}" for increment_max_emails_per_hour_if_needed router: Undefined subroutine &main::increment_max_emails_per_hour_if_needed called.
inside "and{...}" condition
LOG: MAIN
== [email protected] ([email protected], [email protected], [email protected]) <[email protected]> R=dkim_lookuphost defer (-1): dkim_lookuphost router failed to expand add_headers item "NULL": Undefined subroutine &main::mailtrapheaders called.\n
Everytime I say the EXIM configuration I get the error as in the attached file.

Also on outlook the it says the none of the authentication supported by this client is supported by the server.

No mails working since 6 hours. Help would be appreciated.
 

Attachments

Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

The error message in the image you provided suggests the /etc/mailhelo file is assigned the immutable attribute. You can remove that attribute with the following command:

Code:
chattr -i /etc/mailhelo
Thank you.
 

Sameer Shah

Registered
Aug 29, 2017
2
0
1
Dubai
cPanel Access Level
Root Administrator
Hi

Appreciate your response, but the main issue is with the emails being stuck in the queue. I restarted the EXIM services and gracefully restarted the server. Also restored the EXIM configuration from an earlier backup.

The issue was fixed earlier but has started again since yesterday evening. This is something new as we have the server with us since 4 years.

HI

I found that the emails are received if I disable the system filter file.
But I cannot send the emails.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

Could you verify the most recent error messages in /var/log/exim_paniclog or /var/log/exim_mainlog when this happens? Is there any reason you need the immutable attribute on the /etc/mailhelo file? It can prevent Exim from functioning properly and lead to the issue you have described. Also, can you verify how you have customized the Exim system filter? Did you use the instructions from our documentation (https://documentation.cpanel.net/display/CKB/How+to+Customize+the+Exim+System+Filter+File)?

Thank you.