procmail
[Top] [All Lists]

Procmail guru

1998-06-11 06:44:59
Hi.

I was told this is where the procmail gurus hang out. I have been humbled by procmail and have a problem that I'm clueless on how to solve.

My goal is to send an .rtf attachment with an auto-responder email. The way I determined the format was to send an email with a .rtf attachment to myself, and before reading it, I used Pine to save the file. I then used that file as the template for my recipe.

Procmail diagnostics are not showing any errors that I can see, except it's not setting LASTFOLDER after the incoming email has been saved to my log file... so I'm stumped. Any help would be greatly appreciated.

Thank you!

David Walonick
mailto:david(_at_)statpac(_dot_)com


Here is the current recipe. Notice that one line is commented out. If I include that line, I don't get any auto-reply. If I comment the line out, everything looks fine in the new mail except no Mime line appears and (of course) no multipart content line...Thus, it get interpreted as just a text file (see below):

:0
* ^TOtest
{
:0 c
* !^From +YOUR_USERNAME
* !^Subject:.*Re:
* !^FROM_DAEMON
* ^TOtest
| (formail -r -I "Subject: Safe at School" \
-I "From: David" \
-I "Reply-To: safety-sales(_at_)statpac(_dot_)com" \
-I "Mime-Version: 1.0" ; \
# -I "Content-Type: multipart/mixed; boundary=\"_statpacboundry_\"" ; \
echo "--_statpacboundry_" ; \
echo 'Content-Type: text/plain; charset="us-ascii"' ; \
echo "" ; \
cat $HOME/replies/freechap.txt; \
echo "" ; \
echo "--_statpacboundry_"; \
echo 'Content-Type: application/rtf; charset="us-ascii"' ; \
echo 'Content-Disposition: attachment; filename="freechap.rtf"' ; \
echo "" ; \
cat $HOME/replies/freechap.rtf; \
echo "" ; \
echo "--_statpacboundry_--" ) | $SENDMAIL -oi -t
}
:0:
* ^TOtest
logs/safety.log


This is the resulting auto-responder email when I comment out the multi-part content line (almost ok) There is a blank line where the Mime line should be (don't know why it's not showing) and another blank line to finish the header. I believe there are also two blank lines at the end.

Date: Wed, 10 Jun 1998 05:34:16 -0500 (CDT)
To: david(_at_)statpac(_dot_)com
References: <3(_dot_)0(_dot_)32(_dot_)19980610053602(_dot_)00952d20(_at_)mailhost(_dot_)mm(_dot_)com>
Subject: Safe at School
From: David
Reply-To: safety-sales(_at_)statpac(_dot_)com
NOT SHOWING???: -I "Mime-Version: 1.0" ; \
NOT SENT: -I "Content-Type: multipart/mixed; boundary=\"_statpacboundry_\"" ; \



--_statpacboundry_
Content-Type: text/plain; charset="us-ascii"

Thank you for coming here. Here is your free chapter.

David
--_statpacboundry_
Content-Type: application/rtf; charset="us-ascii"
Content-Disposition: attachment; filename="freechap.rtf"

{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f16\froman\fcharset238\fprq2 Times New Roman
more of the same
--_statpacboundry_--



This is the procmail diagnostic log that looks OK to me even when the Content line is included, except at the end where procmail is not setting LASTFOLDER to my email after it has saved the incoming email in my log.

procmail: Match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)test"
procmail: Extraneous locallockfile ignored
procmail: Locking "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)test.lock"
procmail: Unlocking "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)test.lock"
procmail: Match on ! "^From +YOUR_USERNAME"
procmail: Match on ! "^Subject:.*Re:"
procmail: Match on ! "(^(Precedence:.*(junk|bulk|list)|(((Resent-)?(From|Sender)|X-Envelope-From):|>?From )(.*[^((_dot_)%(_at_)a-z0-9])?(Post(ma?(st(e?r)?|n)|office)|(send)?Mail(er)?|daemon|mmdf|root|n?uucp|smtp|response|LISTSERV|owner|request|bounce|serv(ices?|er)|Admin(istrator)?)([^).!:a-z0-9].*)?$[^>]))"
procmail: Match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)test"
procmail: Executing " (formail -r -I "Subject: Safe at School" \
-I "From: David" \
-I "Reply-To: safety-sales(_at_)statpac(_dot_)com" \
-I "Mime-Version: 1.0" ; \
-I "Content-Type: multipart/mixed; boundary=\"_statpacboundry_\"" ; \
echo "" ; \
echo "--_statpacboundry_" ; \
echo 'Content-Type: text/plain; charset="us-ascii"' ; \
echo "" ; \
cat $HOME/replies/freechap.txt; \
echo "" ; \
echo "--_statpacboundry_"; \
echo 'Content-Type: application/rtf; charset="us-ascii"' ; \
echo 'Content-Disposition: attachment; filename="freechap.rtf"' ; \
echo "" ; \
cat $HOME/replies/freechap.rtf; \
echo "" ; \
echo "--_statpacboundry_--" ) | $SENDMAIL -oi -t"
procmail: Assigning "LASTFOLDER= (formail -r -I "Subject: Safe at School" \
-I "From: David" \
-I "Reply-To: safety-sales(_at_)statpac(_dot_)com" \
-I "Mime-Version: 1.0" ; \
-I "Content-Type: multipart/mixed; boundary=\"_statpacboundry_\"" ; \
echo "" ; \
echo "--_statpacboundry_" ; \
echo 'Content-Type: text/plain; charset="us-ascii"' ; \
echo "" ; \
cat $HOME/replies/freechap.txt; \
echo "" ; \
echo "--_statpacboundry_"; \
echo 'Content-Type: application/rtf; charset="us-ascii"' ; \
echo 'Content-Disposition: attachment; filename="freechap.rtf"' ; \
echo "" ; \
cat $HOME/replies/freechap.rtf; \
echo "" ; \
echo "--_statpacboundry_--" ) | $SENDMAIL -oi -t"
procmail: [13821] Wed Jun 10 09:01:45 1998
procmail: Match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)test"
procmail: Locking "logs/safety.log.lock"
procmail: Assigning "LASTFOLDER=logs/safety.log"
procmail: Opening "logs/safety.log"
procmail: Acquiring kernel-lock
Unmatched ".
procmail: [13821] Wed Jun 10 09:01:46 1998
procmail: Unlocking "logs/safety.log.lock"
>From david(_at_)statpac(_dot_)com Wed Jun 10 09:01:43 1998
Folder: logs/safety.log 606

It is missing something like this at the end of the log file (i.e., these lines were at the end of the log when I commented out the multi-part content line)
procmail: No match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)test"
procmail: Locking "/usr/spool/mail/statpac.lock"
procmail: Assigning "LASTFOLDER=/usr/spool/mail/statpac"
procmail: Opening "/usr/spool/mail/statpac"
procmail: Acquiring kernel-lock
procmail: [21100] Thu Jun 11 07:50:43 1998
procmail: Unlocking "/usr/spool/mail/statpac.lock"
>From statpac Thu Jun 11 07:50:42 1998
Subject: Safe at School
Folder: /usr/spool/mail/statpac 9253


<Prev in Thread] Current Thread [Next in Thread>
  • Procmail guru, StatPac Inc. <=