●バックアップ取得 [root@web2 ~]# cp -p /etc/postfix/main.cf /etc/postfix/main.cf.org ●main.cf編集 以下の内容に変更 [root@web2 ~]# diff -c /etc/postfix/main.cf /etc/postfix/main.cf.org *** /etc/postfix/main.cf Thu Nov 24 11:29:34 2011 --- /etc/postfix/main.cf.org Wed Jun 1 01:29:21 2011 *************** *** 68,74 **** # #myhostname = host.domain.tld #myhostname = virtual.domain.tld - myhostname = web2.i-generation.jp # The mydomain parameter specifies the local internet domain name. # The default is to use $myhostname minus the first component. --- 68,73 ---- *************** *** 76,82 **** # parameters. # #mydomain = domain.tld - mydomain = i-generation.jp # SENDING MAIL # --- 75,80 ---- *************** *** 92,98 **** # to recipient addresses that have no @domain part. # #myorigin = $myhostname ! myorigin = $mydomain # RECEIVING MAIL --- 90,96 ---- # to recipient addresses that have no @domain part. # #myorigin = $myhostname ! #myorigin = $mydomain # RECEIVING MAIL *************** *** 106,115 **** # # Note: you need to stop/start Postfix when this parameter changes. # ! inet_interfaces = all #inet_interfaces = $myhostname #inet_interfaces = $myhostname, localhost ! #inet_interfaces = localhost # The proxy_interfaces parameter specifies the network interface # addresses that this mail system receives mail on by way of a --- 104,113 ---- # # Note: you need to stop/start Postfix when this parameter changes. # ! #inet_interfaces = all #inet_interfaces = $myhostname #inet_interfaces = $myhostname, localhost ! inet_interfaces = localhost # The proxy_interfaces parameter specifies the network interface # addresses that this mail system receives mail on by way of a *************** *** 154,161 **** # # See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS". # ! #mydestination = $myhostname, localhost.$mydomain, localhost ! mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, # mail.$mydomain, www.$mydomain, ftp.$mydomain --- 152,159 ---- # # See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS". # ! mydestination = $myhostname, localhost.$mydomain, localhost ! #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, # mail.$mydomain, www.$mydomain, ftp.$mydomain *************** *** 409,415 **** # "Maildir/" for qmail-style delivery (the / is required). # #home_mailbox = Mailbox ! home_mailbox = Maildir/ # The mail_spool_directory parameter specifies the directory where # UNIX-style mailboxes are kept. The default setting depends on the --- 407,413 ---- # "Maildir/" for qmail-style delivery (the / is required). # #home_mailbox = Mailbox ! #home_mailbox = Maildir/ # The mail_spool_directory parameter specifies the directory where # UNIX-style mailboxes are kept. The default setting depends on the *************** *** 667,677 **** # readme_directory: The location of the Postfix README files. # readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES - - smtpd_sasl_auth_enable = yes - smtpd_sasl_local_domain = $myhostname - smtpd_recipient_restrictions = - permit_mynetworks - permit_sasl_authenticated - reject_unauth_destination - --- 665,667 ---- ●saslauthd起動 [root@web2 ~]# /etc/rc.d/init.d/saslauthd start Starting saslauthd: [ OK ] ●saslauthd自動起動設定 [root@web2 ~]# chkconfig saslauthd on [root@web2 ~]# chkconfig --list saslauthd saslauthd 0:off 1:off 2:on 3:on 4:on 5:on 6:off ●メールボックス作成 [root@web2 ~]# mkdir -p /etc/skel/Maildir/new [root@web2 ~]# mkdir -p /etc/skel/Maildir/cur [root@web2 ~]# mkdir -p /etc/skel/Maildir/tmp ●sendmail停止 [root@web2 ~]# /etc/rc.d/init.d/sendmail stop Shutting down sm-client: [ OK ] Shutting down sendmail: [ OK ] ●sendmail自動起動設定解除 [root@web2 ~]# chkconfig --list sendmail sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@web2 ~]# chkconfig sendmail off [root@web2 ~]# chkconfig --list sendmail sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off ●メールサーバ切り替え [root@web2 ~]# alternatives --config mta There are 2 programs which provide 'mta'. Selection Command ----------------------------------------------- *+ 1 /usr/sbin/sendmail.sendmail 2 /usr/sbin/sendmail.postfix Enter to keep the current selection[+], or type selection number: 2 ←2を選択 ●postfix起動 [root@web2 ~]# /etc/rc.d/init.d/postfix start Starting postfix: [ OK ] ●Postfix自動起動設定 [root@web2 ~]# chkconfig --list postfix postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@web2 ~]# chkconfig postfix on [root@web2 ~]# chkconfig --list postfix postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off