procmail
[Top] [All Lists]

Script problem - "skipped" and store/forward problems

1996-04-26 16:42:26

I sent a previous version of this message last night, but my ISP was 
having problems, and having not seen it on the list yet, I don't know 
if it went through [note: it turns out this is probably because I'm 
mailing from a different address than where I'm subscribed from - oops].  
This version contains the scripts in their entirety attached as MIME 
(which, being ASCII text files are readable as-is).  Files are named as 
per MS-DOS limitations here (most notably, .procmailrc is procmail.rc)

The system is running Procmail v3.11pre3

I'm trying to get a SIMPLE maillist function working (and do a couple 
of other things), and it seems everything is working against me.  And 
of course, so far as I know, the only way to test this is to put it 
into place, which is a bit troublesome since it affects my regular mail 
distribution.

In some places (in rule expressions especially), variables don't seem 
to expand, which it a bit annoying.  I ran into this before, and I gave 
up on it and just coded the strings I was searching for all over the 
place.


but the messages never get forwarded.  They show up in the mailbox 
though.  I set VERBOSE on, and check the log, and I get the following:

These are the results of the log when I set VERBOSE on and send a 
message to PSE(_at_)professional(_dot_)org (the default mail case handled at 
the 
very end); my comments are indented:

procmail: Assigning "INCLUDERC=/home/pse/.procmail/boxes.rc"
procmail: No match on "^From:.*root"
procmail: No match on "^Subject:.*Flame"
procmail: No match on "^Precedence:.*bulk"
procmail: No match on 
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-
To):(.*[^a-zA-Z])?)KOlson"
    [snip - many more of these, which are expected]
procmail: No match on 
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-
To):(.*[^a-zA-Z])?)ixa-list(_at_)professional(_dot_)org"
procmail: Locking "/home/pse/temp/Default.lock"
procmail: Executing "/usr/sbin/sendmail,PSE(_at_)ix(_dot_)netcom(_dot_)com"
    [WHY is there a COMMA?  I've tries putting the address in quotes,
    adding spacing between it and the bang (!) forward command, no
    luck]
procmail: [11632] Fri Apr 26 13:07:52 1996
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail 
PSE(_at_)ix(_dot_)netcom(_dot_)com"
    [Note here, no comma...]
procmail: Unlocking "/home/pse/temp/Default.lock"
procmail: Assigning "LASTFOLDER=/home/pse/Mail/mbox"
procmail: Opening "/home/pse/Mail/mbox"
procmail: Acquiring kernel-lock
From PSE(_at_)ix(_dot_)netcom(_dot_)com  Fri Apr 26 13:07:50 1996
 Subject: testing.
  Folder: /home/pse/Mail/mbox                                              
1357
    [all of these are one long line]
procmail: Notified comsat: "pse(_at_)34968:/home/pse/Mail/mbox"
    [WHAT is this???]


originally, among other status messages, I was getting:

procmail: Skipped "ARCHIVE"
procmail: Skipped ".listname"

when I was using mailbox names with periods in them (ARCHIVE.listname), 
but these went away when I changed the mailbox names to 
ARCHIVE-listname.  Why do I get grief using a period?

The idea was that if the mail was addressed to listname, we'd process 
it (mailing it to the recipients), and then save a copy to a crude 
archive file.

The end result I'm looking for is that any mail not handled by a 
previous rule (or which that rule specifies to continue on), will be 
forwarded and stored to a file.  I'd REALLY like it if the default rule 
at the end (which stores and forwards) would only store if it hadn't 
already been saved to an archive, but still always forward (I don't 
want to have to specify an address in the .forward file, as I don't 
want to see mail that is being archived or forwarded).

As long as I'm pestering everyone, is there a way to specify a file 
containing a list of email addresses to Sendmail?  I don't want to have 
to have the names IN the script (but at the moment, that is what 
works), and neither do I want to have the list mail contain everyones 
addresses.

What am I doing wrong?

(BTW - this is a virtual domain configuration, so I don't have ROOT 
access to SENDMAIL as a delivery agent - everything sent to the domain 
goes into one POP mailbox).

I appreciate any assistance I can get here.

-- 
NetCruisers:  http://www.professional.org/
Home of NCUtil, 3rd-party utility links (including Winsock), and FAQs!

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395
 CompuServe: 72210,521           Internet: PSE(_at_)ix(_dot_)netcom(_dot_)com


#
#       File: .procmailrc
#
#       /* SBS  26 APR 1996 12:42:49 */
#

# note that paths are set in here because this script is expected to be
# executed when there is no active shell running.

#set on when debugging
VERBOSE=on

#set the max number of characters in the line buffer
LINEBUF=4096

#set temp to what it might normally be
TEMP=$HOME/temp

#set a path..
PATH=$HOME/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/lib:/usr/etc:


# Extract the file name by deleting words SEND, PUTCOPY the blanks and
# converting to lower case.  This is placed at the begining of .procmailrc .
# Of course, LATER in the script, we'll determine whether we actually handle
# a file at all.

SHELL=/bin/sh
FILENAME=`formail -xSubject: | \
          sed -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
              -e s/putcopy//g -e s/send//g -e s/" "//g`

#replace 'mail' with mail dir.  Elm uses Mail
MAILDIR=$HOME/Mail

# completely optional -- storage for regular mail
DEFAULT=$MAILDIR/mbox

#directory for storing procmail log and rc files
PMDIR=$HOME/.procmail

#email addresses
NOTIFYADDR=PSE(_at_)ix(_dot_)netcom(_dot_)com
HOSTADDR=PSE(_at_)professional(_dot_)org
OFFSITE=$NOTIFYADDR

#path for auto-reply texts (except USENET.NWS)
AUTOREPLY=$HOME/auto-reply

#this is the vacation database stuff
VACATION=$MAILDIR/vacation # on vacation? 
VACATIONMSG=$MAILDIR/vacation.msg # the vacation reply 
ALREADYSENT=$MAILDIR/vacation.dat # sender database

#program to use for sendmail
#SENDMAIL=/usr/local/bin/elm
SENDMAIL=/usr/sbin/sendmail

#program to use for splitmail, along with a max size
SPLITMAIL="/usr/local/bin/splitmail -s 300000 -d"

# generate a full path string for the filename request
FULLPATH=$AUTOREPLY/$FILENAME

#determine if Precedence: junk
#determine if Precedence: bulk
#determine if Precedence: list

LOGFILE=$PMDIR/log

# INCLUDERC=$PMDIR/testing.rc
INCLUDERC=$PMDIR/boxes.rc
# INCLUDERC=$PMDIR/listproc.rc
#  INCLUDERC=$PMDIR/maillist.rc
# INCLUDERC=$PMDIR/files.rc
# INCLUDERC=$PMDIR/files3.rc
#  INCLUDERC=$PMDIR/files2.rc
#  INCLUDERC=$PMDIR/files1.rc
#  INCLUDERC=$PMDIR/response.rc
#  INCLUDERC=$PMDIR/vacation.rc

# all mail not handled by now, will simply be recorded and forwarded to the
# primary offsite address.  Mail and store.
# Would like to eventually get it so I don't store a copy of something
# which has already been stored in another folder...
:0 c: $TEMP/Default$LOCKEXT
!PSE(_at_)ix(_dot_)netcom(_dot_)com

:0
$DEFAULT


#
#       File: boxes.rc
#
#       Handles private mail drop boxes for web services I'm hosting.
#
#       /* SBS  26 APR 1996 12:42:59 */
#

# should be debugged and working

:0 : $TEMP/Admin$LOCKEXT
* ^From:.*root
* ^From:.*sysadm
* ^From:(_dot_)*support(_at_)netcom(_dot_)com
IN-admin

:0 : $TEMP/Trash$LOCKEXT
* ^Subject:.*Flame
* ^Subject:.*fuck
* ^Subject:.*asshole
* ^Subject:.*shit
IN-trash

:0 : $TEMP/Junkmail$LOCKEXT
* ^Precedence:.*bulk
* ^Precedence:.*junk
IN-junkmail

:0 : $TEMP/KCO$LOCKEXT
* ^TOKOlson
IN-kco

