日历

2017年十二月
« 9月    
 123
45678910
11121314151617
18192021222324
25262728293031

最近评论

    linux/unix基础知识

    配置sendmail是需要注意的事情

    配置sendmail时,修改sendmail.mc,如果将配置语句没有顶格写,容易出现问题,比如启动sendmail服务器提供的SMTP的用户认证,只需要将
    dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl
    dnl define(`confAUTH_MECHANISMS’, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl 修改为
    TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl
    define(`confAUTH_MECHANISMS’, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl
    也就是把前边的dnl删除,但是如果删除dnl后,配置语句没有顶格写,在执行m4 sendmail.mc > sendmail.cf后,执行service sendmail restart或 执行 newaliases生成新的别名记录文件时,都会报错,报错如下:
    [root@localhost mail]# service sendmail restart
    Shutting down sendmail:                                    [  OK  ]
    Shutting down sm-client:                                   [  OK  ]
    Starting sendmail: 554 5.0.0 /etc/mail/sendmail.cf: line 39: unknown configuration line ”

                                                               [FAILED]
    Starting sm-client:                                        [  OK  ]
    [root@localhost mail]# service sendmail restart
    Shutting down sendmail:                                    [  OK  ]
    Shutting down sm-client:                                   [FAILED]
    Starting sendmail: 554 5.0.0 /etc/mail/sendmail.cf: line 39: unknown configuration line ”

                                                               [FAILED]
    Starting sm-client:                                        [  OK  ]
    [root@localhost mail]# newaliases
    /etc/mail/sendmail.cf: line 39: unknown configuration line ”

    如果出现以上错误,只要将sendmail.mc中的配置语句顶格写,后重新执行m4 sendmail.mc > sendmail.cf后,执行service sendmail restart或 执行 newaliases生成新的别名记录文件,就不会出现以上错误了!

    评论已关闭。