Professional Software Engineering
At 10:54 2002-02-27 -0700, Jeremy Wadsack did say:
I've gone through the FAQ and all the recommendations I can find on
the Web and can't seem to get this to work. If I put a recipe in
/etc/procmailrc it is run for all users.
Let's make this clear: ARE you successfully executing /etc/procmailrc when
new mail arrives for any user, or are you merely stating that you
understand that this is what will happen when you get things working, but
since you want to test the recipe first, you haven't ACTUALLY successfully
run anything from /etc/procmailrc? Your statement isn't particularly
clear, and there's a BIG difference depending on how it is interpreted, so
which is it?
Sorry for the confusion. Yes, I put a recipe in /etc/procmailrc and it
was executed for all users.
I have created the following ~billing/.forward files (each is only one
[snip - uhm, these aren't what are provided in the procmail manpage]
My procmail manpage says to use this:
But as I said before, anything with 'exec' in it does not work.
The accepted standard .forward invocation for procmail is located in my
disclaimer page (near the bottom).
Same here. The response I get for both instances is "Service
unavailable." With additional notice "attempt to use & in command,"
presumable from smrsh.
Anything with 'exec' is not allowed.
Why not? Perhaps you're running smrsh as your LDA? Unless you need to be
running something else, you're better off just setting procmail up as the
LDA in sendmail (which is fairly easy - esp if you're using the sendmail
config.mc stuff to generate your sendmail.cf file).
As I said before I know nothing about Sendmail. I use usually use
Qmail because it's much simpler to configure. Likely the Sendmail is
set up with smrsh or some such. I didn't install it.
Any line with exec in it returns "Service unavailable."
My initial guess - your .forward file has bad permissions on it.
Original permissions were:
-rwxr-xr-x 1 billing site73 34 Feb 26 17:05 .forward
-rwxr-xr-x 1 billing site73 228 Feb 27 10:52 .procmailrc
I have changed them to this (as suggested by your disclaimer page) and
tried without any effect.
-rwx------ 1 billing site73 34 Feb 26 17:05 .forward
-rwx------ 1 billing site73 228 Feb 27 10:52 .procmailrc
For that matter, if /etc/procmailrc IS actually being run okay as you say
above, then procmail must already be your LDA (the script will help confirm
that, BTW), and thus you DO NOT NEED A .forward FILE. Just put the
.procmailrc in the user dir and set perms correctly (again, the script will
attempt to discern the perms issue).
These seem to work (mail doesn't get returned) but procmail is never
run (recipes aren't executed and the logfile is never built).
Have you looked into your mailer log to see if there is anything emitted
there about this? If the .forward perms are incorrect (say, anyone other
than the file owner has WRITE perms), the FILE SHOULD BE COMPLETELY
IGNORED, and the mail simply deposited into that users mailspool.
DOH! I assumed that procmail would log to the logfile I told it to
use. I didn't think to check the mail log for procmail messages. I
have this error:
procmail: Suspicious rcfile
Which sounds like bad permissions, but they seem to be correct.
I suggest that you retrieve <http://www.professional.org/procmail/procdiag.sh>
log in as this billing user, review that script (unless you trust running
scripts you get from complete strangers), then run that script as per the
documentation at the top of it.
It will gather some info about your configuration which can help us figure
out what is going on. Review what is returned, then post it to this list.
You'll understand if I don't release ALL that information, but I think
this will cover the important issue. If you need more pieces, let me
know which ones. Also, I removed the .forward file since you (and the
documentation) have stated I don't need it.
# formail and procmail information (as per versions in the current path):
0755 1 root root 27776 Fri Sep 3 23:21:13 1999 /usr/bin/formail
formail v3.13.1 1999/04/05, Copyright (c) 1999, Stephen R. van den Berg
6755 1 root mail 69844 Fri Sep 3 23:21:13 1999 /usr/bin/procmail
procmail v3.13.1 1999/04/05, Copyright (c) 1999, Stephen R. van den Berg
Locking strategies: dotlocking, fcntl()
Default rcfile: $HOME/.procmailrc
Your system mailbox: /var/spool/mail/billing
# various procmail configuration elements:
# sendmail program information:
4555 1 root mail 306372 Tue Nov 23 00:36:47 1999 /usr/sbin/sendmail
Compiled with: MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND
NETINET NETUNIX NEWDB NIS QUEUE SCANF SMTP USERDB XDEBUG
# Determining Mlocal in sendmail.cf
Mlocal, P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=10/30, R=20/40,
A=procmail -Y -a $h -d $u
NOTE: procmail appears to be the LDA
NOTE: There is no /etc/mail/sendmail.cf file.
# contents of /home/sites/site73/users/billing/.forward (if it exists)
NOTE: no /home/sites/site73/users/billing/.forward
# file permissions and ownership:
0700 1 billing site73 228 Wed Feb 27 10:52:47 2002
NOTE: There is no /home/sites/site73/users/billing/.forward file.
2771 4 billing site73 1024 Wed Feb 27 16:50:36 2002
CAUTION: /home/sites/site73/users/billing perms exceed 7755: curb back to 2751
NOTE: There is no /etc/procmailrc file.
NOTE: There is no /etc/procmailrcs file.
NOTE: There is no /home/sites/site73/users/billing/Mail file.
2700 2 billing site73 1024 Wed Feb 27 16:48:25 2002
NOTE: There is no /home/sites/site73/users/billing/.procmail file.
0600 1 billing site73 0 Wed Feb 27 16:53:55 2002
I see the caution on the user's directory there. All user directories
are like this:
drwxrws--x 4 billing site73 1024 Feb 27 16:50 billing
Apparently the group readable is causing procmail to skip the file.
Somehow I didn't get this out of the faq / docs. So I apologize if
Just to appease my curiosity, why is procmail concerned about group
writable ability on the user's directory when the .procmailrc file is
not group writable?
Anyway, changing this seems to have fixed the problem. I don't think I
could have found it without the diagnostic shell though.
Thanks very much for the assistance and troubleshooting walk-through.
Wadsack-Allen Digital Group
procmail mailing list