Linux – How to configure Mutt to work properly in Cygwin


Every time I try to run Mutt in cygwin I get the following errors:

Error in /home/JJR/.muttrc, line 4: smtp_url: unknown variable
Error in /home/JJR/.muttrc, line 5: smtp_pass: unknown variable
Illegal instruction (core dumped)

And then I observe a stackdump file in my home folder. How can I get Mutt working with Cygwin successfully?

I tried visiting #mutt at which had dozens of people but no good answers, now including these two other channels which were surprisingly empty earlier: #cygwinx and #xwin

Oh, and my .muttrc was placed in /home, and not in /.mutt.
I plugged in .muttrc in /.mutt and no error, however, composing and sending messages does
not work. I modified the ~/.muttrc before evoking mutt.

Using: Windows XP SP3, Cygwin 1.7.9-1, Mutt 1.5.21

Best Answer

I believe the Mutt with cygwin is configured and built without SMTP support. If you do

mutt -v

you'll see a list of configuration options used at build time.

Here's the output from my mutt,

$ mutt -v
Mutt 1.5.20 (2009-12-10)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: CYGWIN_NT-6.1-WOW64 1.7.9(0.237/5/3) (i686)
ncurses: ncurses 5.7.20091227 (compiled with 5.7)
libiconv: 1.13
hcache backend: GDBM version 1.8.3. 10/15/2002 (built Feb 26 2009 02:58:00)
Compile options:

As you can see, it has -USE_SMTP which means there's no inbuilt SMTP support.

You should instead, install an MTA (mail transfer agent) and use mutt's inbuilt sendmail support.

I use the Cygwin ssmtp package. After installing ssmtp, run ssmtp-config to configure it to talk to your ISP's mail relay and remove / comment out the smtp_* stuff from your .muttrc. You should then be good to go.

Related Question