Procmail problems
I've been trying to solve this for several weeks ...
My goal is to find my inbox for the following messages:
Hello
Hi
Hey
I am using three files to do this for me. First, the .forward file in my $ HOME
"|IFS=' '&&exec usr/bin/procmail||exit 75 #username"
And these two are in my ~ / .procmail directory
.procmailrc
VERBOSE=off
MAILDIR=$HOME/Mail
PMDIR=$HOME/.procmail
DEFAULT=/var/spool/mail/username
LOGFILE=$PMDIR/log
INCLUDERC=$PMDIR/general.rc
#end of .procmailrc
Finally, the rule file: general.rc
:0
* ^From:.*sumone@sumaddy.com
* ^Subject:.*hello
$HOME/Mail/Hello
All three of these files are supposed to work together to copy and move mail containing a greeting template in their subject. And to be on the safe side, it will also look for the addresses of individuals. Then, when these patterns are matched, it will stick with the found one and create the specified path; if it doesn't already exist.
But this is not the case. After I finished editing these files in emacs, vi, .. and then saved it, will it work automatically? Or do I need to compile it?
If so, .procmailrc may require (if not all) "Shell = / bin / sh"
Not that I haven't tried this ...
No, my poorly designed design is handling incoming mail.
I tested it by sending emails to myself.
What I think is that my General.RC file is not encoded. Because, right after I sent myself an email, it MUST copy and move it to the specified directory.
Not surprisingly, I made these mistakes, I edited all three of these files in a million times.
My LOG file is showing nothing ...
I fixed everything else and I know my / usr / bin / procmail exists because I used whereis to view its path.
But my testing is still failing. I keep sending my emails and checking my Mail folder to see if the bytes in my "Hello" file have increased.
How can I get the log to work? Is general.rc invalid?
source to share
Procmail processes mail when it arrives, not when it just sits in your inbox. If you want to process mail that is already in your mailbox, you need to transfer it through procmail again, either by "bouncing" it for yourself, or by scrolling through it through procmail. In a command line mail client like mutt, you would do the first with the "b" command and the second by typing|procmail
source to share
-
The ~ .forward file is missing // before usr. Alternatively, you can keep it short like this:
"| ** / ** usr / bin / procmail"
- put your .procmailrc in your home directory
- After setting up MAILDIR, write only "Hello" for the mailbox name in general.rc. Also use ": 0:" at the beginning of the recipe to enable blocking, all deliveries must block the mailbox file!
- Make sure you have procmail installed in / usr / bin / procmail on the server.
- Make sure the file "Hello" exists in your MAILDIR.
- Check the log file
source to share
I think your main concern before any other debugging is to verify that procmail is running on your incoming emails.
My suggestion is to make your .procmailrc file look like this (with nothing else)
VERBOSE=on
LOGFILE=/tmp/procmail.log
:0 fhbw
| sed "s/^Subject:/& --procmail working--/"
Then send an email.
You should get the log file at /tmp/procmail.log and your email should arrive in your mailbox with the subject line changed to include "--procmail working".
If that doesn't work, then procmail is not invoked and you must edit your question to show the current content of your .forward file.
If that works, the problem is with the content of your .procmailrc or your general.rc file. You must edit your question to show the current content of these two files.
source to share