procmail
[Top] [All Lists]

formail seems to eat my attachments

2005-01-25 10:10:34
Hi list,

To filter spam and to priorize mail from known people I have set up a
filter to send to a folder (let's call it 'notknown') every mail from
people I do not have in a 'white' list (let's say 'white').

I have setup the default folder as the 'notknown' and have placed all rules
--mailing lists, root mails and things like that-- at the beginning of the
procmail file. If the mail does not match any mailing list it goes to the
rule that see if the address is a known one and, if not, put it in the
default folder (which I do not check that often).

So my procmail file looks like:

        # [conf stuff...]
        DEFAULT=$MAILDIR/_javier_notknown

        :0 c
        backup

        :0:
                * ^X-Mailing-List: <debian-\/[-a-zA-Z0-9_.]*
                debl-$MATCH

        # [more mailing lists...]
        # and then the filter:

        WHITE_LIST = $HOME/Mail/white
        GOOD_MAIL  = $HOME/Mail/_javier
        
        :0 hw:
                *$ ? formail -ISubject: |fgrep -i -f $WHITE_LIST
                $GOOD_MAIL

I do not understand very well magic under that last rule :), but I read it
here[1]. The thing is that it is working quite well but I have seen that
mails going to the $GOOD_MAIL folder (mails from known people) do not keep
their attachments. However, mails reaching that rule and not matching it
(from unknown people) go to the default folder with all the attachments.

If it is formail, I only want to check the "From:" field, so maybe I could
remove formail and put there another command just to check the From field.

Any idea about that attachment problem? 

-- 
[1] http://pm-doc.sourceforge.net/pm-tips.html

-- 
 .''`.   Javier Linares
: :'  :  javier at javierlinares.com
`. `'`   http://javierlinares.com  
  `-

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