{"id":30,"date":"2011-09-24T00:15:00","date_gmt":"2011-09-23T15:15:00","guid":{"rendered":"http:\/\/yokensaka.com\/centos\/?p=30"},"modified":"2014-07-19T20:07:24","modified_gmt":"2014-07-19T11:07:24","slug":"smtp%e3%82%b5%e3%83%bc%e3%83%90postfix","status":"publish","type":"post","link":"http:\/\/yokensaka.com\/centos\/?p=30","title":{"rendered":"SMTP\u30b5\u30fc\u30d0(Postfix)"},"content":{"rendered":"<p>\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u307e\u305a\u30e1\u30fc\u30eb\u914d\u9001\u3092\u884c\u3046\u305f\u3081\u306eSMTP\u30b5\u30fc\u30d0\u30fc\u304c\u5fc5\u8981\u3068\u306a\u308b\u3002 SMTP\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u52d5\u4f5c\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u4ee3\u8868\u7684\u306a\u3082\u306e\u306b\u306fPostfix\u3001sendmail\u3001qmail\u304c\u3042\u308b\u3002 Postfix\u306fsendmail\u3084qmail\u3088\u308a\u5f8c\u306b\u958b\u767a\u3055\u308c\u305f\u305f\u3081\u3001\u305d\u308c\u305e\u308c\u306e\u826f\u3044\u90e8\u5206\u3092\u53cd\u6620\u3057\u3066\u958b\u767a\u3055\u308c\u3066\u304a\u308a\u3001\u7c21\u5358\u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306a\u306e\u3067\u3001\u3053\u3053\u3067\u306fsendmail\u3068\u306e\u4e92\u63db\u6027\u304c\u512a\u308c\u3066\u3044\u308bPostfix\u3092\u4f7f\u7528\u3059\u308b\u3002<br \/>\n<b>\u25a0Postfix\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/b><\/p>\n<pre>\r\n[root@server1 ~]# yum -y install postfix\r\n<\/pre>\n<p><b>\u25a0Postfix\u306e\u8a2d\u5b9a<\/b><br \/>\nPostfix\u306e\u57fa\u672c\u7684\u306a\u8a2d\u5b9a\u306f\u3001\/etc\/postfix\/main.cf\u3067\u884c\u3046<\/p>\n<pre>\r\n[root@server1 ~]# vi \/etc\/postfix\/main.cf\u3000\u2190\u3000vi\u30a8\u30c7\u30a3\u30bf\u3067main.cf\u3092\u958b\u304f\r\n# The myhostname parameter specifies the internet hostname of this\r\n# mail system. The default is to use the fully-qualified domain name\r\n# from gethostname(). $myhostname is used as a default value for many\r\n# other configuration parameters.\r\n#\r\n#myhostname = host.domain.tld\r\n\u2193\r\nmyhostname = server1.yokensaka.com\u3000\u2190\u3000#\u3092\u5916\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30db\u30b9\u30c8\u540d\u3092\u8a2d\u5b9a\r\n#myhostname = virtual.domain.tld\r\n# The mydomain parameter specifies the local internet domain name.\r\n# The default is to use $myhostname minus the first component.\r\n# $mydomain is used as a default value for many other configuration\r\n# parameters.\r\n#\r\n#mydomain = domain.tld\r\n\u2193\r\nmydomain = yokensaka.com\u3000\u2190\u3000#\u3092\u5916\u3057\u3066\u3001\u30c9\u30e1\u30a4\u30f3\u540d\u3092\u8a2d\u5b9a\r\n# For the sake of consistency between sender and recipient addresses,\r\n# myorigin also specifies the default domain name that is appended\r\n# to recipient addresses that have no @domain part.\r\n#\r\n#myorigin = $myhostname\r\n#myorigin = $mydomain\r\n\u2193\r\nmyorigin = $mydomain\u3000\u2190\u3000#\u3092\u5916\u3057\u3066\u3001\u8a2d\u5b9a\u3092\u6709\u52b9\u306b\r\n\u3000\u3000\u3000\u3000\u3000\u3000\uff08\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u300c@\u300d\u4ee5\u4e0b\u306b\u4ed8\u52a0\u3059\u308b\u6587\u5b57\u5217\u3092\u6307\u5b9a)\r\n# See also the proxy_interfaces parameter, for network addresses that\r\n# are forwarded to us via a proxy or network address translator.\r\n#\r\n# Note: you need to stop\/start Postfix when this parameter changes.\r\n#\r\n\u30e1\u30fc\u30eb\u306e\u53d7\u4fe1\u3092\u8a31\u53ef\u3059\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u8a2d\u5b9a\r\n#inet_interfaces = all\r\n\u2193\u3000#\u3092\u5916\u3057\u3066\u3001\u8a2d\u5b9a\u3092\u6709\u52b9\u306b\u3059\u308b\uff08\u81ea\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u306e\u30e1\u30fc\u30eb\u3060\u3051\u3092\u53d7\u4fe1\u3059\u308b\u5834\u5408\u306f\u8a2d\u5b9a\u3057\u306a\u3044\uff09\r\ninet_interfaces = all\r\n#inet_interfaces = $myhostname\r\n#inet_interfaces = $myhostname, localhost\r\ninet_interfaces = localhost\r\n\u2193\u3000\u884c\u982d\u306b#\u3092\u8ffd\u52a0\uff08\u81ea\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u306e\u30e1\u30fc\u30eb\u3060\u3051\u3092\u53d7\u4fe1\u3059\u308b\u5834\u5408\u306f\u8a2d\u5b9a\u3057\u306a\u3044\uff09\r\n#inet_interfaces = localhost\r\n# Specify a list of host or domain names, \/file\/name or type:table\r\n# patterns, separated by commas and\/or whitespace. A \/file\/name\r\n# pattern is replaced by its contents; a type:table is matched when\r\n# a name matches a lookup key (the right-hand side is ignored).\r\n# Continue long lines by starting the next line with whitespace.\r\n#\r\n# See also below, section \"REJECTING MAIL FOR UNKNOWN LOCAL USERS\".\r\n#\r\n\u53d7\u4fe1\u3057\u305f\u30e1\u30fc\u30eb\u3092\u62d2\u5426\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u8a2d\u5b9a\r\nmydestination = $myhostname, localhost.$mydomain, localhost\r\n\u2193\r\n#mydestination = $myhostname, localhost.$mydomain, localhost\u3000\u2190\u3000\u884c\u982d\u306b#\u3092\u8ffd\u52a0\r\n#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain\r\n\u2193\r\nmydestination = $myhostname, localhost.$mydomain, localhost, $mydomain\u3000\u2190\u3000#\u3092\u5916\u3059\r\n#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,\r\n#       mail.$mydomain, www.$mydomain, ftp.$mydomain\r\n# Specify \"mynetworks_style = host\" when Postfix should \"trust\"\r\n# only the local machine.\r\n#\r\n#mynetworks_style = class\r\n#mynetworks_style = subnet\r\n\u2193\r\nmynetworks_style = subnet\u3000\u2190\u3000#\u3092\u5916\u3059\r\n#mynetworks_style = host\r\n# You can also specify the absolute pathname of a pattern file instead\r\n# of listing the patterns here. Specify type:table for table-based lookups\r\n# (the value on the table right-hand side is not used).\r\n#\r\n\u5185\u90e8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u3068\u30ed\u30fc\u30ab\u30eb\u30db\u30b9\u30c8\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\r\n#mynetworks = 168.100.189.0\/28, 127.0.0.0\/8\r\n\u2193\r\nmynetworks = 192.168.1.0\/24, 127.0.0.0\/8\u3000\u2190\u3000#\u3092\u5916\u3057\u3066\u66f8\u304d\u63db\u3048\u308b\r\n#mynetworks = $config_directory\/mynetworks\r\n#mynetworks = hash:\/etc\/postfix\/network_table\r\n# NOTE: Postfix will not automatically forward mail for domains that\r\n# list this system as their primary or backup MX host. See the\r\n# permit_mx_backup restriction description in postconf(5).\r\n#\r\n#relay_domains = $mydestination\r\n\u2193\r\nrelay_domains = $mydestination\u3000\u2190\u3000#\u3092\u5916\u3059\r\n# DELIVERY TO MAILBOX\r\n#\r\n# The home_mailbox parameter specifies the optional pathname of a\r\n# mailbox file relative to a user's home directory. The default\r\n# mailbox file is \/var\/spool\/mail\/user or \/var\/mail\/user.  Specify\r\n# \"Maildir\/\" for qmail-style delivery (the \/ is required).\r\n#\r\n#home_mailbox = Mailbox\r\n#home_mailbox = Maildir\/\r\n\u2193\r\nhome_mailbox = Maildir\/\u3000\u2190\u3000#\u3092\u5916\u3057\u3066\u30e1\u30fc\u30eb\u30dc\u30c3\u30af\u30b9\u683c\u7d0d\u5f62\u5f0f\u3092Maildir\u5f62\u5f0f\u306b\u3059\u308b\r\nSMTP Auth\u3092\u6709\u52b9\u306b\u3059\u308b\u3002\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u7d42\u884c\u307e\u3067\u79fb\u52d5\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3092\u8ffd\u8a18\u3002\r\nsmtpd_sasl_auth_enable = yes\r\nsmtpd_sasl_local_domain = $myhostname\r\nsmtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination\r\n\u9001\u4fe1\u3059\u308b\u30e1\u30fc\u30eb\uff11\u901a\u5f53\u305f\u308a\u306e\u30b5\u30a4\u30ba\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306710MByte\u3001\r\n\u53d7\u4fe1\u3059\u308b\u30e1\u30fc\u30eb\u5408\u8a08\u306e\u7dcf\u5bb9\u91cf\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306750MByte\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3002\r\n\u305d\u308c\u305e\u308c5\u500d\u306e50MByte\u3068250MByte\u306b\u5909\u66f4\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u3092\u6700\u7d42\u884c\u3078\u8ffd\u52a0\u3002\r\nmessage_size_limit = 52428800\u3000\u2190\u30001024*1024*50=52428800\r\nmailbox_size_limit = 262144000\u3000\u2190\u30001024*1024*250=262144000\r\n\u5909\u66f4\u3092\u6709\u52b9\u306b\u3059\u308b\u70ba\u3001postfix\u3092\u518d\u8d77\u52d5\u3002\r\n[root@server ~]# \/etc\/rc.d\/init.d\/postfix reload\r\npostfix \u3092\u518d\u8aad\u307f\u8fbc\u307f\u4e2d:                                    [  OK  ]\r\n<\/pre>\n<p><b>\u25a0SMTP Auth\u8a2d\u5b9a<\/b><br \/>\nSMTP Auth\u3067\u306fCyrus SASL\u3068\u547c\u3070\u308c\u308b\u8a8d\u8a3c\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u3002 Postfix\u3067Cyrus SASL\u3092\u5229\u7528\u51fa\u6765\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<pre>\r\n[root@server1 ~]# vi \/etc\/sasl2\/smtpd.conf\u3000\u2190\u3000smtpd.conf\u3092\u958b\u304f\r\n\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u5f8c\u306b\u8ffd\u8a18\r\nmech_list: plain login cram-md5 digest-md5\r\nsaslauthd\u306e\u8d77\u52d5\r\n[root@server1 ~]# \/etc\/init.d\/saslauthd start\r\nsaslauthd \u3092\u8d77\u52d5\u4e2d:                                        [  OK  ]\r\nsaslauthd\u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a\r\n[root@server1 ~]# chkconfig saslauthd on\r\nsaslauthd\u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a\u78ba\u8a8d\r\n[root@server1 ~]# chkconfig --list saslauthd\r\nsaslauthd       0:off   1:off   2:on    3:on    4:on    5:on    6:off\r\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\uff08\u30e9\u30f3\u30ec\u30d9\u30eb2\uff5e5\u306eon\u3092\u78ba\u8a8d\uff09\r\n<\/pre>\n<p><b>\u25a0root\u5b9b\u30e1\u30fc\u30eb\u3092\u4e00\u822c\u30e6\u30fc\u30b6\uff08webmaster\uff09\u3078\u8ee2\u9001<\/b><br \/>\n\u30b7\u30b9\u30c6\u30e0\u304b\u3089root\u5b9b\u306b\u9001\u3089\u308c\u3066\u304f\u308b\u30e1\u30fc\u30eb\u3092\u3001\u4e00\u822c\u30e6\u30fc\u30b6\uff08webmaster\uff09\u3078\u8ee2\u9001\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre>\r\n\u7ba1\u7406\u8005\u30e6\u30fc\u30b6\u5b9b\u30e1\u30fc\u30eb\u306eroot\u5b9b\u8ee2\u9001\u8a2d\u5b9a\u3092\u89e3\u9664\r\n[root@server1 ~]# sed -i 's\/^webmaster\/#webmaster\/g' \/etc\/aliases\r\n\u7ba1\u7406\u8005\u30e6\u30fc\u30b6\u5b9b\u30e1\u30fc\u30eb\u306eroot\u5b9b\u8ee2\u9001\u8a2d\u5b9a\u89e3\u9664\u3092\u78ba\u8a8d\r\n[root@server1 ~]# grep ^webmaster \/etc\/aliases\u3000\u2190\u3000\u7d50\u679c\u304c\u306a\u306b\u3082\u8868\u793a\u3055\u308c\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d\r\nroot\u5b9b\u30e1\u30fc\u30eb\u3092\u7ba1\u7406\u8005\u30e6\u30fc\u30b6\uff08webmaster\uff09\u3078\u8ee2\u9001\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\r\n[root@server1 ~]# sed -i 's\/^root\/#root\/g' \/etc\/aliases\r\nroot\u5b9b\u30e1\u30fc\u30eb\u3092\u7ba1\u7406\u8005\u30e6\u30fc\u30b6\uff08webmaster\uff09\u3078\u8ee2\u9001\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\r\n[root@server1 ~]# echo \"root: webmaster\" &gt;&gt; \/etc\/aliases\r\nroot\u5b9b\u30e1\u30fc\u30eb\u304c\u7ba1\u7406\u8005\u30e6\u30fc\u30b6\uff08webmaster\uff09\u5b9b\u3078\u8ee2\u9001\u3055\u308c\u308b\u304b\u306e\u78ba\u8a8d\r\n[root@server1 ~]# grep ^root \/etc\/aliases\r\nroot: webmaster\u3000\u2190\u3000root\u5b9b\u30e1\u30fc\u30eb\u304c\u7ba1\u7406\u8005\u30e6\u30fc\u30b6\uff08webmaster\uff09\u3078\u8ee2\u9001\u3055\u308c\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\r\n\u8ee2\u9001\u5148\u3092\u53cd\u6620\u3055\u305b\u308b\r\n[root@server1 ~]# postalias \/etc\/aliases\r\n<\/pre>\n<p><b>\u25a0\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\uff08webmaster\uff09\u306e\u4f5c\u6210<\/b><br \/>\nwebmaster\u3078\u30e1\u30fc\u30eb\u304c\u5c4a\u304f\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u306f\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\uff08webmaster\uff09\u306e\u4f5c\u6210\u304c\u5fc5\u8981\u3002<\/p>\n<pre>\r\n\u4e00\u822c\u30e6\u30fc\u30b6(webmaster)\u3092\u8ffd\u52a0\u3002\r\n[root@server1 ~]# useradd webmaster\r\n\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u305f\u3081\u306b\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\r\n[root@server1 ~]# passwd webmaster\r\n\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5165\u529b\uff08\u5165\u529b\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u8868\u793a\u3055\u308c\u306a\u3044\uff09\r\n[root@server1 ~]# passwd webmaster\r\n\u30e6\u30fc\u30b6\u30fc webmaster \u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3002\r\n\u65b0\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9:\u3000\u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\r\n\u518d\u5165\u529b\u3092\u4fc3\u3055\u308c\u308b\u306e\u3067\u3001\u3082\u3046\u4e00\u5ea6\u5165\u529b\u3002(\u4e0a\u8a18\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u540c\u3058\u7269\u3092\u5165\u308c\u308b)\r\n\u65b0\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u518d\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044:\u3000\u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\r\npasswd: \u5168\u3066\u306e\u8a8d\u8a3c\u30c8\u30fc\u30af\u30f3\u304c\u6b63\u3057\u304f\u66f4\u65b0\u3067\u304d\u307e\u3057\u305f\u3002\r\n<\/pre>\n<p><b>\u25a0Postfix\u306e\u8d77\u52d5<\/b><\/p>\n<pre>\r\nPostfix\u306e\u8d77\u52d5\r\n[root@server1 ~]# \/etc\/rc.d\/init.d\/postfix restart\r\npostfix \u3092\u505c\u6b62\u4e2d:                                          [  OK  ]\r\npostfix \u3092\u8d77\u52d5\u4e2d:                                          [  OK  ]\r\n<\/pre>\n<p><b>\u25a0Postfix\u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<\/b><\/p>\n<pre>\r\nPostfix\u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a\r\n[root@server1 ~]# chkconfig postfix on\r\nPostfix\u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a\u78ba\u8a8d\r\n[root@server1 ~]# chkconfig --list postfix\r\npostfix         0:off   1:off   2:on    3:on    4:on    5:on    6:off\r\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\uff08\u30e9\u30f3\u30ec\u30d9\u30eb2\uff5e5\u306eon\u3092\u78ba\u8a8d\uff09\r\n<\/pre>\n<p><b>\u25a0sendmail\u30d1\u30b9\u306e\u78ba\u8a8d<\/b><br \/>\n\u63b2\u793a\u677f\u306a\u3069\u3067\u6295\u7a3f\u304c\u3042\u3063\u305f\u3089\u30e1\u30fc\u30eb\u901a\u77e5\u3059\u308b\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u308b\u6642\u306f CGI\u306esendmail\u30d1\u30b9\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u306a\u3044\u3068\u9001\u4fe1\u30a8\u30e9\u30fc\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308b\u3002<\/p>\n<pre>\r\n\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u3067sendmail\u30d1\u30b9\u306e\u78ba\u8a8d\u3092\u3059\u308b\r\n[root@server1 ~]# su - higo\r\n[higo@server1 ~]$ which sendmail\u3000\u2190\u3000sendmail\u30d1\u30b9\u306e\u78ba\u8a8d\r\n\/usr\/bin\/which: no sendmail in (\/usr\/kerberos\/bin:\/usr\/local\/bin:\/bin:\/usr\/bin:\/home\/higo\/bin)\r\nsendmail\u30d1\u30b9\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3068\u304d\u306f\r\n\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u3067\u3082sendmail\u30d1\u30b9\u304c\u307f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3002\r\n[higo@server1 ~]$ su -\u3000\u2190\u3000\u30eb\u30fc\u30c8\u306b\u306a\u308b\r\n\u30d1\u30b9\u30ef\u30fc\u30c9(P):\u3000\u2190\u3000\u30eb\u30fc\u30c8\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\r\n[root@server1 ~]# ln -s \/usr\/sbin\/sendmail \/usr\/bin\/sendmail\r\n[root@server1 ~]# su - higo\u3000\u2190\u3000\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u306b\u306a\u308b\r\n[higo@server1 ~]$ which sendmail\u3000\u2190\u3000sendmail\u30d1\u30b9\u306e\u78ba\u8a8d\r\n\/usr\/bin\/sendmail\r\n<\/pre>\n<p>joyful.cgi\u3067\u306fsendmail\u30d1\u30b9\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u300c\/usr\/lib\/sendmail\u300d\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u4e0a\u8a18\u3067\u78ba\u8a8d\u3057\u305fsendmail\u30d1\u30b9\u300c\/usr\/bin\/sendmail\u300d\u306b\u76f4\u3055\u306a\u3044\u3068\u6295\u7a3f\u6642\u306b\u9001\u4fe1\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002<\/p>\n<pre>\r\n# sendmail\u30d1\u30b9\uff08\u30e1\u30fc\u30eb\u901a\u77e5\u3059\u308b\u6642\uff09\r\n$sendmail = '\/usr\/lib\/sendmail';\r\n\u3000\u2193\r\n# sendmail\u30d1\u30b9\uff08\u30e1\u30fc\u30eb\u901a\u77e5\u3059\u308b\u6642\uff09\r\n$sendmail = '\/usr\/bin\/sendmail';\u3000\u2190\u3000lib\u3092bin\u306b\u5909\u66f4\r\n<\/pre>\n<p>root\u5b9b\u306e\u30e1\u30fc\u30eb\u3092\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u3078\u8ee2\u9001\u3057\u3066\u306a\u3044\u5834\u5408\u3001root\u306e\u30e1\u30fc\u30eb\u304c\u80a5\u5927\u5316\u3057\u3066\u3044\u304f\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3002\u305d\u3093\u306a\u6642\u306f\u624b\u52d5\u3067root\u5b9b\u306e\u30e1\u30fc\u30eb\u3092\u524a\u9664\u3059\u308b\u3002<br \/>\n\u30e1\u30fc\u30eb\u5bb9\u91cf\u3092\u78ba\u8a8d<\/p>\n<pre>\r\n[root@server1 ~]# ls -la \/var\/spool\/mail\/\r\n\u5408\u8a08 16\r\ndrwxrwxr-x.  2 root   mail 4096  1\u6708 17 18:41 2013 .\r\ndrwxr-xr-x. 14 root   root 4096  9\u6708 23 20:47 2011 ..\r\n-rw-rw----   1 clamav mail    0  9\u6708 30 22:44 2011 clamav\r\n-rw-rw----.  1 higo   mail    0  9\u6708 30 20:10 2011 higo\r\n-rw-------   1 root   mail 11710847  1\u6708 17 18:14 2013 root\r\n-rw-rw----.  1 rpc    mail    0  9\u6708 30 19:53 2011 rpc\r\nroot\u5b9b\u306e\u30e1\u30fc\u30eb\u3092\u524a\u9664\r\n[root@server1 ~]# cat \/dev\/null > \/var\/mail\/root\r\n\u518d\u5ea6\u30e1\u30fc\u30eb\u5bb9\u91cf\u3092\u78ba\u8a8d\r\n[root@server1 ~]# ls -la \/var\/spool\/mail\/\r\n\u5408\u8a08 8\r\ndrwxrwxr-x.  2 root   mail 4096  1\u6708 17 18:41 2013 .\r\ndrwxr-xr-x. 14 root   root 4096  9\u6708 23 20:47 2011 ..\r\n-rw-rw----   1 clamav mail    0  9\u6708 30 22:44 2011 clamav\r\n-rw-rw----.  1 higo   mail    0  9\u6708 30 20:10 2011 higo\r\n-rw-------   1 root   mail    0  1\u6708 17 19:45 2013 root\r\n-rw-rw----.  1 rpc    mail    0  9\u6708 30 19:53 2011 rpc\r\n<\/pre>\n<p>\u30b5\u30fc\u30d0\u30fc\u7ba1\u7406\u306e\u30ec\u30dd\u30fc\u30c8\u9001\u4fe1\u5148\u3092\u5909\u66f4<br \/>\n\u30d5\u30a1\u30a4\u30eb\u306e\u672b\u5c3e\u306e\u8a18\u8ff0\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63<\/p>\n<pre>\r\n[root@server1 ~]# vi \/etc\/aliases\r\n# Person who should get root's mail\r\n#root:\u3000\u3000\u3000\u3000\u3000marc\r\n\u3000\u2193\r\nroot:           ****@******.co.jp\u3000\u2190\u3000#\u3092\u5916\u3057\u3066\u9001\u4fe1\u5148\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u8a18\u8ff0\r\n\u8ee2\u9001\u5148\u3092\u53cd\u6620\u3055\u305b\u308b\r\n[root@server1 ~]# postalias \/etc\/aliases\r\n<\/pre>\n<p>\u203bSMTP\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u3046\u306b\u306f\u3001\u30eb\u30fc\u30bf\u30fc\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u306a\u306e\u306725\u756a\u306e\u30dd\u30fc\u30c8\u3092\u958b\u3051\u308b\u3002<br \/>\n<b>\u25a0\u3000\u30dd\u30fc\u30c8\u30c1\u30a7\u30c3\u30af\u3010\u30dd\u30fc\u30c8\u958b\u653e\u78ba\u8a8d\u3011<\/b><br \/>\n\u300c\u7ba1\u7406\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d0\u30fc\u304c\u5916\u90e8\u304b\u3089\u63a5\u7d9a\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u304b\uff1f\u300d\u300c\u30dd\u30fc\u30c8\u306f\u958b\u653e\u3055\u308c\u3066\u3044\u308b\u304b\uff1f\u300d\u300cport\u306f\u9589\u3058\u3066\u3044\u308b\u304b\uff1f\u300d\u300c\u30eb\u30fc\u30bf\u306e\u30dd\u30fc\u30c8\u306f\u958b\u653e\u3055\u308c\u3066\u3044\u308b\u304b\u300d\u7b49\u306e<br \/>\n<a href=\"http:\/\/www.cman.jp\/network\/support\/port.html\" target=\"_blank\">\u30dd\u30fc\u30c8\u30c1\u30a7\u30c3\u30af\u30fb\u30dd\u30fc\u30c8\u306e\u758e\u901a\u78ba\u8a8d\u30c6\u30b9\u30c8\u306f\u3053\u3061\u3089\u3067<\/a><br \/>\nPostfix\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3060\u3051\u3067\u306f\u3001\u30e1\u30fc\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306f\u51fa\u6765\u306a\u3044\u3002 Postfix\u306f\u30e1\u30fc\u30eb\u3092\u914d\u4fe1\u3059\u308b\u305f\u3081\u306eSMTP\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u306e\u6a5f\u80fd\u3057\u304b\u6301\u305f\u306a\u3044\u306e\u3067\u3001<a href=\"http:\/\/yokensaka.com\/centos\/index.php?catid=14&amp;blogid=1\" target=\"_blank\">dovecot\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a>\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001POP3\/IMAP4\u3069\u3061\u3089\u3067\u3082\u30e1\u30fc\u30eb\u3092\u8aad\u307f\u51fa\u305b\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<div align=right><a href=\"#\">\u25b2 \u30da\u30fc\u30b8\u30c8\u30c3\u30d7\u3078<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u307e\u305a\u30e1\u30fc\u30eb\u914d\u9001\u3092\u884c\u3046\u305f\u3081\u306eSMTP\u30b5\u30fc\u30d0\u30fc\u304c\u5fc5 &hellip; <a href=\"http:\/\/yokensaka.com\/centos\/?p=30\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-smtppostfix"],"_links":{"self":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=30"}],"version-history":[{"count":1,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":223,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions\/223"}],"wp:attachment":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}