procmail
[Top] [All Lists]

Re: AND and OR recipe?

2010-11-18 14:22:47
Hello Danny,

Am 2010-11-18 20:06:59, hacktest Du folgendes herunter:
:0:
* 
^(From|Cc|To|X-Loop|Sender|Bcc|X-BeenThere):(_dot_)*(_at_)facebookmail\(_dot_)com
* ^TO_dannydebont(_at_)gmail\(_dot_)com
$MAILDIR/incoming/internet/social/facebook

In a previously mail you showed the VERBOSE of the promail log  and  the
rule was not hit.  Maybe you can send us the HEADER from this mail?

SHELL=/bin/sh
HOME=$HOME
PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin
SENDMAIL=/usr/sbin/sendmail             //points to postfix's sendmail 
replacement
MAILDIR=$HOME/Mail

There should be a "/" at the end

LOGFILE=/var/log/procmail.log           //I will change this
LOGABSTRACT="all"
VERBOSE="on"
DEFAULT=$HOME/Mail/inbox/inbox
#DEFAULT=/var/spool/mail/fetchmail
PMDIR=$HOME/.procmail
#INCLUDERC=$PMDIR/spam.rc
LOCKFILE=/var/lock/.procmail_lock       //I will change this

The .procmailrc should only locked entirely if you know what you do.

:0:
* 
^(From|Cc|To|X-Loop|Sender|Bcc|X-BeenThere):(_dot_)*(_at_)facebookmail\(_dot_)com
* ^TO_dannydebont(_at_)gmail\(_dot_)com
$MAILDIR/incoming/internet/social/facebook

The $MAILDIR/ is useless and can be removed in all following recipes

:0:
* 
^(From|Cc|To|X-Loop|Sender|Bcc|X-BeenThere):(_dot_)*(_at_)facebookmail\(_dot_)com
* ^TO_debontvanessa(_at_)gmail\(_dot_)com
$MAILDIR/incoming/friends/vanessa/vanessa

If you have more then one Facebook friend, you can use

:0
* ^From:(_dot_)*(_at_)facebookmail\(_dot_)com
{
  :0:
  * ^TO_debontvanessa(_at_)gmail\(_dot_)com
  incoming/friends/vanessa/vanessa

  :0:
  * ^TO_another_friend(_at_)example\(_dot_)com
  incoming/friends/another_friend

  :0:
  internet/social/facebook
}


:0:
* 
^(From|Cc|To|X-Loop|Sender|Bcc|X-BeenThere):(_dot_)*misc(_at_)openbsd\(_dot_)org
$MAILDIR/incoming/operating_systems/openbsd/misc/openbsd-misc

Because OpenBSD has not changed its HEADERS since ageds, you can use

:0:
* ^X-BeenThere:(_dot_)*misc(_at_)openbsd\(_dot_)org
operating_systems/openbsd/misc/openbsd-misc

:0:
* 
^(From|Cc|To|X-Loop|Sender|Bcc|X-BeenThere):(_dot_)*debian-user(_at_)lists\(_dot_)debian\(_dot_)org
$MAILDIR/incoming/operating_systems/linux/debian/debian-user

I am long term debian user and know you can simply use:

:0:
* ^X-Mailing-List:(_dot_)*debian-user(_at_)lists\(_dot_)debian\(_dot_)org
operating_systems/linux/debian/debian-user

:0:
* ^X-Mailing-List:(_dot_)*debian-security(_at_)lists\(_dot_)debian\(_dot_)org
operating_systems/linux/debian/debian-security

...

or more cool for all Debian Mailinglists:

    :0
    * $ ^X-Mailing-List:.*[     ]\/.*debian\.org
    {
      LISTNAME=`echo "${MATCH}" |sed 's|@.*||'`
      :0
      operating_systems/linux/debian/${LISTNAME}
    }

and for the FreeBSD Lists use:

    :0
    * $ ^X-BeenThere:.*[        ]\/.*freebsd\.org
    {
      LISTNAME=`echo "${MATCH}" |sed 's|@.*||'`
      :0
      operating_systems/freebsd/general/${LISTNAME}
    }

:0:
* 
^(From|Cc|To|X-Loop|Sender|Bcc|X-BeenThere):(_dot_)*service(_at_)intl\(_dot_)paypal\(_dot_)com
$MAILDIR/incoming/online_shopping/paypal 

Hahaha, get a killer of a spam pill.

IF YOU USE PAYPAL like me, create a SECRET EMAIL as default and a PUBLIC
EMAIL which you use to receive payments and then use

:0
*   ^From:(_dot_)*service(_at_)intl\(_dot_)paypal\(_dot_)com
* B Put_Your_Full_Name_Here_Ss_Always_Shown_In_Paypal_Messages
{
  :0:
  * ^To:(_dot_)*your_secret_mail(_at_)example\(_dot_)com
  online_shopping/paypal_sec

  :0:
  * ^To:(_dot_)*public_mail(_at_)example\(_dot_)com
  online_shopping/paypal_pub
}

This system prevent me of geting per day arround 80 phishing mails

Now, let us take the mailing list misc(_at_)openbsd(_dot_)org for example. I 
use the
following:

* 
^(From|Cc|To|X-Loop|Sender|Bcc|X-BeenThere):(_dot_)*misc(_at_)openbsd\(_dot_)org

misc(_at_)openbsd(_dot_)org can be in either one of the OR fileds. I am 
merely trying to
catch any field that contains the e-mail address 
misc(_at_)openbsd(_dot_)org(_dot_)

There is only ONE interesting field

    :0
    * $ ^X-BeenThere:.*[        ]\/.*openbsd\.org
    {
      LISTNAME=`echo "${MATCH}" |sed 's|@.*||'`
      :0
      operating_systems/opensd/general/${LISTNAME}
    }

and it is working for ANY LISTS at <openbsd.org>

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems(_at_)tdnet France EURL       itsystems(_at_)tdnet UG (limited 
liability)
Owner Michelle Konzack            Owner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz                 Kinzigstraße 17
67100 Strasbourg/France           77694 Kehl/Germany
Tel: +33-6-61925193 mobil         Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber linux4michelle(_at_)jabber(_dot_)ccc(_dot_)de
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/
____________________________________________________________
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>