Re: How to filter retrieved mail
Dirk Laurie proclaimed on mutt-users that: When retrieving mail from a POP server, it gets dumped straight into my inbox, without passing through my .procmailrc. I can think of several solutions to this problem: Is procmail set as a mailer and do you have feature(`local_procmail') in your sendmail.mc? Also, what's the permission of your procmailrc / .forward? -s -- Suresh Ramasubramanian + Wallopus Malletus Indigenensis mallet @ cluestick.org + Lumber Cartel of India, tinlcI EMail Sturmbannfuhrer, Lower Middle Class Unix Sysadmin
How to filter retrieved mail
When retrieving mail from a POP server, it gets dumped straight into my inbox, without passing through my .procmailrc. I can think of several solutions to this problem: 1. Instead of just invoking mutt, use a shell script that first calls fetchmail. Disadvantage: I need to quit and restart mutt every so often. 2. Tag all the messages in the inbox, tag-bounce them to myself, and tag-delete them. Disadvantages: (a) requires several keystrokes, (b) same problem as method 3. 3. Add a macro definition to .muttrc: macro index F10 GT.\r;bdirk\ry;d$ Now when I press F10, mutt retrieves my messages, tags them all, tag-bounces them to myself, deletes the originals and cleans up my inbox. Disadvantages: (a) inbox must be clean before I start, (b) mail filter must not allow anything except retrieved mail to reach inbox, else I may delete messages that arrived directly to me during the retrieve, (c) messages show up in =procmail-log as being from myself, not the original sender. I like my solution, and I can live with the disadvantages -- the first two just requires some care on the part of the user --but I can't think of a way round this last problem. Can you? Dirk
Re: Filter retrieved mail
* Dirk Laurie [EMAIL PROTECTED], 2001-04-25 11:37 +0200: When retrieving mail from a POP server, it gets dumped straight into my inbox, without passing through my .procmailrc. I can think of several solutions to this problem: 1. Instead of just invoking mutt, use a shell script that first calls fetchmail. Disadvantage: I need to quit and restart mutt every so often. 2. Tag all the messages in the inbox, tag-bounce them to myself, and tag-delete them. Disadvantages: (a) requires several keystrokes, (b) same problem as method 3. 3. Add a macro definition to .muttrc: macro index F10 GT.\r;bdirk\ry;d$ Now when I press F10, mutt retrieves my messages, tags them all, tag-bounces them to myself, deletes the originals and cleans up my inbox. Disadvantages: (a) inbox must be clean before I start, (b) mail filter must not allow anything except retrieved mail to reach inbox, else I may delete messages that arrived directly to me during the retrieve, (c) messages show up in =procmail-log as being from myself, not the original sender. I like my solution, and I can live with the disadvantages -- the first two just requires some care on the part of the user --but I can't think of a way round this last problem. Can you? fetchmail -d 120 ~~/.muttrc set timeout=10 Andre Berger[[EMAIL PROTECTED]] PGP signature
Re: Filter retrieved mail
begin Dirk Laurie quotation: When retrieving mail from a POP server, it gets dumped straight into my inbox, without passing through my .procmailrc. I can think of several solutions to this problem: 1. Instead of just invoking mutt, use a shell script that first calls fetchmail. Disadvantage: I need to quit and restart mutt every so often. A suggestion from a local mutt user proved to be an excellent all-around solution. In my .bashrc (or you can make it global if you like) I put: alias m='fetchmail -d0; fetchmail mutt fetchmail -q' The first fetchmail lets me see exactly how many messages are being downloaded. The second fetchmail daemonizes by default in my .fetchmailrc. The rest should be pretty clear. This allows me to call mutt directly with 'mutt' or 'mutt -R' or I can simply hit 'm' to call the alias. This is not all that different from your shell script idea, but the advantage is the daemonized fetchmail continues to pull new messages and Mutt happily sees and reports them as long as you have mailboxes defined. -- Blue skies... Todd | Get a bigger hammer! | Sometimes you get what you want. | | http://www.mrball.net | Sometimes you get experience. | | http://faq.mrball.net | --unknown origin | PGP signature
Re: How to filter retrieved mail
FEATURE(local_procmail)dnl bypasses .forward, so you do not need it On Wed 25 Apr 2001, Dirk Laurie wrote: Suresh Ramasubramanian skryf: Dirk Laurie proclaimed on mutt-users that: When retrieving mail from a POP server, it gets dumped straight into my inbox, without passing through my .procmailrc. I can think of several solutions to this problem: Is procmail set as a mailer and do you have feature(`local_procmail') in your sendmail.mc? FEATURE(local_procmail)dnl Also, what's the permission of your procmailrc / .forward? I don't have any such. This is the standard RedHat 7.0 setup. Dirk
Re: How to filter retrieved mail
On Wed, Apr 25, 2001 at 10:16:03AM +0200, Dirk Laurie wrote: When retrieving mail from a POP server, it gets dumped straight into my inbox, without passing through my .procmailrc. I can think of several solutions to this problem: 1. Instead of just invoking mutt, use a shell script that first calls fetchmail. Disadvantage: I need to quit and restart mutt every so often. I run fetchmail as daemon in my user account. It gets started whenever I dial into my ISP, but starting it from my .login (.profile) should work as well. In my ~/.fetchmailrc, I have this: mda procmail .procmailrc That way, fetchmail uses procmail directly, which in turn will use the filters set up in my .procmailrc. Works like a charm. HTH, Thomas -- - Thomas Ribbrock http://mutt.linuxatwork.at (mutt RPMs) http://www.bigfoot.com/~kaytanICQ#: 15839919 You have to live on the edge of reality - to make your dreams come true!