procmail
[Top] [All Lists]

Re: procmail inserting blank line in headers

1999-02-03 14:52:25
*selah* <soma(_at_)dorsai(_dot_)org> writes:
This is the script:

         #!/bin/sh

         ORGMAIL=/mount/var/spool/mail/$LOGNAME

         if cd $HOME &&
          test -s $ORGMAIL &&
          lockfile -r0 -l3600 .newmail.lock 2>/dev/null
         then
           trap "rm -f .newmail.lock" 1 2 3 15
           umask 077
           umask 077
           lockfile -l3600 -ml
           cat $ORGMAIL >>.newmail &&
            cat /dev/null >$ORGMAIL
           lockfile -mu
           formail -s procmail <.newmail &&
            rm -f .newmail
           rm -f .newmail.lock
         fi
         exit 0

Okay, let's look at the many stages of mail handling under this:

1)      The message is received by the MTA
2)      The MTA delivers it to /mount/var/spool/mail/$LOGNAME
3)      The above script copies it to $HOME/.newmail
4)      formail splits $HOME/.newmail and invokes...
5)      ...procmail, which then processes it.  This processing may include
5b)     filtering
6)      procmail delivers it to some mailbox
7)      pine reads in the message

Since things work when the script is disabled, the message must be fine
after #2.  #3 is just a copy, so it should not be the source of the
procmail.  Can you check after #6 and see whether the message is fine?
You may want to look at the mailbox with "cat -evt" which will display
control-characters, nuls, extra-whitespace, etc.  What happens if you
use a minimal .procmailrc that just delivers the message to a mailbox
and no other processing?


Philip Guenther

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