[root@localhost ~]#vim /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 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 #刪掉上面兩行前面的 dnl, 前面不要留有空格 [root@localhost ~]#cd /etc/mail 備份舊的設定檔資料 [root@localhost ~]#mv sendmail.cf sendmail.cf.back 建立新的 sendmail.cf 設定檔 [root@localhost ~]#m4 sendmail.mc > sendmail.cf 設定可接收的郵件位址 [root@localhost ~]#vim /etc/mail/local-host-names 設定MTA Relay 權限 [root@localhost ~]#vim /etc/mail/access makemap hash access.db < access POP/IMAP等協定 [root@localhost ~]#vim /etc/dovecot.conf #protocols = imap imaps pop3 pop3 protocols = imap pop3 [root@localhost ~]#/etc/init.d/dovecot start 修改為開機執行 啟用SMTP [root@localhost ~]#/etc/rc.d/init.d/saslauthd start 修改為開機執行 重新啟動 sendmail [root@localhost ~]#/etc/init.d/sendmail restart 設定帳號別名及轉寄信件 [root@localhost ~]#vim /etc/aliases 讓設定生效 [root@localhost ~]#newaliases
三月 12
近期迴響