Make the exim custom filter process safer
Hello,
This request is following an "Email" forum post, at https://forums.cpanel.net/threads/exim-filter-to-act-on-all-outgoing-emails.715677/
It is made of several linked requests:
Some suggestions/request for cPanel, following my time with writing and testing this exim custom filter file:
Background
1. When I edited the custom filter file I had some issues with the file editor, so Linux saved an additional, temp file, at the same folder, with an extension of .save.
The problem is that the "exim configuration manager" (at least as the UI representation of things), constantly reads the custom filters folder, /usr/local/cpanel/etc/exim/sysfilter/options/, and automatically adds any files there to the list of custom filters and add the in an "On" mode, which is the default status for custom filter files, so each file is automatically processed, even if the admin is not aware of the addition of this system backup file...
2. If an exim custom filter is not valid - it cause emails to get stuck in the mail queue and adds an error record line to exim's panic log, at /var/log/exim_paniclog
So, I suggest (and of course, if you change it, publicly post about them):
1. Change the default mode of exim custom filter files to be "Off", it is safer this way
2. Consider adding custom filter files to the exim processing only if they are using a certain extension or, instead, don't run files ending with certain extensions, like .save. This will help to better verify only file wished to be run - will run
3. If a custom filter file caused an error to exim - change its operational mode to "Off" and add a marking extension to it, like .error.
Consider adding adding a log record for this event and an alert delivery of email to the admin.
This will help preventing invalid custom filters from blocking the whole mail queue
Replies have been locked on this page!