I recently started using mutt with GMail using IMAP protocol. Reading
is fine, but I'm unable to send. I can send via mutt and mutt shows it
being uploaded to the server but GMail doesn't send my e-mail. Here is
what my muttrc looks like (I got these instructions from searching
online);
########################################################################
# S.D.Allen's muttrc for GMail IMAP
set imap_user = 'myl...@gmail.com'
set imap_pass = 'correct-pwd'
set spoolfile = imaps://imap.gmail.com:993/INBOX
set folder = imaps://imap.gmail.com:993
set record="imaps://imap.gmail.com/[Gmail]/Sent Mail"
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
set header_cache=”~/.mutt/cache/headers”
set message_cachedir="~/.mutt/cache/bodies"
set certificate_file=~"/.mutt/certificates"
set realname = "Steve"
set from = "marathon...@gmail.com"
set use_from = yes
set envelope_from ="yes"
################ End of GMail IMAP Cofig #################################
#set editor="jed %s
set edit_hdrs
set include
set reply_to
set abort_nosubject=no
set hdr_format="%4C %Z %{%m/%d} %-15.15F (%4c) %s" # format of the index
hdr_order From: Date: User-Agent: X-Mailer To: Cc: Reply-To: Subject:
ignore *
unignore From: Date: User-Agent: X-Mailer To: Cc: Reply-To: Subject:
my_hdr Reply-To:
send-hook . 'unmy_hdr From:'
send-hook . 'From: S.Allen <Marathon.Du...@gmail.com>'
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Color definitions
#
#color normal white default
color hdrdefault red default
color quoted brightblue default
color signature red default
color indicator brightyellow red
color error brightred default
color status yellow blue
color tree magenta default # the thread tree in the index menu
color tilde magenta default
color message brightcyan default
color markers brightcyan default
color attachment brightmagenta default
color search default green # how to hilite search patterns in the pager
color header brightred default ^(From|Subject):
color body magenta default "(ftp|http|https)://[^ ]+" # point out URLs
color body magenta default [-a-z_0-9.]+@[-a-z_0-9.]+ # e-mail addresses
color underline brightgreen default
#my_hdr X-Operating-System: `uname -a`
####################################################################################################
Any suggestions ?
Check your MTA's log messages.
--
Grant Edwards grante Yow! Is this sexual
at intercourse yet?? Is it,
visi.com huh, is it??
Perhaps I didn't explain this too well. I'm connected via IMAP,
therefore my MTA shouldn't be involved, and my outgoing e-mail is in
the GMail 'sent' directory on GMails server. It doesn't however get
sent to the individual or lists.
So there must be something wrong with my muttrc options. Anyone have
any idea(s) ? Thanks.
It'll have to be, since you can't send mail using IMAP.
> and my outgoing e-mail is in the GMail 'sent' directory on
> GMails server.
That's just a folder like any other. Putting something there
doesn't have the side effect of sending it.
> It doesn't however get sent to the individual or lists.
Probably because you've never configured your MTA to send mail.
> So there must be something wrong with my muttrc options.
> Anyone have any idea(s) ? Thanks.
Check your MTA logs and configuration.
--
Grant Edwards grante Yow! Is this an out-take
at from the "BRADY BUNCH"?
visi.com
I guess not ! Thanks to you both. I'll set it up then.
>>> Perhaps I didn't explain this too well. I'm connected via IMAP,
>>> therefore my MTA shouldn't be involved, and my outgoing e-mail is in
>>> the GMail 'sent' directory on GMails server. It doesn't however get
>>> sent to the individual or lists.
>>
>> Perhaps you're not clear on how this works, IMAP doesn't send email.
>> Your MTA does.
>
> I guess not ! Thanks to you both. I'll set it up then.
If you want something dead-simple to configure, I like msmtp.
--
Actually, I use IMAP/Gmail/mutt and the gmail SMTP works just fine since at least version 1.5.15. Looking at your .muttrc I see you
are missing this bit:
set smtp_url='smtp://user...@smtp.gmail.com:587/'
set smtp_pass='password'
Much easier than dealing with an MTA, IMO.
HTH
--
(\__/)
(='.'=)
(")_(")
I didn't know that SMTP support had been added to mutt. I
might have to give that a try...
--
Grant
> I didn't know that SMTP support had been added to mutt. I
> might have to give that a try...
The mutt developers used to say that SMTP support did not belong in an
MTA but eventually I think they relented and added it. They were right
though:-) I like msmtp - it has a nice config file and I can get it to
log all outgoing message IDs with who it was sent to and whether there
was an error etc. I configure msmtp to use whichever server I want to
send mail through and tell mutt to use msmtp for sending. That way, when
I write a script to send email I can just tell it to use msmtp directly
without having to invoke mutt.
Ian
--
Ian Gregory
http://www.zenatode.org.uk/ian/
I've been considering doing something like that, but first I have to figure
out how I would organize three accounts and several mailing lists to work in
a single instance of mutt. I've been doing it the lazy way, running three
instances of mutt each with its own unique config file. If I use a single
instance of mutt for one pop and two imap accounts, will I be able to easily
switch between mailboxes on the fly?
> The mutt developers used to say that SMTP support did not belong in an
> MTA but eventually I think they relented and added it. They were right
> though:-)
I have been using mutt and gmail for a while now (see the guide in my
sig) and briefly sampled IMAP and I have to admit I would add it in with
SMTP support: mutt looks better without it. I prefer one program to get
the mail, another to sort it, mutt to read it and yet another program to
send my reply. This seems to be regarded as 'old-fashioned' now ...
Andrew
--
echo 'http://www.andrews-corner.org/mutt.html' | \
sed -e 's/\///g' -e 's/.\{12\}$/com/' \
-e 's/s-.\{6\}/@gmail/' -e 's/^.\{8\}/usenet/'
> I've been considering doing something like that, but first I have to figure
> out how I would organize three accounts and several mailing lists to work in
> a single instance of mutt. I've been doing it the lazy way, running three
> instances of mutt each with its own unique config file. If I use a single
> instance of mutt for one pop and two imap accounts, will I be able to easily
> switch between mailboxes on the fly?
I use mutt to manage lots of local mail folders, a couple of IMAP
accounts and a dozen or so mailing lists. It all works just fine with a
single config file - I use "mailboxes" in .muttrc to specify the IMAP
accounts and "subscribe" to tell mutt which addresses correspond to
lists that I read and post to. There are various keyboard shortcuts to
switch between folders amd mailboxes - it is all in the documentation.
I use "set reverse_name" and "alternates" to ensure that when I reply to
an email, my reply's from address is the same as the to address of the
email I am replying to (the behaviour is different if it is a list
address).
As far as sending is concerned I only ever use one SMTP server, the one
provided for my use by my ISP. But as I said, I don't use mutt's SMTP
support, I just put "set sendmail = /opt/local/bin/msmtp" in my .muttrc
and configure msmtp to send through my ISP's SMTP server. If for some
reason you want to send different emails out through different SMTP
servers then you can specify multiple servers in the .msmtprc file. You
can specify one of them as the default but set it up so that the actual
server used depends on the envelope-from of the message you are sending
(to make this work properly you need to have "set envelope_from = yes"
in your .muttrc).
It may sound complex but once it is set up it is far easier than running
separate instances of mutt for each account and list, each with it's own
config file.
> On 2008-10-06, Ian Gregory <f...@prdetfanaaeextna.invalid> wrote:
>
>> The mutt developers used to say that SMTP support did not belong in an
>> MTA but eventually I think they relented and added it. They were right
>> though:-)
>
> I have been using mutt and gmail for a while now (see the guide in my
> sig) and briefly sampled IMAP and I have to admit I would add it in with
> SMTP support: mutt looks better without it. I prefer one program to get
> the mail, another to sort it, mutt to read it and yet another program to
> send my reply. This seems to be regarded as 'old-fashioned' now ...
Except that Imap is a protocol for distant mailboxes. It is entirely
different ofpop, and has its advantage (the main for me is I can use
several clients onseveral OSes, on the same mailboxes).
--
Le travail n'est pas une bonne chose. Si ça l'était,
les riches l'auraient accaparé
I find the idea interesting and somewhat appealing, but the thing is I won't
be logged into all my accounts at once as I am now. Unless I've misunderstood,
it looks like I can set it up to toggle between accounts, which is nice, but
since I am usually running in terminal emulators on OS X or Linux it's nice to
have three instances because all accounts are active at once and I can easily
keep an eye on them.
Still, I am likely to set it up your way just for the sake of trying it out
(and because it is more conceptually appealing). Maybe next weekend I'll make
the time to finally get serious with the manual. I'm sure it will be worth my
while to do so; mutt is so sweet after using so many graphical apps. It's by
far the nicest interface I've found for email. It's actually lowered my stress
levels. :)
Well, I thought it over and finally I did set it up pretty much your way
(after much tribulation with procmail:). I'm using fetchmail to receive
from all three accounts, and mutt's built-in SMTP to send through my ISP's
server. You are right; it was a bit of a hassle to set up but it was 100%
worth it. Thanks!
> Well, I thought it over and finally I did set it up pretty much your way
> (after much tribulation with procmail:). I'm using fetchmail to receive
> from all three accounts, and mutt's built-in SMTP to send through my ISP's
> server. You are right; it was a bit of a hassle to set up but it was 100%
> worth it. Thanks!
Glad my advice was useful. Interesting that you are not using mutt's
IMAP support but are using it's SMTP support whereas I am doing exactly
the opposite. I might switch to using fetchmail/procmail at some point
but at the moment I just read email on the server using mutt's IMAP
support and delete messages or save them to local folders as
appropriate.
I guess we have opposite setups in a way then. Truthfully, I just chose
the easy way out. :) After reading a bit about the multiple account hooks
it dawned on me there was no compelling reason to do all that if I could
just handle all mail locally. Especially because the IMAP accounts for my
domain are hosted by Gmail. Their archiving and search facility makes perfect
sync a lot less necesssary.