Difference between .procmailrc-first and .procmailrc
Posted: Mon Oct 07, 2013 11:06 am
Just a tip/heads up to anyone trying to use procmailrc files in Sonic's environment.
At present, the working directories of .procmailrc-first and .procmailrc are different, and so anything to do with file reading/writing could give different results (usually a fail in .procmailrc-first) if you neglect to specify absolute paths.
.procmailrc-first appears to run with a working directory of /var/spool/mqueue
.procmailrc appears to run with a working directory of your home directory
So, as an example, if you are writing non-mail-folder files as part of either script, you want to make sure you prefix the file path with $HOME/ to ensure you can read and write to the file.
At present, the working directories of .procmailrc-first and .procmailrc are different, and so anything to do with file reading/writing could give different results (usually a fail in .procmailrc-first) if you neglect to specify absolute paths.
.procmailrc-first appears to run with a working directory of /var/spool/mqueue
.procmailrc appears to run with a working directory of your home directory
So, as an example, if you are writing non-mail-folder files as part of either script, you want to make sure you prefix the file path with $HOME/ to ensure you can read and write to the file.