Page 1 of 1

mutt - SOLVED - sort of

Posted: 15. Jan 2011, 20:55
by mimosa
I've been experimenting with mutt, following guidance on setting it up to work with Gmail such as this quite recent webpage:

http://crunchbanglinux.org/wiki/howto/h ... gmail_imap

which basically says much the same as a lot of other older sites. But when run, mutt complains:

Code: Select all

Error in /home/mimosa/.muttrc, line 7: smtp_url: unknown variable
Error in /home/mimosa/.muttrc, line 8: smtp_pass: unknown variable
Error in /home/mimosa/.muttrc, line 26: header_cache: unknown variable
Error in /home/mimosa/.muttrc, line 27: message_cachedir: unknown variable
source: errors in /home/mimosa/.muttrc
and also won't send email

Code: Select all

Error sending message, child exited 127 (Exec error.).
which may have something to do with the smtp-related variables above.

I know mutt has a reputation for being hard to set up, but these look to my untutored eye like problems that shouldn't occur. Also, I know that the classical way of doing it involves a program like fetchmail, but this way of accessing Gmail doesn't appear to involve that, see e.g.:
Mutt is a Mail User Agent (MUA), and was written to view mail. It was not written to retrieve, send, or filter mail. It relies on external programs to do those tasks. But recently it has become possible to receive and sending mails trough gmail.
from the above site.

I currently use alpine, but can't work out how to get it to interact as fully with gmail as this way of setting up mutt promises. Also mutt seems to be regarded in Linux circles as character-forming, and has colour coding. :P I have just found urlview in slapt-src,

Code: Select all

root[mimosa]# slapt-src -l | grep urlview
urlview:0.9 - urlview (extract URLs from text files)
root[mimosa]# slapt-src -i urlview
so now it really will have bells on - if I can get the basic functionality going. No doubt the solution is in front of my nose.

Re: mutt

Posted: 15. Jan 2011, 22:02
by mimosa
Hmm... installing sendmail fixed the principal problem. :oops: Funny how none of the guides mentioned that. But I'm still getting the error messages about odd lines in .muttrc.

EDIT But it seems it wasn't mentioned because it's really not necessary:

http://www.therandymon.com/woodnotes/mutt/node39.html

Re: mutt

Posted: 16. Jan 2011, 10:46
by mimosa
I think I have discovered what is causing the problem. The smtp functionality described in the above link (dating from 2009, quoted below) was introduced in mutt 1.5.17. But Salix (Slackware) has 1.4.2.3 (released in 2007, and still the latest stable version).

http://www.mutt.org/download.html
Starting with version 1.5.17, mutt now - miracle of miracles - has the capability of sending your messages without the need for another program like sendmail. This goes essentially against the mutt philosophy, but was requested by enough users that the decision was made to include SMTP capability.
It's still puzzling that installing sendmail fixed the main problem even with no change to .muttrc, whereas adding this line broke it again:

Code: Select all

#set sendmail="/usr/sbin/ssmtp -audtim.beech@gmail.com -apXXXXXXX"
slapt-src does not appear to have mutt current, but presumably I can just install it.

EDIT

When I did imap didn't work either. I uninstalled, reinstalled mutt stable, and imap doesn't work with it any more either, even using the very same .muttrc as before. :(

Re: mutt - SOLVED - sort of

Posted: 16. Jan 2011, 16:00
by mimosa
The problem with imap when I put mutt stable back was apparently caused because I didn't uninstall bleeding-mutt properly; I used slapt-get rather than doing make uninstall, which got me back to the status quo ante.

That is, it needs sendmail to work, and some of the variables in .muttrc aren't recognised. I think I am now in a position to tinker with it. However, all suggestions gratefully received!

Re: mutt - SOLVED - sort of

Posted: 16. Jan 2011, 18:02
by gapan
mimosa wrote:However, all suggestions gratefully received!
Dump mutt, use alpine. :twisted: :twisted: :twisted:

Re: mutt - SOLVED - sort of

Posted: 16. Jan 2011, 18:23
by mimosa
People do speak highly of mutt, but maybe they are masochists.

Do you know if it's possible to get alpine to integrate better with gmail? At the moment, delete in alpine=archive in gmail, sent mail is stored locally (though maybe remotely too, in which case that's not a problem), and one or two other irritations I can't immediately remember; whereas the .muttrc files I have found for Gmail look as though they aim to be able to do most of the things the webmail interface can, but from the command line and with efficient keyboard commands to boot. Also I can't get it to recognise google's certificate, and I suppose that means the connection isn't really secure.

EDIT

It should be said that the above notwithstanding, alpine is a huge improvement. I remember seeing my first Mac in about 1990 and thinking that it was a pretty toy, but the interface would never catch on for anything serious, in which of course I include email. And I used pine as long as I had access to it. I was wrong about the GUI idea, but I don't think it adds anything to email. :)

Re: mutt - SOLVED - sort of

Posted: 16. Jan 2011, 23:24
by gapan
mimosa wrote:Do you know if it's possible to get alpine to integrate better with gmail? At the moment, delete in alpine=archive in gmail, sent mail is stored locally (though maybe remotely too, in which case that's not a problem)
Yes, delete in alpine=archive in gmail, but I don't really mind. You can go to Folder list/Gmail/[GMail]/All mail in alpine and delete them from the archive too if you really want to. The sent mail is stored both locally and remotely. My only real problem with alpine is that it displays tags made up with non-latin characters as garbage, but I haven't got many tags like that anyway.

I never really used mutt, so I can't help with that. I'm kind of partial to alpine, I spent most of my university days using pine.

Re: mutt - SOLVED - sort of

Posted: 17. Jan 2011, 15:41
by mimosa
I've remembered one of the irritations, namely, postponed messages are stored locally only.

But can I set "Postponed Folder" to imap.gmail.com/foo/bar/Drafts/novalidate-cert/ssl/user=mimosa

or whatever? Indeed, would something other than

Inbox Path = {imap.gmail.com/novalidate-cert/ssl/user=mimosa

make delete work properly?

In "whatever" lies the rub, because as you will have gathered, I don't really understand this stuff yet. With alpine as with mutt, I have configured according to the majority opinion of Google. Not too happy about that novalidate-cert. :roll: