°²×°postfix֮ǰ£¬×îºÃÏȰÑsendmailÈí¼þÐ¶ÔØ£¬¹²Ëĸö°ü£¬·Ö±ðÖ´ÐÐÏÂÃæ¼¸¸öÃüÁ
#rpm -qa | grep sendmail
#rpm -e sendmail-devel
#rpm -e sendmail --nodeps
#rpm -e sendmail-doc --nodeps
#rpm -e sendmail-cf
ÏÂÃæÊÇÔÚûÓÐÐ¶ÔØsendmailµÄÇé¿öÏÂÍê³ÉµÄ£¬¾²âÊÔÊdzɹ¦µÄ¡£
1¡¢ÏÈ´´½¨Ò»¸öÓû§postfixºÍÒ»¸ö×épostdrop
#useradd postfix
#groupadd postdrop
×¢£ºÈç¹ûÏȲ»´´½¨postfixÓû§ºÍpostdrop×飬ÄÇôÔÚ°²×°postfixʱ£¬Ö´ÐÐmak installʱ»á³ö´í£¡
2¡¢°²×°postfix
#tar -zxvf postfix.tar.gz
# cd postfix-2.3-20060207/
#make
#make install
Ç°Ãæ¶¼°´Ä¬ÈÏÏîһ·»Ø³µÏÂÈ¥£¬Ö±µ½³öÏÖµÚÒ»¸ö¡±no¡°Ê±£¬ÕâʱҪÊäÈ롱/opt/postfix¡°£¬ÔÙ°´»Ø³µ£¬µ±³öÏÖµÚ¶þ¸ö¡±no¡°Ê±£¬Ò²ÊÇÊäÈ롱/opt/postfix¡°£¬Ôٻسµ£¬¿ªÊ¼°²×°£¬Ö±µ½³öÏÖÏÂÃæµÄÄÚÈÝ£¬±íʾÒѾ°²×°Íê³É¡£
Warning: you still need to edit myorigin/mydestination/mynetworks
parameter settings in /etc/postfix/main.cf.
See also http://www.postfix.org/
FAQ.html for information about dialup
sites or about sites inside a firewalled network.
BTW: Check your /etc/aliases file and be sure to set up aliases
that send mail for root and postmaster to a real person, then run
/usr/bin/newaliases.
3¡¢±à¼/etc/passwdÎļþ£¬Ê¹postfixÓû§ÎÞ·¨±¾µØµÇ½
#vi /etc/passwd
¸ÄpostfixÕâÒ»ÐУ¬¸Ä¡±/bin/bash¡°Îª¡±/bin/nologin¡°£¬±£´æÍ˳ö¡£
4¡¢´ò¿ª/etc/postfix/aliasesÎļþ£¬È·ÈÏÀïÃæÓÐÏÂÃæÒ»ÐÐÄÚÈÝ
#vi /etc/postfix/aliases
postfix: root
ÈôûÓУ¬ÔòÐèÒªÊÖ¶¯Ìí¼ÓÉÏÃæÕâÒ»ÐÐÄÚÈÝ¡£
5¡¢½«/etc/aliasesºÍ/etc/aliases.dbÁ½¸öÎļþ¸ÄÃû
#mv /etc/aliases /etc/aliases.old
#mv /etc/aliases.db /etc/aliases.db.old
6¡¢½øÈëµ½/etc/postfixĿ¼£¬Ö´ÐÐÏÂÃæµÄÃüÁî
#cd /etc/postfix
#cp aliases /etc/
#newaliases ÔÚ/etc/Ï£¬Éú³Éaliases.dbÎļþ
#cp /etc/aliases.db /etc/postfix/
7¡¢±à¼/etc/postfix/main.cfÎļþ
½øÈëµ½µÚ68ÐУ¬È¥µôÇ°ÃæµÄ¡±#¡°£¬ºóÃæ¸ÄΪ×Ô¼ºµÄÖ÷»úÃû£¬ÕâÐÐÄÚÈÝÈçÏ£º
myhostname = mail.davidway.com
½øÈëµ½µÚ76ÐУ¬È¥µôÇ°ÃæµÄ¡±#¡°£¬ºóÃæ¸ÄΪÓòÃû£¬ÄÚÈݼûÏ£º
mydomain = davidway.com
½øÈëµ½µÚ92ÐУ¬È¥µôÇ°ÃæµÄ¡±#¡°£¬ÄÚÈݼûÏ£º
myorigin = $mydomain
½øÈëµ½106ÐУ¬È¥µôÇ°ÃæµÄ¡±#¡°£¬ÄÚÈݼûÏ£º
inet_interfaces = all
½øÈëµ½119ÐУ¬ÕâÊÇÉèÖÃÓʼþÍø¹ØµÄ£¬ÕâÀïÔݲ»ÉèÖã¬ÄÚÈݼûÏ£º
#proxy_interfaces =
½øÈëµ½µÚ153ÐУ¬ÏÈÈ¥µôÇ°ÃæµÄ¡±#¡°£¬È»ºóÔÚÐÐβÌí¼ÓÉÏ¡±£¬ $mydomain¡°£¬ÄÚÈݼûÏÂmydestination = $myhostname, localhost.$mydomain, localhost, $mydomai n
½øÈëµ½µÚ253ÐУ¬È¥µôÇ°ÃæµÄ¡±#¡°£¬½«ÖмäµÄÍø¶Î¸Ä³É±¾»úµÄÍø¶Î£¬ÄÚÈݼûÏ£º
mynetworks = 192.168.0.0/24, 127.0.0.0/8
½øÈëµ½µÚ285ÐУ¬È¥µôÇ°ÃæµÄ¡±#¡°£¬ÄÚÈݼûÏ£º
relay_domains = $mydestination
±£´æÍ˳ö£¡
8¡¢Æô¶¯postfix
#postfix start
9¡¢ÔÚ±¾»ú´ò¿ªÀ×ÄñÈí¼þ½øÐвâÊÔ£¬³É¹¦£¡