On Thu, Jun 14, 2001 at 05:11:56PM -0400, darren chamberlain
([EMAIL PROTECTED]) said:
> > Really what I'm looking for is a way to move (automagically) messages
> > from my spool (INBOX) folder to another folder (say, all mutt-users
> > messages in their own folder). For me, it would be nice if this were
> > done as they came in. Unless I understand wrong, scoring more oriented
> > towards deletion of messages. Perhaps having an 'imap-new-message-hook'
> > (or even a 'new-message-hook') would be be a good solution to this
> > problem. If not, I'll probably end up hacking together something over
> > the next couple of weeks to do this for me.
> > 
> > Andy
> 
> This is a job for the MDA, not the MUA.  Take a look at procmail
> (www.procmail.org) which does exactly what you are looking for,
> and a lot more to boot.

And you install procmail on a remote server that you possibly don't
even have shell access to how, exactly?  Sure, you can ask your
friendly neighborhood sysadmin, but sometimes they're unfriendly.  :-)

Remember, we're talking about imap, not local folders.  And imap has
sufficient advantages over local folders that this is worthy of a
solution.

Which isynch very well could be (that's probably what I'll be moving
towards, from strictly local folders right now.)  I think someone else
suggested something like this, but my idea is currently:

  * Use fetchmail + procmail to get things from the inbox on the server.

  * Use procmail to sort things in various folders (and do other
    things like autoreplies, stripping annoying ads, filter out
    apparant duplicate mails into a rarely checked folder, fix mailing
    lists that add Reply-To's that don't need to be there when you
    have a list-reply, add a Lines: header, etc).

  * Use isynch (possibly called by procmail, possibly called by cron,
    possibly both) to put the new messages on the server (in some
    folder other than the inbox.)

Now there are things in this setup that I like that others might not.
In particular, I want to have a local copy of my mail (for incoming
folders, at least), and I expect both folders to change, so that I'll
want to synch both ways.  In fact, the main reason I want my mail to
go to the server at all is for backups--I do backup my workstation,
but not often enough and not automatically right now.

If you only want messages on the server (which seems like it might be
the better solution for most folks), perhaps mutt itself is a better
solution for step three above.  So...run mutt automatically on the
folder that just got mail, have it tag all messages and save them all
to the corresponding server mailbox.  Something like (syntax not
guaranteed correct, this is just an example)

mutt -f =mutt-users -e '<tag-pattern>.<cr><tag-prefix><save-message>\
  imap://user@imaphost/INBOX.mutt-users<cr><quit>'

I vaguely recall someone mentioning having tried something like this
and having it not work because mutt wouldn't run if it wasn't attached
to a terminal.  But that can probably be worked around using screen or
something similar that can run detached (but shouldn't need to be
worked around, IMHO).

-- 
Jim Toth
[EMAIL PROTECTED]

Reply via email to