Fetchmail and Postfix

I’ve spent the whole day trying to get Fetchmail and Postfix working on my laptop. Don’t worry, this isn’t going to be yet another one of those tutorials. There are lots of un-understandable tutorials out there, and I don’t want to write another. And enough of you have already done it, so it isn’t exactly something exotic.

My story: I’ve been checking my mail over IMAP over an SSH tunnel, using mutt. The problem with this has been that it takes too long to load. The SSH connection takes time, and loading the headers from IMAP takes time. So I had to keep cleaning my mailbox. For sending mail, I used a set sendmail="ssh access.cmi.ac.in -C sendmail ... ", which, although slow, has worked beautifully for me.

Now I have this UPenn email ID. And I want a scheme to check that, and at the same time I want to check my CMI mail too. And mutt doesn’t have any nice ways to use multiple inboxes. I don’t want to .forward to Gmail since Gmail doesn’t have powerful enough filtering capabilities, and in any case writing mails in Gmail is harder, since it does not have an emacs mode.

I tried Evolution. And did some remarkable stuff to get the CMI IMAP server to work with it. After a few days of receiving mails (And I was telling myself, Why didn’t I ever do this before?) I needed to reply to a mail.

And then it hit me: I didn’t have emacs key bindings.

I tried out many other MUAs, and came to the conclusion that I needed a Fetchmail+Postfix, so that I can use mutt. Fetchmail’s great, fairly easy to configure — I could easily set up IMAP over an SSH tunnel too.

But Postfix (SMTP+SSL) was a pain. I tried lots and lots of things, as of right now I don’t remember what exactly finally fixed it. I still don’t know how to make special rules for chosing which email account to send from: I suspect that the idea I have in mind will require some configuration on the mutt side too. Here’s what I want: On replying to mail that originally was delivered to my CMI address, it should be sent from my CMI address. Otherwise, it should default to my UPenn address. Any Postfix experts out there to help me?

If possible, I would also like a GUI warning when I try to suspend my laptop while there are mail waiting on the mail queue.


2 Responses to Fetchmail and Postfix

  1. JohnJones says:

    this really is nothing to do with postfix at all sorry… the MTA will simply take whatever the MUA sends it and deal with the posting

    writing the label so to speak on the package (your email) is the MUA (mail User Agent) job

    so Mutt would be the one to work this out
    I suspect you want something like a hook in Mutt

    hope that helps you


    John Jones

  2. Janell says:

    Useful posting.
    You continually produce the most practical articles and of
    course Fetchmail and Postfix | Arnie Almighty
    is absolutely no exception

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: