戻る

前へ|| 次へ

0002 sendmail 起動停止 その1

起動停止 helpfile を 見る

前準備

色々見て行く理由ですが まず 練習ということで 現在の状況を 把握して おく、まず sendmail の場所を確認する、次に起動している条件も 見ておこう そうして 現在動作している sendmail を 停止する。

/*        sendmail の 在処         */
# which sendmail
/usr/sbin/sendmail

/*        sendmail.pid の 内容         */
# cat /var/run/sendmail.pid
86                            /* pid は 86 で この場合は動作している */
/usr/sbin/sendmail -bd -q15m  /* 起動条件が 示されている             */

/*   /etc/rc.d/rc.M で sendmail を 起動している 場所の 抜粋    */
/etc/rc.d/rc.M                /* 抜粋     /etc/rc.d/rc.M             */
# Start the sendmail daemon: 
if [ -x /usr/sbin/sendmail ]; then
  echo "Starting sendmail daemon (/usr/sbin/sendmail -bd -q15m)..."
  /usr/sbin/sendmail -bd -q15m
fi                            /* 抜粋   /etc/rc.d/rc.M               */
/*   sendmail を 停止    */
# ps ax | grep sendmail | grep -v grep
   86 ?        S      0:00 sendmail: accepting connections
# kill 86
# ps ax | grep sendmail | grep -v grep

sendmail を 停止して sendmail の場所を確認を した後 適当な場所に移動 して (これは 必須では 有りません 操作のやりかたを どっかで 行うと云 うことだけです 何処か 独立した場所で 色々 試験しようと 言う事だけで す)

$ pwd
/home/nyanco/v_work

sendmail -bt ルールテストモード

手動で ルールテストモード というのを 行ってみましょう 単に 起動停止と help message を 見るだけ こういうものが あると云う事です

練習 0001

まず 始動と 停止 つまり 有るモードの 開始と 終了を 行う場合

$ /usr/sbin/sendmail -bt  /* ルールテストモード の 開始   */
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
>                              /* 待機状態                     */
> /quit                        /* ルールテストモード の 終了   */

これで 始動し 最後に ” /quit”にて 停止出来ます。

練習 0002

簡単な試験内容は といっても help message を 見るだけです

$ /usr/sbin/sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> ? /*  ? を タイプして Enter キーを押す */
Help for test mode:
?                :this help message.
.Dmvalue         :define macro `m' to `value'.
.Ccvalue         :add `value' to class `c'.
=Sruleset        :dump the contents of the indicated ruleset.
=M               :display the known mailers.
-ddebug-spec     :equivalent to the command-line -d debug flag.
$m               :print the value of macro $m.
$=c              :print the contents of class $=c.
/mx host         :returns the MX records for `host'.
/parse address   :parse address, returning the value of crackaddr, and
                  the parsed address.
/try mailer addr :rewrite address into the form it will have when
                  presented to the indicated mailer.
/tryflags flags  :set flags used by parsing.  The flags can be `H' for
                  Header or `E' for Envelope, and `S' for Sender or `R'
                  for Recipient.  These can be combined, `HR' sets
                  flags for header recipients.
/canon hostname  :try to canonify hostname.
/map mapname key :look up `key' in the indicated `mapname'.
/quit            :quit address test mode.
rules addr       :run the indicated address through the named rules.
                  Rules can be a comma separated list of rules.
End of HELP info
> /quit

これは ”/etc/mail/helpfile”に 有ると云うことでそれを 見てみましょう

