procmail
[Top] [All Lists]

Weird Error With Auto Reply Recipe

2001-11-15 22:15:51

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have a simple auto reply recipe that, as far as I can tell, is working as 
expected, but every once in awhile I'm getting the following error (sender 
addresses changed):

 From someone(_at_)somewhere(_dot_)org  Tue Nov 13 14:13:04 2001
  Subject: Re: What's up this weekend
   Folder: 
/var/spool/mail/derek                                            4112
procmail: Error while writing to " (formail -r \
          -A"X-Loop: derek(_at_)battams(_dot_)ca" ; \
          echo ""; echo "Your e-mail titled \"$SUBJ\" has been received!"; \
          echo ""; \
          cat $MSGFILE; ) \
       | sendmail -oi -t"

 From someone(_at_)somewhere(_dot_)net  Tue Nov 13 16:38:58 2001
  Subject: Christmas Plans
   Folder:  (formail -r \          -A"X-Loop: derek(_at_)battams(_dot_)ca" ; 
\         2443
procmail: Error while writing to " (formail -r \
          -A"X-Loop: derek(_at_)battams(_dot_)ca" ; \
          echo ""; echo "Your e-mail titled \"$SUBJ\" has been received!"; \
          echo ""; \
          cat $MSGFILE; ) \
       | sendmail -oi -t"

I'm not able to reproduce the error and it doesn't happen on every message 
that is delivered.  Postfix is receiving my mail and automatically passes 
it on to procmail.  I'm using procmail 3.15.1.  The receipe I'm using is 
pasted below (an adaptation of the "vacation" recipe in the procmailrc man 
page).

# Define my default mailbox
MAIL=/var/spool/mail/derek

# Define the file containing the auto reply message
MSGFILE=$HOME/.autoreply

:0
* !^FROM_DAEMON
* !^X-Loop: derek(_at_)battams(_dot_)ca
* ^TO_(derek(_at_)battams(_dot_)com|dbattams(_at_)canada(_dot_)com)
* ? test -s $MSGFILE
{
    # Extract the subject of the message - used below
    SUBJ=`formail -c -xSubject: | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`

    # Deliver the mail
    :0 c:
    $MAIL

    # Create the auto reply message
    :0
       | (formail -r \
          -A"X-Loop: derek(_at_)battams(_dot_)ca" ; \
          echo ""; echo "Your e-mail titled \"$SUBJ\" has been received!"; \
          echo ""; \
          cat $MSGFILE; ) \
       | sendmail -oi -t
}

Any help would be greatly appreciated.

Thanks,

Derek Battams

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBO/Sd4FbDRcu4fEtiEQLk3QCcCfS0xXqnbeAxAWXx+Ld44zcIHWwAn1KP
cLZZBCxLE6oCBtAVishdvcEM
=gB5N
-----END PGP SIGNATURE-----

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