Has anyone successfully configured mutt for GMail on FreeBSD? If so, how?

7

I've tried following the instructions here and here. Currently, I can read email from my GMail account, but not send—this is on a personal computer, so even if I configured Sendmail, I doubt any of the mail would survive the spam filter gauntlet. Both guides seem to require the --enable-smtp option for mutt, which I don't think is being exposed by ports. I've tried the mutt and mutt-devel ports and neither seem to give me that option.

On a far less important note, I also haven't been able to change folders, e.g., I get told that Sent Mail is not a valid folder when I attempt to go into it. If you can troubleshoot this problem, it's pure gravy. I really only care about sending.

Thanks,

Hank

UPDATE: For those who are interested, the mutt wiki has a GMailOverIMAP UserStory.

UPDATE 2: Although I finally solved my original problem (enabling SMTP support for mutt in FreeBSD), @grawity convinced me to use a relay and avoid mutt's native SMTP support. With that in mind, I went with msmtp. At that point, The Quick-N-Dirty Guide to Using mutt with gmail was very useful, including tips on how to enable OpenSSL for msmtp (so it can talk to GMail's SMTP servers, which use TLS).

Hank Gay

Posted 2010-04-21T12:44:00.190

Reputation: 297

Answers

7

I wouldn't use the SMTP support in Mutt. <subjective> It's just not the Unix way. Much better is </subjective> to configure something like esmtp or msmtp or maybe nullmailer to relay email through Gmail's servers, and then let Mutt use the standard /usr/bin/sendmail way of sending messages.

user1686

Posted 2010-04-21T12:44:00.190

Reputation: 283 655

1+1 for good suggestions, and for the tricky full-stop-spanning subjective tag. – coneslayer – 2010-04-21T18:54:47.070

1How likely is it that I'm going to get nailed as spam because I don't have a PTR record, my IP changes, etc.? – Hank Gay – 2010-04-21T19:07:09.367

Hank: You're still sending through Gmail's servers (that's what "relay" means). You'll just let a separate program handle that, instead of trying to make mutt do everything. So to answer the question, it won't affect spam score at all. – user1686 – 2010-04-21T19:54:43.390

Do you also recommend using an MRA? – Hank Gay – 2010-04-21T20:17:24.713

Hank: Depends on whether you prefer all mail to be stored locally (~/mail/) or in Gmail's servers. Most MRAs do not support two-way synchronization, so using one would mean deleting mail from gmail.com after retrieval. Exception: offlineimap can work in both directions, and is useful because mutt doesn't cache IMAP messages. So you choose this time. – user1686 – 2010-04-21T20:47:25.047

1

If that config option is the issue (I don't know one way or the other), try building the mail/mutt port with:

$ make clean
$ make MUTT_CONFIGURE_ARGS=--enable-smtp
$ make install

coneslayer

Posted 2010-04-21T12:44:00.190

Reputation: 7 494

I still get errors telling me the smtp_url etc. are invalid after following these steps. I found the --enable-smtp option in the comments to http://shreevatsa.wordpress.com/2007/07/31/using-gmail-with-mutt-the-minimal-way/ but I could just be barking up the wrong tree.

– Hank Gay – 2010-04-21T15:52:28.317

1

The following sequence seems to work (hat-tip to The Quick-N-Dirty Guide to Using mutt with gmail, where I learned the -Doption trick for ports).

  1. cd /usr/ports/mail/mutt-devel
  2. make -DWITH_MUTT_SMTP install clean

Hank Gay

Posted 2010-04-21T12:44:00.190

Reputation: 297