{"id":264,"date":"2012-02-17T18:13:17","date_gmt":"2012-02-17T09:13:17","guid":{"rendered":"http:\/\/kaz.it-n.jp\/wordpress\/?page_id=264"},"modified":"2012-02-17T18:13:17","modified_gmt":"2012-02-17T09:13:17","slug":"postfix-%e3%81%ae%e8%b5%b7%e5%8b%95%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88","status":"publish","type":"page","link":"https:\/\/kaz.it-n.jp\/?page_id=264","title":{"rendered":"Postfix \u306e\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"<p>#!\/bin\/bash<br \/>\n#<br \/>\n# postfix      Postfix Mail Transfer Agent<br \/>\n#<br \/>\n# chkconfig: 2345 80 30<br \/>\n# description: Postfix is a Mail Transport Agent, which is the program \\<br \/>\n#              that moves mail from one machine to another.<br \/>\n# processname: master<br \/>\n# pidfile: \/var\/spool\/postfix\/pid\/master.pid<br \/>\n# config: \/etc\/postfix\/main.cf<br \/>\n# config: \/etc\/postfix\/master.cf<br \/>\n#<br \/>\n# Based on startup script from Simon J Mudd <sjmudd@pobox.com><br \/>\n# 25\/02\/99: Mostly s\/sendmail\/postfix\/g by John A. Martin <jam@jamux.com><br \/>\n# 23\/11\/00: Changes &#038; suggestions by Ajay Ramaswamy <ajayr@bigfoot.com><br \/>\n# 20\/01\/01: Changes to fall in line with RedHat 7.0 style<br \/>\n# 23\/02\/01: Fix a few untidy problems with help from Daniel Roesen.<\/p>\n<p># Source function library.<br \/>\n. \/etc\/rc.d\/init.d\/functions<\/p>\n<p># Source networking configuration.<br \/>\n. \/etc\/sysconfig\/network<\/p>\n<p># Check that networking is up.<br \/>\n[ ${NETWORKING} = &#8220;no&#8221; ] &#038;&#038; exit 0<\/p>\n<p>[ -x \/usr\/sbin\/postfix ] || exit 0<br \/>\n[ -d \/etc\/postfix ] || exit 0<br \/>\n[ -d \/var\/spool\/postfix ] || exit 0<\/p>\n<p>RETVAL=0<br \/>\nprog=&#8221;postfix&#8221;<\/p>\n<p>start() {<br \/>\n        # Start daemons.<br \/>\n        echo -n $&#8221;Starting postfix: &#8221;<br \/>\n        \/usr\/bin\/newaliases >\/dev\/null 2>&#038;1<br \/>\n        \/usr\/sbin\/postfix start 2>\/dev\/null 1>&#038;2 &#038;&#038; success || failure $&#8221;$prog start&#8221;<br \/>\n        RETVAL=$?<br \/>\n        [ $RETVAL -eq 0 ] &#038;&#038; touch \/var\/lock\/subsys\/postfix<br \/>\n        echo<br \/>\n        return $RETVAL<br \/>\n}<\/p>\n<p>stop() {<br \/>\n        # Stop daemons.<br \/>\n        echo -n $&#8221;Shutting down postfix: &#8221;<br \/>\n        \/usr\/sbin\/postfix stop 2>\/dev\/null 1>&#038;2 &#038;&#038; success || failure $&#8221;$prog stop&#8221;<br \/>\n        RETVAL=$?<br \/>\n        [ $RETVAL -eq 0 ] &#038;&#038; rm -f \/var\/lock\/subsys\/postfix<br \/>\n        echo<br \/>\n        return $RETVAL<br \/>\n}<\/p>\n<p>reload() {<br \/>\n        echo -n $&#8221;Reloading postfix: &#8221;<br \/>\n        \/usr\/sbin\/postfix reload 2>\/dev\/null 1>&#038;2 &#038;&#038; success || failure $&#8221;$prog reload&#8221;<br \/>\n        RETVAL=$?<br \/>\n        echo<br \/>\n        return $RETVAL<br \/>\n}<\/p>\n<p>abort() {<br \/>\n        \/usr\/sbin\/postfix abort 2>\/dev\/null 1>&#038;2 &#038;&#038; success || failure $&#8221;$prog abort&#8221;<br \/>\n        return $?<br \/>\n}<\/p>\n<p>flush() {<br \/>\n        \/usr\/sbin\/postfix flush 2>\/dev\/null 1>&#038;2 &#038;&#038; success || failure $&#8221;$prog flush&#8221;<br \/>\n        return $?<br \/>\n}<\/p>\n<p>check() {<br \/>\n        \/usr\/sbin\/postfix check 2>\/dev\/null 1>&#038;2 &#038;&#038; success || failure $&#8221;$prog check&#8221;<br \/>\n        return $?<br \/>\n}<\/p>\n<p>restart() {<br \/>\n        stop<br \/>\n        start<br \/>\n}<\/p>\n<p># See how we were called.<br \/>\ncase &#8220;$1&#8243; in<br \/>\n  start)<br \/>\n        start<br \/>\n        ;;<br \/>\n  stop)<br \/>\n        stop<br \/>\n        ;;<br \/>\n  restart)<br \/>\n        stop<br \/>\n        start<br \/>\n        ;;<br \/>\n  reload)<br \/>\n        reload<br \/>\n        ;;<br \/>\n  abort)<br \/>\n        abort<br \/>\n        ;;<br \/>\n  flush)<br \/>\n        flush<br \/>\n        ;;<br \/>\n  check)<br \/>\n        check<br \/>\n        ;;<br \/>\n  status)<br \/>\n        status master<br \/>\n        ;;<br \/>\n  condrestart)<br \/>\n        [ -f \/var\/lock\/subsys\/postfix ] &#038;&#038; restart || :<br \/>\n        ;;<br \/>\n  *)<br \/>\n        echo $&#8221;Usage: $0 {start|stop|restart|reload|abort|flush|check|status|condrestart}&#8221;<br \/>\n        exit 1<br \/>\nesac<\/p>\n<p>exit $?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/bash # # postfix Postfix Mail Transfer Agent # # chkconfig: 2345 80 30 # description: Postfix is a Mail &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/kaz.it-n.jp\/?page_id=264\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Postfix \u306e\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":205,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-264","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/kaz.it-n.jp\/index.php?rest_route=\/wp\/v2\/pages\/264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kaz.it-n.jp\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kaz.it-n.jp\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kaz.it-n.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kaz.it-n.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=264"}],"version-history":[{"count":0,"href":"https:\/\/kaz.it-n.jp\/index.php?rest_route=\/wp\/v2\/pages\/264\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/kaz.it-n.jp\/index.php?rest_route=\/wp\/v2\/pages\/205"}],"wp:attachment":[{"href":"https:\/\/kaz.it-n.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}