LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   procmail recipe not working? (https://www.linuxquestions.org/questions/linux-software-2/procmail-recipe-not-working-35744/)

theLIGHT 11-18-2002 04:49 AM

procmail recipe not working?
 
Hullo there:) .

I am using Mandrake 8.1, have postfix, pine, fetchmail, and procmail installed.

I am using fetchmail to get my email from my two accounts. I cannot seem to get procmail to sort email into my folder.

Here is the procmail recipe.
====================
PATH=/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin
LOGFILE=procmail.log
MAILDIR=$HOME/mail
# Testing filter
#
:0:
* ^Subject:.*[ph-linux-newbie]
test-folder
# END OF PROCMAIL SCRIPT
====================

My "test-folder" is in /home/john/mail. I use pine to browse that folder, there are no email sorted into this folder.

I tried the command "echo $MAILDIR" and it returned blank.
What gives?

:newbie:

unSpawn 11-18-2002 06:54 AM

"echo $MAILDIR" won't work inside your shell (that is, outside the recipe). Since you're using variables for mailboxes, I suggest you make it easy on yourself and add this to the top of the recipe (which should be $HOME/.procmailrc, cuz that's where procmail will look) to aid you in troubleshooting:
verbose=on
Now if you send yourself a mail to the address fetchmail will retrieve from: "/bin/true | mail -s "[ph-linux-newbie] test $(date)" <address>", you should see in the logs where it fails.

theLIGHT 11-18-2002 06:42 PM

Thanks. I will try it and see.:study:

theLIGHT 11-18-2002 10:04 PM

:newbie:
It didn't work. I noticed that I don't have the procmail.log file in my home directory. I also noticed in the postfix configuration file: main.cf, there is the directive
mailbox_command = /usr/bin/procmail -o -a $DOMAIN -d $LOGNAME.

Is this anywhere related?


All times are GMT -5. The time now is 06:19 AM.