l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
January 6: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2001 Dec 30 17:13

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] procmail question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] procmail question



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

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.