Re: Procmail setup problem
Magnus,
Il gio, 2004-08-26 alle 21:39, Magnus Therning ha scritto:
> On Thu, Aug 26, 2004 at 07:03:56PM +0200, Lorenzo Rossi wrote:
> >Hi,
> >
> >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?
> >
> >
> >My procmail config file look like so:
> >
> >----------------------------------------------------------------------
> >
> >PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:.
> >MAILDIR=$HOME/Mail
> >DEFAULT=$MAILDIR/mbox
> >LOGFILE=$MAILDIR/Procmail_log_from
> >LOCKFILE=$HOME/.lockmail
> >
> >....
> >cut
> >....
> >
> >
> >
> >:0: # Anything from Bugtraq
> >* ^To.bugtraq@securityfocus.com
> >bugtraq
>
> I don't think that's a very good recipe, I'd change it to
>
> * ^To:.*bugtraq@sequrityfocus\.com
>
ok, thk for the suggestion, I go to modify the config file...I'm a newb
of regex :)
> Or even better, use TO_:
>
> * ^TO_bugtraq@sequrityfocus\.com
>
I go to study the meening....of "To_"
> >
> >....
> >cut
> >....
> >
> >:0:
> >* ^To:.*debian-user
> >* Cc:.*debian-user
> >${HOME}/Mail/debian-user
>
> This will only match mails that have debian-user in *both* To and Cc.
> you might have more luck with
>
> * ^To:.debian-user|\
> ^Cc:.debian-user
>
Yes, you have reason, I did not put the logical OR beetween the 2
lines...:)
> >Any ideas??
>
> I personally don't rely on To: TO_ or TO for my mailing list sorting.
> Most mailing lists add headers to all mails that pass through them, I've
> found it's much more reliable to use those for sorting. E.g. the
> following sorts debian-user:
>
> :0 :
> * ^List-Id:.* <debian-user.lists.debian.org>
> list.debian-user/
>
> Hope it helps.
>
> /M
Magnus, you help me very mutch, you tech me the syntax..
Now I go to modify the procmailrc config file, writing better rules with
your advices ;)
Lorenzo
Reply to: