procmail
[Top] [All Lists]

Re: Trying to forward mail....

2002-01-10 16:18:38
Anthony followed up,

| SENDMAIL is /usr/sbin/sendmail

Was that the output of the command I asked you to run?  If so, then
/usr/sbin/sendmail is the compiled-in value in effect before procmail
processes /etc/procmailrc.  [In fact, because that command line used a named
rcfile (/dev/null), procmail shouldn't have read /etc/procmailrc at all when
you tried it.]  Apparently you had the right value for $SENDMAIL compiled in
all along but were unsetting it or nulling it out in /etc/procmailrc before.

| I need to remember that...I changed my sendmail variable in
| /etc/procmailrc and it works like a charm now.

That's good.  But you see, normally you shouldn't be changing SENDMAIL in
/etc/procmailrc; you should let the makefile figure out the value to compile
in (or setting it at compilation time if the makefile can't figure it out
properly) and leave the compiled-in value alone at run-time.

The only time you should set SENDMAIL or ORGMAIL, either in /etc/procmailrc
or in a user's .procmailrc, is when something has changed their correct
values and you haven't recompiled procmail yet, or temporarily while you're
experimenting or debugging.  Otherwise make sure that the right values are
programmed in at compilation time and leave them alone at run time.  There
may be other variables of which the same can be said.

My last question: what happens if /etc/procmailrc leaves the SENDMAIL
variable alone?  Try this:

1. Delete (or comment out) all SENDMAIL assignments appearing in
   /etc/procmailrc.
2. Put this at the very top of your $HOME/.procmailrc:

 # if stderr is a terminal, then we called procmail from a shell prompt
 # or from a shell script; this won't affect incoming mail
 :0
 * ? test -t 2
 {
   # Drop one line before closing quote:
   LOG="SENDMAIL is $SENDMAIL
"
   HOST
 }

3. At a shell prompt, do

   procmail < /dev/null

It should tell you that $SENDMAIL is already /usr/sbin/sendmail, so you
should leave it alone in /etc/procmailrc.

| Thanks for the help on this!

You're welcome.



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>