[vox-tech] procmail question

Jeff Newmiller vox-tech@lists.lugod.org
Thu, 29 Nov 2001 12:19:41 -0800 (PST)


On Thu, 29 Nov 2001, Peter Jay Salzman wrote:

> ok, i knew about man procmailrc, but not man procmailex.   after looking at
> it, i think this would work:
> 
> # make a backup
> :0 c
> * !^From.*MAILER-DAEMON.*$ \
> | !^Subject.*BOUNCE vox.*$ 
> backup
>
> better to your eyes?  doesn't look as pretty, but it's still not awful.
> the ".*$" should take care of spaces and comments finding their way into
> regexes...

I don't think ".*$" is doing anything useful.

I do think there should be a space between the "!" and the regex.

The problematic space would be the one between the "BOUNCE" and "vox", but
as long as you are positive that exactly one space is what you want to
match, then it should work.

I do not think you can put comments on the procmail lines, except on their
own.

Every conditional line must begin with a "*" character, and all
conditionals are "anded".

If you want "or" behavior, you have to build it into the regex.

I don't really claim to understand procmail syntax, except that I have
beaten odd lumps into my skull getting it to do what I wanted in the past
with enough dumb luck to get results I could live with. :P

I would try this:

# make a backup
:0 c
* ! ^(From.*MAILER-DAEMON|Subject.*BOUNCE vox) 
backup

> 
> pete
> 
> 
> begin: Ted Deppner <ted@psyber.com> quote
> > On Thu, Nov 29, 2001 at 11:18:38AM -0800, Peter Jay Salzman wrote:
> > >    # make a backup
> > >    :0 c
> > >    * ! ^From.*MAILER-DAEMON       |  # don't backup error msgs
> > >      ! ^Subject.*BOUNCE vox          # don't backup bounce msgs
> > >    backup
> > > 
> > > are lines continued automatically, or do i need an escape character like "\"?
> > 
> > prolly, but you don't want a regex with all that whitespace.  
> > 
> > > can comments go between conditionals like this?
> > 
> > dunno for sure, but not really relevant given the last answer.
> > 
> > > any problems anyone can see with this?
> > 
> > man procmailex didn't show any snippets anywhere near that style.  I
> > didn't have time to read it in detail, but you might take a peek.  I think
> > the regex interpretation kills this whole style though.
> 
> -- 
> PGP Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D
> PGP Public Key:  finger p@dirac.org
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
> 

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------