Using exim with procmail?
I have a shared account from Hostgator. In order to be able to filter incoming mail with .procmailrc I added the following to my /etc/vfilters/:
# Exim filter
# Auto Generated by cPanel. Do not manually edit this file as your changes will be overwritten. If you must edit this filter, edit the corresponding .yaml file as well.
if not first_delivery and error_message then finish endif
if
$header_from: matches ".*"
then
pipe "/usr/bin/procmail /home1//.procmailrc"
endif
Truly, it looks quite strange. I have never had an opportunity to use Exim before. I don't want to use Exim native filtering because I already have a quite big list of procmail rules. Is this method of using procmail with Exim reliable or are there more recommended ones?
Truly, it looks quite strange. I have never had an opportunity to use Exim before. I don't want to use Exim native filtering because I already have a quite big list of procmail rules. Is this method of using procmail with Exim reliable or are there more recommended ones?
-
Hello, This is not likely to work because procmail is not normally installed with cPanel. You may want to check with your hosting provider to see if there are any alternatives. Thank you. 0 -
Hello, This is not likely to work because procmail is not normally installed with cPanel. You may want to check with your hosting provider to see if there are any alternatives. Thank you.
Can I get a second opinion from cpanel ? I have a VPS and it is present - is it default/setting dependent or did my host install it manually? /usr/bin/procmailrc /usr/share/doc/procmail-3.220 -
If you have a VPS then you are welcome to install it if it's not included with your OS by default. Feel free to add the filter rule and let us know of the results. Thank you. 0 -
Yes, it works! [COLOR=rgb(179, 0, 179)]I still wish to know if procmail is included standard in cPanel issue or dependent on what ? Here is a simple test you can replicate: In /etc/vfilters/mydomain.tld is code to make all email to my domain be subject to my procmail rules: # Exim Filter if $header_to: contains "mydomain.tld" then pipe " /usr/bin/procmail -a /home/myacctname/.procmailrc " endif
In /home/myacctname/.procmailrc would be my specific procmail rules - the one test rule shown sends all email to a specific address into mailfolder called tmp: SHELL=/bin/sh PATH=/bin:/usr/bin SENDMAIL=/usr/sbin/sendmail VERBOSE=no COMSAT=no LOGFILE=$HOME/.procmail.log MAILDIR=$HOME/mail :0 * ^TO.*myaddy@mydomain.tld[/EMAIL] { LOG = "Result of test: " :0: tmp }
Results shown in /home/myacctname/.procmail.log : Result of test: From myaddy@gmail.com[/EMAIL] Wed Feb 24 09:57:00 2016 Subject: Test 2 Folder: tmp/msg.PbBoJ 27274
The message landed in /home/myacctname/mail/tmp/ folder I will update this post once I have time to confirm that piping to a program via a procmail rule works as well.0 -
[COLOR=rgb(179, 0, 179)]I still wish to know if procmail is included standard in cPanel issue or dependent on what ?
No, it's not included with cPanel by default. Thank you.0
Please sign in to leave a comment.
Comments
5 comments