$ cat /etc/mail/helpfile 
#vers   2
cpyr
cpyr    Copyright (c) 1998-2000, 2002 Sendmail, Inc. and its suppliers.
cpyr        All rights reserved.
cpyr    Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
cpyr    Copyright (c) 1988, 1993
cpyr        The Regents of the University of California.  All rights reserved.
cpyr
cpyr
cpyr    By using this file, you agree to the terms and conditions set
cpyr    forth in the LICENSE file which can be found at the top level of
cpyr    the sendmail distribution.
cpyr
cpyr    $$Id: helpfile,v 8.40 2002/03/19 00:23:28 gshapiro Exp $$
cpyr
smtp    This is sendmail version $v
smtp    Topics:
smtp            HELO    EHLO    MAIL    RCPT    DATA
smtp            RSET    NOOP    QUIT    HELP    VRFY
smtp            EXPN    VERB    ETRN    DSN     AUTH
smtp            STARTTLS
smtp    For more info use "HELP <topic>".
smtp    To report bugs in the implementation send email to
smtp            sendmail-bugs@sendmail.org.
smtp    For local information send email to Postmaster at your site.
help    HELP [ <topic> ]
help            The HELP command gives help info.
helo    HELO <hostname>
helo            Introduce yourself.
ehlo    EHLO <hostname>
ehlo            Introduce yourself, and request extended SMTP mode.
ehlo    Possible replies include:
ehlo            SEND            Send as mail                    [RFC821]
ehlo            SOML            Send as mail or terminal        [RFC821]
ehlo            SAML            Send as mail and terminal       [RFC821]
ehlo            EXPN            Expand the mailing list         [RFC821]
ehlo            HELP            Supply helpful information      [RFC821]
ehlo            TURN            Turn the operation around       [RFC821]
ehlo            8BITMIME        Use 8-bit data                  [RFC1652]
ehlo            SIZE            Message size declaration        [RFC1870]
ehlo            VERB            Verbose                         [Allman]
ehlo            CHUNKING        Chunking                        [RFC1830]
ehlo            BINARYMIME      Binary MIME                     [RFC1830]
ehlo            PIPELINING      Command Pipelining              [RFC1854]
ehlo            DSN             Delivery Status Notification    [RFC1891]
ehlo            ETRN            Remote Message Queue Starting   [RFC1985]
ehlo            STARTTLS        Secure SMTP                     [RFC2487]
ehlo            AUTH            Authentication                  [RFC2554]
ehlo            ENHANCEDSTATUSCODES     Enhanced status codes   [RFC2034]
ehlo            DELIVERBY       Deliver By                      [RFC2852]
mail    MAIL FROM: <sender> [ <parameters> ]
mail            Specifies the sender.  Parameters are ESMTP extensions.
mail            See "HELP DSN" for details.
rcpt    RCPT TO: <recipient> [ <parameters> ]
rcpt            Specifies the recipient.  Can be used any number of times.
rcpt            Parameters are ESMTP extensions.  See "HELP DSN" for details.
data    DATA
data            Following text is collected as the message.
data            End with a single dot.
rset    RSET
rset            Resets the system.
quit    QUIT
quit            Exit sendmail (SMTP).
auth    AUTH mechanism [initial-response]
auth            Start authentication.
starttls        STARTTLS
starttls                Start TLS negotiation.
verb    VERB
verb            Go into verbose mode.  This sends 0xy responses that are
verb            not RFC821 standard (but should be)  They are recognized
verb            by humans and other sendmail implementations.
vrfy    VRFY <recipient>
vrfy            Verify an address.  If you want to see what it aliases
vrfy            to, use EXPN instead.
expn    EXPN <recipient>
expn            Expand an address.  If the address indicates a mailing
expn            list, return the contents of that list.
noop    NOOP
noop            Do nothing.
send    SEND FROM: <sender>
send            replaces the MAIL command, and can be used to send
send            directly to a users terminal.  Not supported in this
send            implementation.
soml    SOML FROM: <sender>
soml            Send or mail.  If the user is logged in, send directly,
soml            otherwise mail.  Not supported in this implementation.
saml    SAML FROM: <sender>
saml            Send and mail.  Send directly to the user's terminal,
saml            and also mail a letter.  Not supported in this
saml            implementation.
turn    TURN
turn            Reverses the direction of the connection.  Not currently
turn            implemented.
etrn    ETRN [ <hostname> | @<domain> | #<queuename> ]
etrn            Run the queue for the specified <hostname>, or
etrn            all hosts within a given <domain>, or a specially-named
etrn            <queuename> (implementation-specific).
dsn     MAIL FROM: <sender> [ RET={ FULL | HDRS} ] [ ENVID=<envid> ]
dsn     RCPT TO: <recipient> [ NOTIFY={NEVER,SUCCESS,FAILURE,DELAY} ]
dsn                          [ ORCPT=<recipient> ]
dsn             SMTP Delivery Status Notifications.
dsn     Descriptions:
dsn             RET     Return either the full message or only headers.
dsn             ENVID   Sender's "envelope identifier" for tracking.
dsn             NOTIFY  When to send a DSN. Multiple options are OK, comma-
dsn                     delimited. NEVER must appear by itself.
dsn             ORCPT   Original recipient.
-bt     Help for test mode:
-bt     ?                :this help message.
-bt     .Dmvalue         :define macro `m' to `value'.
-bt     .Ccvalue         :add `value' to class `c'.
-bt     =Sruleset        :dump the contents of the indicated ruleset.
-bt     =M               :display the known mailers.
-bt     -ddebug-spec     :equivalent to the command-line -d debug flag.
-bt     $$m              :print the value of macro $$m.
-bt     $$=c             :print the contents of class $$=c.
-bt     /mx host         :returns the MX records for `host'.
-bt     /parse address   :parse address, returning the value of crackaddr, and
-bt                       the parsed address.
-bt     /try mailer addr :rewrite address into the form it will have when
-bt                       presented to the indicated mailer.
-bt     /tryflags flags  :set flags used by parsing.  The flags can be `H' for
-bt                       Header or `E' for Envelope, and `S' for Sender or `R'
-bt                       for Recipient.  These can be combined, `HR' sets
-bt                       flags for header recipients.
-bt     /canon hostname  :try to canonify hostname.
-bt     /map mapname key :look up `key' in the indicated `mapname'.
-bt     /quit            :quit address test mode.
-bt     rules addr       :run the indicated address through the named rules.
-bt                       Rules can be a comma separated list of rules.
control Help for smcontrol:
control help            This message.
control restart         Restart sendmail.
control shutdown        Shutdown sendmail.
control status          Show sendmail status.
control memdump         Dump allocated memory list (for debugging only).

当然今は ちんぷんかんぷん です これは 最初なので しかた おへん。


前へ|| 次へ

戻る

にゃんたろう 拝!
2006年 9月14日 (木) 22:48:27 JST 作成

Copyright © 2004.-2007. nyantarou All Rights Reserved.