为 Gmail 设置 mutt

为 Gmail 设置 mutt

我正在尝试为 Gmail 设置 mutt。我正在关注Crunchbang 维基说明然而,在

set from = "[email protected]"
set realname = "Your Real Name"

set imap_user = "[email protected]"
set imap_pass = "yourpassword"

(当然,我的详细信息),我得到

$ mutt
Error in $HOME/.muttrc, line 12: imap_user: unknown variable
Error in $HOME/.muttrc, line 13: imap_pass: unknown variable
source: errors in $HOME/.muttrc
Press any key to continue...

如果我尝试发送电子邮件,它不起作用,因为它尝试直接从我的本地主机的邮件系统发送电子邮件,而不是 IMAP。Mutt 说它是 Mutt 1.4.2.3i 版本。

更新:

因此我在 Macports 上下载了 mutt-devel,版本是 1.5:

$ mutt -v
Mutt 1.5.21 (2010-09-15)
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: Darwin 11.3.0 (x86_64)
ncurses: ncurses 5.9.20110404 (compiled with 5.9)
libiconv: 1.14
libidn: 1.22 (compiled with 1.22)
Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  +USE_FCNTL  -USE_FLOCK   
+USE_POP  +USE_IMAP  -USE_SMTP  
-USE_SSL_OPENSSL  -USE_SSL_GNUTLS  -USE_SASL  -USE_GSS  +HAVE_GETADDRINFO  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  -CRYPT_BACKEND_GPGME  
-EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  +HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  -USE_HCACHE  
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/opt/local/share/mutt"
SYSCONFDIR="/opt/local/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <[email protected]>.
To report a bug, please visit http://bugs.mutt.org/.

目前,它没有配置为使用 smtp,但应该启用 imap。然而,刚启动 mutt 就挂了

Connecting to gmail.com...

有没有办法检查日志或其他东西来查看是否找不到服务器或密码被拒绝或其他什么?

更新:

安装 ssl、imap 和 smtp 支持后,即使它可以连接到 gmail,我仍然收到这些警告/错误。

Error in $HOME/.muttrc line 9: trash: unknown variable
Error in $HOME/.muttrc, line 11: header_cache: unknown variable

答案1

首先你可以通过 exec 检查 mutt 是否支持 IMAP 和 SMTP
mutt -v

标记喜欢+USE_IMAP+USE_SMTP

如果你想使用 IMAP,你的 muttrc 中必须有

set imap_user = "[email protected]"
set imap_pass = "PASSWORD" 
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX" 

如果我尝试发送电子邮件,它不起作用,因为它尝试直接从我的本地主机的邮件系统发送电子邮件,而不是 IMAP

IMAP?
也许你想要的是 SMTP

set smtp_url = "smtp://[email protected]:587/"
set smtp_pass = "yourpassword"

或者你可以安装外部程序,如 esmtp 或 msmtp

相关内容