Click to See Complete Forum and Search --> : A Procmail Pickle


bubblenut
12-23-2003, 05:16 AM
Hi, I've created a .procmailrc file in root and have checked that it works running directly through procmail the problem is when I run a test with sendmail I does not get redirected as expected and it does not even go to /var/spool/mail/root which is where it was going before. I whacked in the line LOGFILE=/root/proclog and tested it, works fine, however when I run sendmail absolutely nothing goes into the log file.
I'm fast running out of ideas on how to debug this. What I really need is a way of running sendmail so I can see exactly when it's running procmail and exactly what is being passed to it.

Thanks in advance
Bubble

posterboy
12-23-2003, 08:35 AM
Did you fix /etc/smrsh?

bubblenut
12-23-2003, 08:50 AM
No, what needs to be done to it? It's there but there are no files in it.

posterboy
12-23-2003, 08:55 AM
right, sendmail needs to spawn a shell in order to run anything. It will NOT do that, unless root has allowed it. In /etc/smrsh put a symlink to procmail. After that, sendmail will actually USE procmail. BTW, smrsh is SendMail Remote SHell.

bubblenut
12-23-2003, 09:13 AM
Does this line in my sendmail.mc cover that?

define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl

I also have this further down.

FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl

Sorry, I didn't mention before, sendmail was working fine, using procmail as the local mailer before.

posterboy
12-23-2003, 09:17 AM
I don't think that makes it work. That makes it POSSIBLE as a sendmail connection, but mine wouldn't fly until I fixed up /etc/smrsh. Be sure, also, when you make the symlink, that it points to the full path, /usr/bin/procmail.

bubblenut
12-23-2003, 09:43 AM
No, still not working, and things just got a little worse. I just moved /etc/procmailrc to see if it would still send mail with procmail without the rc file and it won't!! :confused: I've recompiled the mc file and restarted sendmail and it still won't.

posterboy
12-23-2003, 09:46 AM
Uh-oh, that leaves me without a clue. I am on RH9 here, and procmail working just fine. Those are the only things I can recall having done to get it to fly. Maybe some of the others have some ideas where to start looking.

bubblenut
12-23-2003, 10:23 AM
I got it working. I'd been working on it so long the c**k ups were starting to slip through my fingers
When I removed a couple of lines that I'd added into the mc file I'd accidentally removed my MAILER(smtp) and MAILER(procmail) lines. Also I had a stray .forward in /root which I didn't need (and I don't think was correct anyway) It all works perfectly now (I haven't fully tested yet so that may still be a lie).

If there are any lessons tobe learnt I think they would have to be "Don't get careless" and "Open your %$&*ing eyes!!"

Thanks for your help
Bubble

posterboy
12-23-2003, 10:25 AM
YEAY! It WERKS! and, that's all that matters.