Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1719533
  • 博文数量: 362
  • 博客积分: 10587
  • 博客等级: 上将
  • 技术积分: 4098
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-10 18:15
文章分类

全部博文(362)

文章存档

2014年(1)

2013年(58)

2011年(115)

2010年(112)

2009年(76)

分类: LINUX

2011-04-23 16:58:44


1.首先就是上面我说过的了,sendmail 和ssmtp冲突不要两个同时存在!
先emerge -Cp ssmtp 看看有没有安装如果有请emerge -C ssmtp!
2.接下来安装sendmail 和 evolution 
#emerge -p sendmail evolution
3.配置sendmail 
其实也没有什么就是加入自动启动!
rc-update add sendmail default
启动sendmail 
/etc/init.d/sendmail start
4设置evolution 
按照提示一步步来
自己手写个邮件看看能不能用sendmai发送!
不好意思出错了吧:
代码:
Error while performing operation: Could not send message: Broken pipe
其实这个是权限问题!
chmod 777 /var/spool/clientmqueue
再试试看看能不能发送邮件
呵呵能了吧!




 - mail-mta/sendmail-8.14.0: /var/spool/mqueue wrong owner & access mode

NoteYou need to  before you can comment on or make changes to this bug.
Jarry 2009-11-12 20:29:49 UTC
sendmail takes care of creating some necessary directories, one of them is
/mail/spool/mqueue. After clean installation it should be:

drwx------  2 root  root  4096 Nov 12 19:49 mqueue

But instead of that, it is:
drwxr-xr-x  2 smmsp root  4096 Nov 12 19:39 mqueue

Sendmail refuses (or can not) write emails and exits with error message:

421 4.3.0 collect: Cannot write ./dfnACK6CaU032612 (bfcommit, uid=0, gid=209):
Permission denied

Reproducible: Always

Steps to Reproduce:
emerge -C ssmtp
emerge sendmail telnet-bsd
useradd -m -g users -s /bin/false testuser
/etc/init.d/sendmail start
telnet localhost 25

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 test ESMTP Sendmail 8.14.0/8.14.0; Thu, 12 Nov 2009 20:06:12 GMT
HELO localhost
250 test Hello [localhost], pleased to meet you
MAIL FROM:root@some.mydomain.com
250 2.1.0 root@some.mydomain.com... Sender ok
RCPT TO:testuser@localhost
250 2.1.5 testuser@localhost... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Test message.
.
421 4.3.0 collect: Cannot write ./dfnACK6CaU032612 (bfcommit, uid=0, gid=209):
Permission denied
Connection closed by foreign host.

Actual Results:  
Message is not delivered, and stays in /var/spool/clientmqueue

Expected Results:  
Message should be delivered to $HOME/.maildir/new

Info from Sendmail Installation And Operation Guide:
...
1.3.7. /var/spool/mqueue
The directory /var/spool/mqueue should be created to hold the mail queue. This
directory should be mode 0700 and owned by root.
...

So the fix is very simple:

chown root /var/spool/mqueue
chmod 700 /var/spool/mqueue

And it really works! :-)
Jarry 2009-11-12 20:35:40 UTC
Damned, I screwed the first line and even summary!
It should have been: /var/spool/mqueue   :-(
阅读(1802) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~