现在的位置: 首页 > 综合 > 正文

sendmail使用中的一些问题

2013年03月14日 ⁄ 综合 ⁄ 共 3123字 ⁄ 字号 评论关闭

linux邮件系统安装步骤

基本操作:

1、rpm -ivh sendmail-cf-8.13.1-3.RHEL4.5.i386.rpm
2、 把/etc/mail/sendmail.mc 文件中
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
改成
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
3、 /etc/mail/access中加这一行
user@domain.com              RELAY
(注:要发送到的邮箱,少数服务器需要加,多数服务器不用加就可以发邮件)
4、 /etc/resolv.conf 中加域名解析
nameserver 202.96.134.133
(dns服务器地址)
5、重启服务
service sendmail restart
(sendmail -bp:查看sendmail是否有邮件待发)
mail -s "test message" hehe@hehe.com <mailbody.txt

————————————————————————————————————————————
/var/log/maillog里显示Connection refused by [127.0.0.1]
/etc/mail/local-host-names里面加了主机名没
————————————————————————————————————————————

可能遇到的问题:

1.sendmail重启失败一

    #service sendmail restart
    Shuttingdown sendmail: [  OK  ]
    Shuttingdown sm-client: [FAILED]
    Startingsendmail: 554 5.0.0 No local mailer defined
    554 5.0.0QueueDirectory (Q) option must be set
   [FAILED]
    Startingsm-client: [  OK  ]

[解决方法]

http://phorum.study-area.org/index.php?topic=13990.0;prev_next=next

#rpm -qsendmail-cf                         //查看sendmail-cf版本

package sendmail-cf is notinstalled        //表示没有安装sendmail-cf

 

————————————————————————————————————————————

2.sendmail重启失败二

       [root@l-1 greenet_check]# service sendmail restart
       关闭 sendmail:[  确定  ]
       关闭 sm-client:[失败]
       启动 sendmail:makemap: erroropening type hash map access.db: Executable files not allowed
       make: ***[access.db] 错误 73
        确定  ]
       启动 sm-client:/etc/mail/submit.cf: line 545: fileclass: cannot open'/etc/mail/trusted-users': Permission denied
       [失败]

[解决方法]文件权限问题,参考以下两片文章。

第一篇解决了第一个错误,去掉access.db文件的执行权限即可。

但是第二篇稍微有出入,我遇到的错误提示是“Permission denied”,而文中是“World writabledirectory”。参考了其他服务器的配置,将trusted-users文件的权限改为644,解决。

-rw-r--r--  1 rootroot   127 Jun15  2006 trusted-users

http://linux.chinaunix.net/bbs/thread-587977-1-1.html

http://hi.baidu.com/����С��/blog/item/c11d9e3f3ea61cf6838b1302.html(文章失效)

 

3.发邮件非常慢,用mailq命令也半天才显示结果

查看日志/var/log/maillog,会有:

My unqualified host name (********) unknown; sleeping forretry

http://blog.chinaunix.net/u1/42898/showart_335669.html

[解决方法]

vi /etc/hosts

把127.0.0.1   localhost.localdomainlocalhost修改为:

127.0.0.1   hostname localhost.localdomainlocalhost

hostname是主机名

 4、sendmail 启动/重启的时候,到了Startingsendmail这一步就停那儿了。

也是和主机名有关,“估计是sendmail配置有问题,或者是主机名不是网络规范的写法(xx.xx.com),使sendmail验证时间比较常。sendmail是mta,它认的都是网络主机名。你应该是linuxone.china.comor linuxone.cn类似的名字。”

参考贴:http://bbs.chinaunix.net/thread-410586-1-1.html

——————————————————————————————————————————————

跟sendmail相关的几篇文章

保证成功绝对可行的sendmail邮件服务器搭载smtp和pop3认证的详细配置过程

http://www.linuxeden.com/forum/thread-160417-1-1.html

 

Sendmail的安全配置
http://www.docin.com/p-19922070.html

 

鳥哥的 Linux 私房菜 -- Mail Server

http://www.gpes.cy.edu.tw/study/linux/Mail��A��.htm

 

sendmail 配置错误:Cannot open /usr/share/sendmail-cf/m4/cf.m4
http://www.blogjava.net/sealyu/archive/2008/07/23/217028.html

 

Solaris中hostname引起的sendmail错误

 http://www.blogjava.net/sealyu/archive/2008/07/23/217028.html

 

sendmail 队列管理
http://bbs.chinaunix.net/viewthread.php?tid=947152

 

Ping命令不能PING通的种种解惑

http://tieba.baidu.com/f?kz=679294435

 

sendmail错误Connection refused by [127.0.0.1]的解决

http://www.lupaworld.com/28556/viewspace-45209.html

 

用redhat8.0自带的sendmail+sasl配置邮件服务器

http://bbs.chinaunix.net/viewthread.php?tid=14770&highlight=peng

抱歉!评论已关闭.