2

I am using Apple's Mobile Me and am looking for a program that I can leave running on a Unix server somewhere that will monitor the IMAP INBOX and automatically copy all incoming messages to another mailbox (call it Archive).

I've tried implementing this myself in python with imaplib2 and the IDLE command and have found that my connection keeps getting disconnected.

Is there any off-the-shelf open source software that I can use to do this?

4
  • 1
    +1 I've frequently considered doing this (or something similar). Would be interested to know what your use-case is. I had a slow inet connection, so wanted an IMAP server on my (personal) LAN that basically mirrored gmail's IMAP.
    – Andy
    Jun 12, 2010 at 11:04
  • My use case is that I want a copy of all my incoming mail to go to Archive so that I can delete from the INBOX with abandon, without having to manually archive. I find old email using Mail.app's built-in search, which really rocks.
    – vy32
    Jun 18, 2010 at 19:48
  • Can Mobile Me forward a copy of all incoming mail to another address?
    – Craig
    Jun 19, 2010 at 0:07
  • Not sure, but I want l the mail to stay on same service.
    – vy32
    Jun 21, 2010 at 10:26

5 Answers 5

1

Something like fetchmail would do the trick. In IMAP mode, it would sit idle on the connection and copy messages to the UNIX box as they arrive.

4
  • Will fetchmail copy to a different IMAP box?
    – vy32
    Jun 21, 2010 at 10:34
  • That is not something I've tried before, but you could use the -m option of fetchmail to push the mail to another IMAP box using a IMAP command-line application. Jun 21, 2010 at 11:46
  • Okay. I've researched fetchmail. It doesn't have the capability to do anything but get the mail. Do you have a suitable command-line application that could do this? I guess I could write something with python, but I was looking for a solution that's integrated and already debugged...
    – vy32
    Jun 24, 2010 at 1:30
  • Unfortunately, no -- I don't have anything ready-made. It is possible in theory, but I haven't done it myself. Jun 25, 2010 at 1:30
0

You can use filters/rules to copy it to another mailbox.

You can forward it to another account and make sure the original stays on the imap server (e.g. with gmail)

1
  • Forwarding to another account doesn't do what I want. Yes, I realize that I can accomplish this by leaving a client with rules running. That's what I'm trying to avoid. I'm looking for a server-based solution. Unless you know of a suitable client that can run without a user interface on a server...
    – vy32
    Jun 24, 2010 at 1:31
-1

You could use Thunderbird and its Message Filters

1
  • That doesn't work; I want to leave the program running on the Unix server. Thunderbird is a client program. I want this to run when my client is turned off and I'm using the web-mail interface.
    – vy32
    Feb 17, 2010 at 13:22
-1

If you've already written something that mostly works, why not extend it to handle the disconnection gracefully and reconnect?

Alternatively, you could schedule imapsync to run at an interval that makes you comfortable.

1
  • Well, because the framework crashes. I could run it with a wrapper program, but that's kind of missing the point. The problem with imapsync is that there is no good interval that makes sense. Every 5 minutes? If I'm connected to the server and read an email and delete it when it comes in, I won't get a copy of it. (Unless I also sync out of the trash to the archive, which just seems wrong.) Increasingly I feel there is no way to do this without server-side filters.
    – vy32
    Apr 29, 2010 at 1:38
-1

Various MDAs allow you to specify delivery rules via a file in your home directory, including procmail.

1
  • procmail needs to run on the imap server. I have a different server located at another ISP. I want the process running at the other ISP to automatically replicate my email sent to me.com. I can't run procmail on me.com. I agree with you that this solution works if you can run scripts on the imap server. That's what I used to do before moving to me.com.
    – vy32
    Jun 24, 2010 at 1:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .