Exim embedded exim.pl vs exim.local.pl

Jorge Moreno

Member
Feb 27, 2019
5
0
1
panama
cPanel Access Level
DataCenter Provider
Hello,

When exim.pl or exim.local.pl runs? Is there any precedence on which one is called first?
I would like to add some custom filters for outbound remote emails but I am not sure where to start adding my subroutines. I could not find documentation on cPanel regarding this case.

Currently I am doing a perl_startup do '/etc/custom_filters.pl'

And custom_filters content is:

########
open(my $fd, ">>/var/log/custom_exim.log");
my $from_h = "$from_h_localpart\@$from_h_domain";
print $fd "from_h_domain: $from_h \n";

do "/etc/exim.pl";
1;
########

I am not getting logs when sending from authenticated smtp users but I do get logs on local mails sent by scripts.

I appreciate if someone can clarify this for me.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello @Jorge Moreno,

Directly modifying /etc/exim.pl.local is unsupported. Instead, we document how to setup custom Exim system filter rules on the link below:

How to Customize the Exim System Filter File - cPanel Knowledge Base - cPanel Documentation

If you have more advanced changes to make to the Exim configuration file, use the Advanced Editor that's documented on the link below:

Exim Configuration Manager - Version 78 Documentation - cPanel Documentation

Let me know if this helps.

Thank you.