[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Procmail setup problem



Stephen,


Il gio, 2004-08-26 alle 21:47, s. keeling ha scritto:
> Incoming from Lorenzo Rossi:
> > 
> > i was trying to setup procmail to store incoming e-mails to different
> > files in my home directory, but, procmail write all my incoming emails
> > to the same file, the "mbox" file.
> > I can not understand why?
> > 
> > PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:.
> > MAILDIR=$HOME/Mail      
> > DEFAULT=$MAILDIR/mbox
> > LOGFILE=$MAILDIR/Procmail_log_from
> > LOCKFILE=$HOME/.lockmail
> > 
> > :0:                             # Anything from Bugtraq
> > * ^To.bugtraq@securityfocus.com
> > bugtraq
> > 
> > :0:
> > * ^To:.*debian-user
> > *  Cc:.*debian-user
> > ${HOME}/Mail/debian-user
> 
> It matched the first, then didn't match the second.  They cancel out.
> You're also missing the "^" on the Cc: line.
I know..I'm wrong... :)

> Solution to this is scoring:
> 
> :0:
> * 1^0 ^To:.*debian-user
> * 1^0 ^Cc:.*debian-user
> ${HOME}/Mail/debian-user
> 

What does it meen * 1^0 ^To:.*debian-user ??
                    ^^^
I'm a newb...

> You don't need "${HOME}/Mail/"; all targets are relative to MAILDIR.
> 
Yes, now I undertood..
I expanded all path because I would like to be sure avoid all possible
errors...
> procmail has a macro you can use instead of both of those: ^TO should
> match "debian-user" when in To: or Cc: (man procmailrc, then "/ MISC").
> 
I go to study! ;)
> 
> > procmail: Unlocking "/home/milos94/.lockmail"
> > procmail: [20786] Thu Aug 26 18:41:11 2004
> > procmail: Assigning "LOGABSTRACT=all"
> > procmail: No match on "^To.bugtraq@securityfocus.com"
> > procmail: No match on "^To.gnupg-devel@gnupg.org"
> > procmail: No match on "^To_nmap-dev@insecure.org"
> > procmail: No match on "^To.nmap-hackers@insecure.org    # Anything from
> > namp-hacker"
> > procmail: No match on "^To.rsbac@rsbac.org              # Anything from
> > rsbac"
> > procmail: Match on "^To:.*debian-user"
> ............^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > procmail: No match on "Cc:.*debian-user"
> ............^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> I'm susbscribed to multiple debian-* lists.  This separates them all
> out into separate folders:
> 
> # ------------------------------------
> # debian-${MATCH}
> #
> # !@#$%.  The match operator ("\/") matches whatever the regexp that
> # follows it matches.  Possible values are "debian-user", "debian-boot",
> # ...
> #
> :0
> * ^X\-Mailing\-List:.*debian-\/[a-z-]*
> {
>   LOG="debian-${MATCH} - "
>   :0:
>   IN.debian-${MATCH}
> }
> 
> 
Wow very powerfull! I like it...:)

You give me a lots of suggestions...
Do you think my problems are mainly related to the configurations of
rules?


> -- 
> Any technology distinguishable from magic is insufficiently advanced.
> (*)               http://www.spots.ab.ca/~keeling
> - -
> 

thanks from a newb..
Lorenzo



Reply to: