|
|
我按照http://www.xuega.com/klein/blog/article_213.html的方法配置了mutt,却不能收信。具体的配置如下:
一、exim4的配置
root用户执行:
#dpkg-reconfigure exim4-config
gmail的邮箱是要smtp认证的,所以按照下面所示操作.
(1)将配置文档拆分成小文件么? 否
(2)选择“用smarthost发信;通过smtp或fetchmail接受邮件”
(3)系统邮件名称:zhangxinyue0711@gmail.com
(4)要监听的入站 SMTP 连接的 IP 地址:127.0.0.1
(5)其它可接受的邮件目的地址:(empty)
(6)为这些主机进行邮件转发:(empty)
(7)负责处理从本机寄出的邮件的机器(smarthost): 72.14.253.109
(8)要在寄出的邮件中隐藏本地邮件名称吗? 是
(9)本地用户的可视域名:zhangxinyue0711@gmail.com
(10)保持最小 DNS 查询量吗(按需拔号 Dial-on-Demand)? 否
(11)本地信件的投递方式:/var/mail/ 中的mbox格式
修改几个配置文件:
(1) #vi /etc/exim4/passwd.client
smtp的帐号密码设置,加入:
72.14.253.109:zhangxinyue0711@gmail.com:**********
(2) #vi /etc/exim4/exim4.conf.template
找到下面的文字
# Because AUTH PLAIN and AUTH LOGIN send the password in clear, we
# only allow these mechanisms over encrypted connections by default.
# You can set AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS to allow unencrypted
# clear text password authentication on all connections.
在这段话后加入:
AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS = 1
配置之后重新启动exim4
# /etc/init.d/exim4 restart
二、建立文件箱
普通用户,执行:
$cd ~
$mkdir -p ~/Mail/inbox/{cur,new,tmp}
$mkdir -p ~/Mail/sent/{cur,new,tmp}
$mkdir -p ~/Mail/postponed/{cur,new,tmp}
分别是收件箱,发件箱,草稿箱
三、配置mutt
普通用户身份在/home/kelvin/目录下新建.muttrc文件。
将以下内容写入:
set editor="emacs -nw"
set mbox="~/Mail/inbox"
set mbox_type=maildir
set spoolfile="~/Mail/inbox"
set postponed="~/Mail/postponed"
set record="~/Mail/sent"
auto_view application/msword
#set alternates="zhangxinyue0711@gmail.com"
set index_format="%4C %Z %{%b %d} %-15.15L (%4l) %s"
set header=no
set quit=ask-yes
auto_view text/html
set move=no
set ascii_chars=yes
set include
set indent_str="> "
my_hdr From: zhangxinyue0711@gmail.com
score "~N" +4
score "~s 通知" +2
score "~s Circulation" +3
score "~D" -5
score "~O" +1
score "~s believe" -10
set sort=score
set sort_aux=date
set pager_stop
set fast_reply
set resolve=yes
source ~/.mutt.alias
set alias_file=/home/kelvin/.mutt.alias
set record="~/Mail/=sent-mail-`date +%Y-%m`"
set charset="zh_CN"
set send_charset="us-ascii:iso-8859-1:gb2312:utf-8"
set wait_key=yes
set noconfirmappend
set edit_headers=no
set pager_index_lines=4
set locale="zh_CN"
charset-hook ^us-ascii$ gb2312
charset-hook !utf-8 gb2312
set pop_user=zhangxinyue0711@gmail.com
set pop_pass="***********"
set pop_host=gmail-pop.l.google.com
其中#set alternates="zhangxinyue0711@gmail.com"这一行因为提示alternates是未知的变量,所以就被我注释掉了。
然后在修改/hom/kelvin/.mailcap文件,在最后加上:
text/html; lynx -force_html %s; needsterminal;
application/msword; /usr/bin/antiword '%s'; copiousoutput;
description="Microsoft Word Text"; nametemplate=%s.doc
并新建一个名为.mutt.alias的空文件,留待以后使用。
然后在终端下输入:mutt,启动mutt后,按住shift+g;
mutt的提示信息如下(------->表示顺接):
looking up gmail-pop.l.google.com…..------->
正连接到gmail-pop.l.google.com--------->
Couldn't connected to gmail-pop.l.google.com(被中断的系统调用)---------->
Error connecting to server: gmail-pop.l.google.com
我运行的是GNU/Linux Debian 4r0 etch,内核2.6.18-4-686,Mutt 1.5.13 (2006-08-11),这是gmail的其他邮件客户端配置说明:
接收邮件 (POP3) 服务器 - 需要 SSL: pop.gmail.com
使用 SSL:是
端口:995
发送邮件 (SMTP) 服务器 - 需要 TLS: smtp.gmail.com(使用验证)
使用验证:是
使用 STARTTLS:是(某些客户端称其为 SSL)
端口:465 或 587
帐户名: 您的 Gmail 用户名(包括 @gmail.com)
电子邮件地址: 您的完整 Gmail 电子邮件地址(用户名@gmail.com)
密码: 您的 Gmail 密码
请注意,如果您的客户端不支持 SMTP 验证,您将无法通过客户端用 Gmail 地址发送电子邮件。
本来我想把log贴出来让大家帮我看看,但由于我是newbie,在/var/log/下找了半天也没找到,所以没办法了。
大家帮我看看这个问题出在哪儿?小弟在此先谢过了。:-) |
|