procmail
[Top] [All Lists]

Re: wit's end: .procmail woes

2004-04-14 12:39:19
On Wed, 14 Apr 2004, Professional Software Engineering wrote:

At 13:12 2004-04-14 -0400, Gabe Law wrote:
machine 1: (Solaris 9)
This machine is both the initial recipient for all of my email, and the
final recipient.

If you're actually forwarding the mail back to this host, you should insert
an X-Loop: header into your messages (actually, a goof idea to do whenever
forwarding mail anyway, but especially to yourself).

Ok.  Add the header from machine 1 to machine 2?  Or both?

# This recipe works fine when the forwarding part of machine 2's
# .procmailrc is off, and vice versa.  But when both are uncommented
# mail doesn't appear anywhere

Well, uhm, a VERBOSE logging would help diagnose what's up with
that.  Sounds loop-like, esp if the preceeding recipes don't actually end
up matching.

Yeh, I really think it has something to do with the loop.  Because the
problem only comes up with I complete the loop.  Actually, adding the
VERBOSE logging helped me with the recipes you gave me.

:0
* ! SUBJ_ ?? ^ BMISPAM

Insertion of erratic spaces is a BAD THING.  As I posted it (and as I
received my copy of my post from the list), there was no space between the
carat and the BMISPAM text.  As reposted by you however, this won't end up
matching when the SUBJ_ string actually DOES start with BMISPAM, and thus
in ALL cases, it'll NOT match (and being inverted, that means the
encapsulated code will be processed).

On re-review, technically, one might rather use ^^BMISPAM, which would
ensure that the BMISPAM string was at the beginning of the SUBJ_ content,
and not merely at the beginning of a line WITHIN the subject.

When running your prev. recipes, !^BMISPAM wasn't working because the
subject would read "Subject:  BMISPAM[...]"  I'll replace with ^^BMISPAM

So, again, even with Sean's vastly cleaner version it still doesn't work.
Removing one forwarding line or another creates a working, albeit
incomplete loop.  Using both in conjunction results in email not appearing
anywhere.

Do you have any access to review the /var/log/maillog and look for
transactions associated with your messages?

I did notice that when forwarding to machine 1 the message would read as
sent like follows:
Apr 14 13:30:10 mail sendmail[1207]: i3EHU8D1001204: 
to=<glaw(_at_)eecs(_dot_)tufts(_dot_)edu>,
ctladdr=<gabe(_at_)mail(_dot_)gabelaw(_dot_)org> (500/500), delay=00:00:01, 
xdelay=00:00:00, mai
ler=esmtp, pri=31542, relay=mail.eecs.tufts.edu. [130.64.23.148], dsn=2.0.0, st
at=Sent (Ok: queued as E446B2BB7)

whereas when i had both forwarding, but machine 2 forwarding to a third
address, it would look like:
Apr 14 10:13:31 mail sendmail[7048]: i3EEDT4d007045: 
to=<glaw(_at_)mywork(_dot_)com>, ct
laddr=<gabe(_at_)mail(_dot_)gabelaw(_dot_)org> (500/500), delay=00:00:01, 
xdelay=00:00:00, maile
r=esmtp, pri=31545, relay=mywork.com. [192.168.1.3], dsn=2.0.0, stat=Sent ( <
D98A6F2FEB69D74585E7EC4F3A148E2506DD29(_at_)exchange(_dot_)mywork(_dot_)com> 
Queued mail for d
elivery)

The message was different, but maybe it is just because my work mail
server is an exchange server?


Any help or suggestions would be greatly appreciated.  (Going back to peer
over logs)

Those VERBOSE entries indicating what is DONE with the messages should be
revealing.

It doesn't look any more revealing to me than before.  :(  And ^^BMISPAM
isn't working either.  it gets double labelled again.  Would adding an
X-Loop header help? (going to look that up now....)

machine 1:
procmail: [16666] Wed Apr 14 15:27:01 2004
procmail: No match on "^Subject:  BMISPAM"
procmail: Match on "^Subject: GABEFILTERED"
procmail: Locking "mail/gabe.lock"
procmail: Assigning "LASTFOLDER=mail/gabe"
procmail: Opening "mail/gabe"
procmail: Acquiring kernel-lock
procmail: Unlocking "mail/gabe.lock"
procmail: Notified comsat: "glaw(_at_)0:/s/5/glaw/mail/gabe"
From gabe(_at_)mail(_dot_)gabelaw(_dot_)org  Wed Apr 14 15:27:01 2004
 Subject: GABEFILTERED  BMISPAM Brightmail Spam Test:  
gabe(_at_)gabelaw(_dot_)org
  Folder: mail/gabe
1940




machine 2:
procmail: [1447] Wed Apr 14 15:32:39 2004
procmail: Executing "formail,-xSubject:"
procmail: [1447] Wed Apr 14 15:32:39 2004
procmail: Assigning "SUBJ_= BMISPAM Brightmail Spam Test:
gabe(_at_)gabelaw(_dot_)org"
procmail: Match on ! "^^BMISPAM"
procmail: Assigning "GABEOTRONIC=GABEFILTERED "
procmail: Executing "formail,-iSubject: GABEFILTERED  BMISPAM Brightmail
Spam Test:  gabe(_at_)gabelaw(_dot_)org"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi
glaw(_at_)eecs(_dot_)tufts(_dot_)edu"
procmail: Notified comsat: "gabe@:/usr/sbin/sendmail -oi
glaw(_at_)eecs(_dot_)tufts(_dot_)edu"
procmail: Executing 
"/usr/sbin/sendmail,-oi,glaw(_at_)eecs(_dot_)tufts(_dot_)edu"
From gabe(_at_)gabelaw(_dot_)org  Wed Apr 14 15:32:39 2004
 Subject: GABEFILTERED  BMISPAM Brightmail Spam Test:  
gabe(_at_)gabelaw(_dot_)org
  Folder: /usr/sbin/sendmail -oi glaw(_at_)eecs(_dot_)tufts(_dot_)edu



Thanks!
Gabe


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