procmail
[Top] [All Lists]

Re: [tolga(_at_)ozses(_dot_)net: User folders not in /var/mail]

2007-09-22 06:13:04


Dallman Ross yazm?s,:
Tolga wrote Friday, September 21, 2007 8:23 AM:


  
I need help with below two subjects:

1- Regarding a recipe where user mail folders are not stored
under /var/mail, but under /var/mail/folders/username. Under this
condition, how do I write a recipe that delivers to
/var/mail/folders/username/nameoffolder?
    

Best is to change the value for the system mailboxes in your
source file and recompile procmail.

Barring that, in the systemwide rcfile (e.g.,
/etc/procmailrc) set DEFAULT and, I suppose, ORGMAIL
as you need them.  Example (untested):

   DEFAULT = /var/mail/folders/$LOGNAME/nameoffolder
   ORGMAIL = $DEFAULT

  
2- Regarding how to deliver mail marked as SPAM to
/var/mail/folders/username/SPAM.
    

As a preface, I hope you've looked over the man pages, in
particular "man procmailrc" and "man procmailex" (the exmaples
pages).

"Marked as SPAM" how?  Via a header?  In the Subject: header?
In X-Spam-Status: ?  You need to be more specific about
exactly what you want and what you might be trying so far.

There have been many -- hundreds of, I would say -- examples
on this list of directing SpamAssassin-designated "spam" to folders.
I recommend you find a searchable version of the procmail list
archives and read up a bit there.

SpamAssassin (if that's what you're talking about) can put various
headers in place such as (taken from a handy spam message in my
current collection):

  X-Spam-Flag: YES
  X-Spam-Score: 5.699
  X-Spam-Level: *****
  X-Spam-Status: Yes, score=5.699 tagged_above=-999 required=5
        tests=[BODY_ENHANCEMENT2=0.618, DRUGS_ERECTILE=0.1,
        HELO_DYNAMIC_HCC=3.28, NO_REAL_NAME=0.55,
SUBJECT_DRUG_GAP_C=1.035,
        SUBJ_BUY=0.116]

How the headers look depends on your setup.  But even assuming something
like the above, which header or headers are you wanting to rely on for
your determination?  From the user's .procmailrc?  From the system
procmailrc?  There are lots of ways to do this.  E.g., from the systemwide
rcfile (untested):

   DROPPRIVS = yes
   :0:
   ^X-Spam-Level:.*[*][*][*][*][*]
   /var/mail/folders/$LOGNAME/SPAM

dman
____________________________________________________________
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
  
Thanks a lot, I'll try those :)

-- 
Quella non e' una luna...
                -- Obi-Wan Kenobi
____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>