:0 : $TEMP/RRO$LOCKEXT
* ^TOROlson
IN-rro

:0
* ^TOGlenRotan
!glen(_dot_)rotan(_at_)autodesk(_dot_)com

:0
* ^TOBarbaraStraw
!barbara(_dot_)straw(_at_)autodesk(_dot_)com

:0 : $TEMP/Delight$LOCKEXT
* ^TODelight
IN-delight

:0 c: $TEMP/Webmaster$LOCKEXT
* ^TOWebmaster
ARCHIVE-webmaster

:0 c: $TEMP/TechFile$LOCKEXT
* ^TOTechFile
ARCHIVE-techfile

:0 c: $TEMP/HumourFile$LOCKEXT
* ^TOHumourFile
ARCHIVE-humourfile

:0 c: $TEMP/NSRSFile$LOCKEXT
* ^TONSRSFile
ARCHIVE-nsrsfile

:0 c: $TEMP/WindsorFile$LOCKEXT
* ^TOWindsorFile
ARCHIVE-windsorfile

:0 c: $TEMP/IXA$LOCKEXT
* ^TOixa-list(_at_)professional(_dot_)org
{
        :0 c
        INCLUDERC=$PMDIR/ixa.rc

        :0
        ARCHIVE-ixalist
}


#
#       ProcMail script for ix advisors mailing list
#       /* SBS  26 APR 1996 12:42:40 */
#

listaddr=ixa-list(_at_)professional(_dot_)org
listowner=ixa-mailer(_at_)professional(_dot_)org
listreq=$listowner
listdist="danabram(_at_)ix(_dot_)netcom(_dot_)com 
annmarti(_at_)ix(_dot_)netcom(_dot_)com bedelman(_at_)ix(_dot_)netcom(_dot_)com 
wmcharg(_at_)ix(_dot_)netcom(_dot_)com oitsubob(_at_)ix(_dot_)netcom(_dot_)com 
gerry(_dot_)g(_at_)ix(_dot_)netcom(_dot_)com 
kob1(_at_)ix(_dot_)netcom(_dot_)com adasko(_at_)ix(_dot_)netcom(_dot_)com 
pse(_at_)ix(_dot_)netcom(_dot_)com 
s(_dot_)nemeth(_at_)ix(_dot_)netcom(_dot_)com 
jwillox(_at_)ix(_dot_)netcom(_dot_)com jfjame
s(_at_)ix(_dot_)netcom(_dot_)com sharkmap(_at_)ix(_dot_)netcom(_dot_)com"
#listdist="sstraw(_at_)mindscape(_dot_)com pse(_at_)ix(_dot_)netcom(_dot_)com"
sendmailOPT="-oem -odb -oi -F$listaddr"
foreign_submit=

:0 Wh
* $!^X-Loop: $listaddr
* !^Precedence:.*junk|^FROM_MAILER
METOO=  | formail -X"From " -xFrom: -xReply-To: -xSender: -xResent-From: \
            -xResent-Reply-To: -xResent-Sender:

#
# Main header munger for submissions passing through this list.
#

:0 A wfh
| formail -b -IReceived: -IReturn-Receipt-To: -IErrors-To: \
   -I"Return-Path: \<ixa-owner(_at_)professional(_dot_)org\>" -iX-Envelope-To: 
-iX-Envelope-From: \
   -I"Precedence: list" -I"Resent-Sender: 
ixa-owner(_at_)professional(_dot_)org" \
   -a"Resent-From: ixa-list(_at_)professional(_dot_)org" -a"X-Loop: 
ixa-list(_at_)professional(_dot_)org" \
   -I"Reply-To: ixa-list(_at_)professional(_dot_)org" \
   -a"Subject: Unidentified subject!" \
   -a"X-Mailing-List: \<ixa-list(_at_)professional(_dot_)org\>"

#
# The following recipe will distribute the message to the subscribers.
# Locking is done before this script include...
#

#:0 A w
#* !?test -z "$foreign_submit$METOO"
#! $sendmailOPT $METOO $listdist

:0 A w
! $sendmailOPT $listdist


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