RE: Re: Help configuring procmail (was: Help configuring fetchmail)
Nope, that won't work for KCLUG mail. The "To:" field will not always, in fact hardly ever, have the proper recipient of the email. Hence, Matt's dilemma. You have to look at the crazy headers for KCLUG. I'd say he needs both of the approaches you stated. One filter by list and to by "To:". That *should* get most if not all filtered into his appropriate mailboxes. Now, I have to go to my server and play with some of these rules. ;') Brian
-----Original Message----- From: Jeremy Turner
On Fri, October 15, 2004 11:36 am, linux@bizniche.com said:
This is nearly what I'm looking to do. What I really want to do, is..
_Anything_ that comes to linux@bizniche.com goes in one folder, doesn't matter if it was sent to the address directly, or to a list like kclug.
_Anything_ that comes to matt@bizniche.com goes in another folder, no matter where it comes from.
Hmm..
So what you want is:
:0: * ^TO_.*@bizniche.com accounts/`echo $MATCH | sed -e 's/[\/]/_/g'`
This uses the dynamic technique for the mailing lists, but applies it to accounts. If you have "matt@bizniche.com", his mail will go into accounts/matt. If you have "linux@bizniche.com", his mail will go into accounts/linux.
I'd do some testing on this one, but this should work for you.
Jeremy
-- Jeremy Turner <jeremy@linuxwebguy.com> Linux Tips and News! ---> http://linuxwebguy.com
_______________________________________________ Kclug mailing list Kclug@kclug.org http://kclug.org/mailman/listinfo/kclug
On Fri, October 15, 2004 2:24 pm, Brian Densmore said:
Nope, that won't work for KCLUG mail. The "To:" field will not always, in fact hardly ever, have the proper recipient of the email. Hence, Matt's dilemma.
But also note that * ^To:.*@bizniche.com and * ^TO_.*@bizniche.com are not the same. See http://kclug.org/pipermail/kclug/2004-October/024036.html or the Miscellaneous section of the procmailrc manpage.
You have to look at the crazy headers for KCLUG. I'd say he needs both of the approaches you stated. One filter by list and to by "To:". That *should* get most if not all filtered into his appropriate mailboxes. Now, I have to go to my server and play with some of these rules. ;')
I have to play with them too. I grabbed some procmail recepies from dotfiles.com and plugged them in, but I haven't had a ton of time to hack on them too much. Just enough for them to work for me. =) Jeremy -- Jeremy Turner <jeremy@linuxwebguy.com> Linux Tips and News! ---> http://linuxwebguy.com
"Brian Densmore" <DensmoreB@ctbsonline.com> wrote:
Nope, that won't work for KCLUG mail. The "To:" field will not always, in fact hardly ever, have the proper recipient of the email. Hence, Matt's dilemma. You have to look at the crazy headers for KCLUG.
Here's a pretty definitive one: Return-path: <kclug-bounces@kclug.org>
On Sun, 2004-10-17 at 19:05, Monty J. Harder wrote:
"Brian Densmore" <DensmoreB@ctbsonline.com> wrote:
Nope, that won't work for KCLUG mail. The "To:" field will not always, in fact hardly ever, have the proper recipient of the email. Hence, Matt's dilemma. You have to look at the crazy headers for KCLUG. Here's a pretty definitive one:
Return-path: <kclug-bounces@kclug.org>
Dont use _a_ definitive one, but _the_ definitive one: List-Id: KCLUG mailing list <kclug.kclug.org> -- Hal
An Update! After much toil (and reading / re-reading all the emails about this on the list) I think I have it working! Huzzah. Exim is happily handing mail to procmail, which happily files it as it should. I am using my ISP's smtp server as the smarthost, so mail is all going out as it should, and doesn't seem to being blocked by any servers so far (as it was when my dynamic-ip-server was the smtp. Mutt knows how to read my SMTP folders. Squirrelmail knows how to send from different identities (a very cool feature...anyone know if Mutt can do that?) Still adding to the procmail as different types of messages come in...and haven't tackled spamassassin yet. But thats next. Having it this far feels great! Thanks for all the help on this everyone. Matt
An Update!
After much toil (and reading / re-reading all the emails about this on the list) I think I have it working! Huzzah.
Exim is happily handing mail to procmail, which happily files it as it should. I am using my ISP's smtp server as the smarthost, so mail is all going out as it should, and doesn't seem to being blocked by any servers so far (as it was when my dynamic-ip-server was the smtp. Mutt knows how to read my SMTP folders. Squirrelmail knows how to send from different identities (a very cool feature...anyone know if Mutt can do that?)
I found that mutt can use a different "From" header based on the folder you're sending from. Like this: folder-hook . my_hdr From: "Matt Graham" <mdg@mdg.homelinux.org> folder-hook =.matt_biz my_hdr From: "Matt Graham" <matt@bizniche.com> Works great. Matt
Still adding to the procmail as different types of messages come in...and haven't tackled spamassassin yet. But thats next. Having it this far feels great!
Thanks for all the help on this everyone.
Matt
_______________________________________________ Kclug mailing list Kclug@kclug.org http://kclug.org/mailman/listinfo/kclug
participants (5)
-
Brian Densmore -
Hal Duston -
Jeremy Turner -
Matt Graham -
Monty J. Harder