Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2006 17:00:58 +0800
From:      loader <loader@freebsdmall.com>
To:        Benjamin Adams <adams.benjamin@gmail.com>
Cc:        FreeBSD-Chat@freebsd.org
Subject:   Re: Little help with Gmail and Mutt
Message-ID:  <gi7j5adqgl.fsf@observer.unknown.com>
References:  <20060424235037.70ba6c5c.adams.benjamin@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Benjamin Adams <adams.benjamin@gmail.com> wrote:

> Can someone with gmail email me with an example of .muttrc
> I'm trying to get mutt to work with my gmail account but no luck.

% cd /usr/ports/mail/mutt-devel-lite
% sudo make install clean

mutt 1.4.x can't support Gmail's POPs well.

.muttrc

set pop_user=your_gmail_username
set pop_pass=your_gmail_password
set pop_host=pops://pop.gmail.com
set sendmail="/usr/local/bin/msmtp" 

% cd /usr/ports/mail/msmtp
either
% sudo make WITH_GNUTLS=yes install clean
or
% sudo make WITH_OPENSSL=yes install clean
should work for gmail

.msmtprc

account default
host smtp.gmail.com
from your_username@gmail.com
tls on
auth on
port 587
user your_gmail_username
password your_gmail_password

That's it.

Or maybe you could use security/stunnel to handle the SSL part,
and then set everything like normal SMTP/POP in msmtp/mutt.

stunnel.conf:

client = yes
debug = debug

[gmail-pop3s]
accept = 127.0.0.1:10110
connect = pop.gmail.com:995

[gmail-smtps]
accept = 127.0.0.1:10025
connect = smtp.gmail.com:587
protocol = smtp

% stunnel stunnel.conf

Then you can set the SMTP/POP to localhost, this 
works for mutt 1.4.x, and older verions of msmtp (when WITH_GNUTLS
is marked as broken)

> I want to use postfix as the transfer protocol.

The default value of sendmail in mutt is:
/usr/sbin/sendmail -oem -oi

If you setup postfix properly on your FreeBSD box,
I think that default settings should work for you.

And If you want to send emails via postfix, and only 
use mutt for reading mails. Maybe mail/fetchmail is 
a good choice for fetching email from Gmail's POPs
server. Just add fetchmail as a cron job instead of
waiting mutt to fetch emails everytime when you run
login to the system.

.fetchmailrc

poll pop.gmail.com with proto pop3 port 995 \
     user "your_gmail_username" there with password "your_gmail_passwd" is "your_local_account" here options fetchall ssl


Regards,
loader



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gi7j5adqgl.fsf>