Mutt over intermittent connection

Paul W. Frields stickster at gmail.com
Wed Jul 18 12:43:00 UTC 2012


On Wed, Jul 18, 2012 at 12:00:24PM +0200, Heinz Diehl wrote:
> On 18.07.2012, Suvayu Ali wrote: 
> 
> > I observe that after a connection change
> > mutt cannot send emails anymore. It fails with "Cannot find
> > smtp.gmail.com". However it works again once I have restarted Mutt.
> 
> I've never used mutt to connect directly to a mailserver (I run my own
> local postfix) and have therefore no experience in doing so.
> 
> In this case, when you have established a valid internet connection,
> it should work fr mutt to resolve smtp.gmail.com and connect to it. I
> would examine first if this is a dns/resolver problem (dig
> smtp.gmail.com), and if it isn't, a tcptraceroute to smtp.gmail.com
> and the port it uses should make you see where/what blocks the
> packets.

Heinz, I think you may find that running your own local mail server --
which can, itself, connect to other mail servers when connections are
up -- may solve your problem.

http://paul.frields.org/2009/07/12/best-in-show/
http://paul.frields.org/2009/07/18/best-in-show-gets-better/

In these two blog entries I describe how you can configure and run
Postfix locally on your laptop, for use with offlineimap and an email
client of your choice.  I use Mutt for my client, but I believe you
can just as easily point Evolution, Thunderbird, Kmail, etc. to your
local Maildir store.

This setup is resistant to network outages, changed APs, etc.  If you
are completely offline, you can still "send" email.  It's held by your
Postfix server until your connection through NetworkManager is back
up.  I've used this setup for over two years and it's served me very
well.

While it won't solve a DNS problem like Suvayu describes above, it
will let you send your email to the local Postfix server on your
laptop.  I find this preferable to leaving my Mutt compose in limbo,
or forcing me to postpone mail and then manually recall and resend
later.


P.S. I also discovered I updated my /etc/NetworkManager/dispatcher.d
script to be slightly more complex but even more reliable some time
last year.  I'm going to update my blog with a new writeup, and
condense the whole how-to document onto one page.

-- 
Paul W. Frields                                http://paul.frields.org/
  gpg fingerprint: 3DA6 A0AC 6D58 FEC4 0233  5906 ACDB C937 BD11 3717
  http://redhat.com/   -  -  -  -   http://pfrields.fedorapeople.org/
    The open source story continues to grow: http://opensource.com


More information about the users mailing list