procmail
[Top] [All Lists]

Re: Local Mailing problem

2001-01-22 09:39:06
Nilanjan Sircar is having problems making sendmail, fetchmail,
and procmail cooperate to successfully deliver both internet and local
mail. The internet part is working with recipes like:

| [snip]
|  :0c
|  * ^TOpm(_at_)shrilcal(_dot_)virtualave(_dot_)net
|   {
|    :0fw
|    |fetchmail -i "To:acct(_at_)shrilcal(_dot_)virtualave(_dot_)net"
| 
|    :0
|    ! acct
| 
|   }
|
| [snip]
| # Other usesrs all also defined below with :0c  
| 

But he says the recipe above doesn't properly forward from user "pm" to
user "acct", and wonders what could be wrong.

First, you will likely get the usual warnings from others on the list
about the difficulties of using procmail with multi-drop mailboxes. I
won't offer them, and my advice will be incomplete, because I have no
experience with fetchmail or multi-drop mailboxes.

Nonetheless, it seems reasonably safe to assume the recipe above is
never executed on local deliveries. It's impossible to say whether
that's because a prior recipe in this rcfile or previous rcfile is
delivering, or the condition on this one is not matching. If the later,
it might be because sendmail has been configured not to canonify
addresses. In either case, the procmail log would be a good place to
start looking.

You are using a log file, right? It is pretty close to imperative when
starting out and when adding or modifying existing recipes. If the
volume is too high to keep logs for every delivery, then just wrap the
modified recipe with the necessary variable assignments. I use multiple
rcfiles, chained together with INCLUDERC. In the first one I set LOGFILE
and VERBOSE. Then each succeeding rcfile starts with VERBOSEIN=$VERBOSE
and ends with VERBOSE=$VERBOSEIN. That way I can easily change the log
verbosity in each rcfile without having to think about it's current
"global" setting. With or without multiple rcfiles, you can still change
it per recipe. In fact, if you want to write to a separate logile to
debug a single recipe, you can do that too. Something like:

LOGFILEOLD=$LOGFILE
LOGFILE=path/to/special/procmaillog
VERBOSEOLD=$VERBOSE
VERBOSE=yes

* new/modified recipe condition(s)
  recipe action

LOGFILE=$LOGFILEOLD
VERBOSE=$VERBOSEOLD

If you wrap even of the recipe examples you gave with something like
that above, and send two test messages (one local, one internet), the
"special" log file will give you some clues without affecting and
existing logging or deliveries.  That is certainly better than blindly 
speculating on what might be wrong.


Don Hammond



_______________________________________________
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>