At 20:57 2008-08-18 -0700, Robert Holtzman wrote:
I was saving a little bandwidth. I had downloaded hundreds of messages and
the logfile was immense.
Well, uhm, the idea is to post that section of the logfile which pertains
to the example message.
What I showed was that there was no mention of backup in the file at
that time. Subsequently, a *few* (5 or 6 out of
several hundred messages) have begun showing up. If you really want to see
the entire file I will try to time a download when there are only a few
(50 or 60) messages and send that.
Why can't you parse the logfile to just one message worth of events?
procmail: [15909] Mon Aug 18 16:02:25 2008
procmail: Assigning "MAILDIR=/var/spool/mail/holtzm"
procmail: Couldn't chdir to "/var/spool/mail/holtzm"
procmail: Assigning "MAILDIR=."
Why do ya figure you can't chdir to /var/spool/mail/holtzm ? Does this not
sound alarms for you?
procmail: Assigning "INCLUDERC=/home/holtzm/Procmail/lists.rc"
Ok, we've included the first rcfile. This, I note, is as deep as you get
for any of the messages in this batch.
procmail: No match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)(plug-discuss(_at_)lists(_dot_)PLUG(_dot_)phoenix(_dot_)az(_dot_)us)"
procmail: No match on
"TO(grepmail-users(_at_)lists(_dot_)sourceforge(_dot_)net)"
Er, looks like you have a syntax error there. Wanna bet you're missing a
caret at the start?
procmail: No match on "^CC:(_dot_)pine-info(_at_)u(_dot_)washington(_dot_)edu"
Dots you want evaluated as dots should be escaped, and the first dot in
that expression probably isn't enough to match that field consistently...
procmail: No match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?):(_dot_)pine-info(_at_)u(_dot_)washington(_dot_)edu"
FTR, note the Cc in the first line of that, and that you're trying to match
the same address as the previous condition. Unless your delivery actions
differ, your previous recipe is unneeded.
[snipperdoodles]
procmail: Match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)users(_at_)openoffice(_dot_)org"
procmail: Locking "/home/holtzm/mail/list-openoffice-users.lock"
procmail: Assigning "LASTFOLDER=/home/holtzm/mail/list-openoffice-users"
procmail: Opening "/home/holtzm/mail/list-openoffice-users"
procmail: Acquiring kernel-lock
procmail: Unlocking "/home/holtzm/mail/list-openoffice-users.lock"
procmail: Notified comsat:
"holtzm(_at_)34991024:/home/holtzm/mail/list-openoffice-users"
From holtzm Mon Aug 18 16:02:25 2008
Subject: Re: [users] Multi-Lingual Environment
Folder:
/home/holtzm/mail/list-openoffice-users 3915
This message won't be delivered to the backup recipe because it was
delivered BEFORE that recipe was invoked, apparently not as a COPY.
[snipperdoodles]
procmail: Match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)chevelle-list(_at_)chevelles(_dot_)net"
Again, matched on something in lists, and subsequently delivered.
procmail: Match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)users(_at_)openoffice(_dot_)org"
Take a guess...
procmail: Match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)fedora-list(_at_)redhat(_dot_)com"
'cmon, see a pattern?
procmail: Match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)fedora-list(_at_)redhat(_dot_)com"
...
procmail: Match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)ubuntu-users(_at_)lists(_dot_)ubuntu(_dot_)com"
...
All this from 6 messages, Did you really want me to post the log file with
200+ messages?
Nah, I suspect he figured you could manage to cut and paste the parts
associated with a single message. Or like, clear the log and INJECT a
single message into the procmailrc.
See the URL in my .sigfile and grab the procmail sandbox. You'd benefit
from trying it out.
Your mail problem is probably not about your backup.rc, but about how
your .procmailrc calls it.
After we tortured you for a while, you now told us about that structure,
so when will you spill how you implemented it?
Implemented from ~/.procmailrc:
### Begin Variables Section ####
# Next line is needed if programs are invoked from your procmailrc
SHELL=/bin/sh
Actually, needed only if the USER doesn't have a useable shell
defined. More commonly, this is set in the /etc/procmailrc file, where
mail might be processed on behalf of a user who lacks shell
access. Certainly nothing wrong with setting it properly, but the comment
line isn't wholly correct.
LOGFILE=$PMDIR/pmlog
LOG="
"
FTR, not uncommonly, people set:
$NL="
"
and then use:
LOG="whatever${NL}"
to insert line breaks where desired without having to split the LOG
lines. What you're doing isn't WRONG though.
VERBOSE=yes
MAILDIR=/var/spool/mail/holtzm # Make sure this directory exists!
And, might I point out, that you have permiissions to access it. Please
refer to your logfile, which I'm guessing you haven't examined very closely...
INCLUDERC=$PMDIR/lists.rc
#INCLUDERC=$PMDIR/spamc.rc
INCLUDERC=$PMDIR/basics.rc
INCLUDERC=$PMDIR/backup.rc
Uhm, whycome your backup is done last (excepting the SA, which is commented
out, so doesn't count)? Backup won't back up a damn thing if mail is
consistently delivered (and procmail terminates) BEFORE you ever get around
to loading the rcfile.
(use $HOME in stead of /home/holtzm, and
set MAILDIR to $HOME/mail)
Reason? MAILDIR=/var/spool/mail/holtzm has been working for years.
I'll consider it if you can supply a reason.
Portability. Reliability. If you rip your rules and put them on another
account or another host, etc, $HOME will properly resolve to the home
directory for whatever user you're invoking the script for. Less stuff for
you to need to change to ensure things WORK.
I prefer to use system config settings, like $HOME and $MAIL, for
setting such variables.
This appears to be personal preference.
Portability and reliability seem like good things to take a preference for.
Remind me - who is posting about how things aren't working, and is just now
discovering that apparently they haven't worked entirely right since
when? When things were ported to a new host?
:0 c
/home/holtzm/mail/backup
You mentioned that "backup" is a file. That recipe has no locking flag.
Is locking arranged at the .procmailrc level?
I would assume so as it has worked well for years. Also, there has never
been a lockfailure message.
You would assume so because it didn't fail catastrophically for
years. Have you ever had to USE the backup? Do you know for sure that it
isn't spaghetti?
You won't get a lock failure message if you're not bothering to try to lock
the file in the first place.
Recommendation: add a lockfile flag to the flag line. How do you figure
that will hurt?
How many messages does the file "backup" contain? You might be better of
with maildir-type delivery.
667 messages since ubuntu was installed in June. Damn! That means it
hasn't worked right since I switched systems. That's strange since the
.procmailrc file and Procmail directory containing the backup.rc file were
copied from the old system via CDROM.
And your user permissions all remained globally the same? Every other
program which is part of your mail delivery stream has remained unchanged
in design and implementation since your previous system? I doubt it.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail