Oracle Solaris 11.1 sendmail : E36535 02 2012 10
Copyright 2002, 2012, Oracle and/or its affiliates. All rights reserved.,,,,,,,,,,,,,.,..., U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.., -,,. Oracle Corporation. Oracle Java Oracle Corporation /. Intel Intel Xeon Intel Corporation SPARC SPARC International, Inc. AMD, Opteron, AMD, AMD Opteron Advanced Micro Devices UNIX The Open Group ( )3, Oracle Corporation 3,. Oracle Corporation 3,,. 121210@25097
...13 1 ()...15... 15... 16... 16 sendmail... 17... 17... 17... 18 2 ()...21... 21... 22... 23... 24 ( )... 25... 25... 26... 27... 29... 31 sendmail DNS... 32 sendmail ( )... 33 sendmail... 33 sendmail.cf... 34... 35 3
... 35 sendmail... 36 TLS SMTP... 37 sendmail.cf... 41 ( )... 42... 43 NIS mail.aliases...43... 44... 46 postmaster... 46 ( )... 48... 49 /var/spool/mqueue... 49 /var/spool/mqueue... 50 /var/spool/mqueue... 50 /var/spool/mqueue... 51 /var/spool/omqueue... 51.forward ( )... 52.forward... 52.forward... 52.forward... 53 /etc/shells... 54 ( )... 54... 55... 55... 56 sendmail... 56... 57... 58... 59... 59 3 ()...63 Oracle Solaris sendmail... 64 sendmail... 64 4 Oracle Solaris 11.1 sendmail 2012 10
MILTER, sendmail API... 65 sendmail... 66... 66... 67... 67... 74... 76 vacation... 77 /usr/bin... 77 /etc/mail... 78 /etc/mail/cf... 79 /usr/lib... 81... 82... 83 sendmail... 84... 87.forward... 90 /etc/default/sendmail... 91... 92 sendmail... 93 sendmail.cf... 93 sendmail... 94 NIS sendmail... 95 sendmail NIS DNS... 96 sendmail 8.14... 96 sendmail 8.13... 97 sendmail 8.13 TLS SMTP... 97 sendmail 8.13... 102 sendmail 8.13... 102 sendmail 8.13 FEATURE()... 104 sendmail 8.12... 105 sendmail 8.12 TCP... 105 sendmail 8.12 submit.cf... 106 sendmail 8.12... 107 sendmail 8.12 PidFile ProcessTitlePrefix... 108 sendmail 8.12... 109 5
sendmail 8.12... 110 sendmail 8.12 MAX... 110 sendmail 8.12 m4... 111 sendmail 8.12 FEATURE()... 111 sendmail 8.12 MAILER()... 114 sendmail 8.12... 115 sendmail 8.12... 115 sendmail 8.12... 116 sendmail 8.12 LDAP... 117 sendmail 8.12... 118 sendmail 8.12... 118 sendmail 8.12... 119 sendmail 8.12 IPv6... 120... 121 6 Oracle Solaris 11.1 sendmail 2012 10
1 1... 19 2 1... 23 2 2 UUCP... 24 3 1... 76 3 2... 83 7
8
3 1 sendmail... 64 3 2... 64 3 3 OS... 65 3 4 sendmail... 65 3 5 sendmail... 66 3 6... 66 3 7... 70 3 8... 72 3 9 /etc/mail/cf... 79 3 10 /usr/lib... 81 3 11... 82 3 12 TLS SMTP... 99 3 13 TLS SMTP...101 3 14 TLS SMTP...101 3 15 8.13 sendmail...102 3 16 8.13 sendmail...103 3 17 sendmail 8.13 FEATURE()...104 3 18 sendmail 8.12...107 3 19 PidFile ProcessTitlePrefix...108 3 20 sendmail...109 3 21 sendmail...110 3 22 MAX... 110 3 23 sendmail m4...111 3 24 FEATURE()...112 3 25 FEATURE()...114 3 26...115 3 27...116 3 28...117 9
3 29 LDAP...118 3 30...118 3 31...118 10 Oracle Solaris 11.1 sendmail 2012 10
2 1 submit.cf... 36 2 2 Received:... 41 2 3... 57 11
12
Oracle Solaris 11.1 sendmail Oracle Solaris Oracle Solaris Oracle Solaris SPARC x86 Oracle Solaris OS: Oracle Solaris. UNIX 1~2. UNIX. Oracle Support Oracle My Oracle Support. http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info, http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs 13
P 1 AaBbCc123 AaBbCc123 AaBbCc123,,,.login ls -a machine_name% you have mail. machine_name% su Password: rm filename AaBbCc123,, 6. : Oracle Solaris OS UNIX. Oracle Solaris. P 2 Bash, Korn Bourne $ Bash, Korn Bourne # C C machine_name% machine_name# 14 Oracle Solaris 11.1 sendmail 2012 10
1 (). sendmail. 15 17 sendmail 17 2, () 21 3, (),, sendmailsendmail 8.13 97 sendmail 8.13 Oracle Solaris 15
Oracle Solaris 11. sendmail8.14.5 (svc:/network/smtp:sendmail ) (svc:/network/smtp:sendmail-client ) sendmail sendmail.cf submit.mc. 35. sendmail SMTP, cron Become Local( ) -bl sendmail(1m) -bd Become Daemon( ) 36 sendmail makemap -t -u -u -t -u -t makemap(1m) sendmail TLS( ) SMTP 97 sendmail 8.13 TLS SMTP 37 TLS SMTP sendmail 8.13 8.13 64 sendmail 65 MILTER, sendmail API 66 77 vacation 79 /etc/mail/cf 97 sendmail 8.13 105 sendmail 8.12 TCP 16 Oracle Solaris 11.1 sendmail 2012 10
svcadm,,. svcs. smf(5) Oracle Solaris 11.1 1, () sendmail sendmail Costales, Bryan. sendmail, Third Edition. O'Reilly & Associates, Inc., 2002. sendmail http://www.sendmail.org sendmail FAQ http://www.sendmail.org/faq sendmail README http://www.sendmail.org/m4/readme.html sendmail http://www.sendmail.org/vendor/sun/ 17 18 67.forward 1 () 17
sendmail. - 1 - -. 1 1 18 Oracle Solaris 11.1 sendmail 2012 10
1 1 74 1 () 19
20
2 2 () 1, () 1 1. 21 25 ( ) 33 sendmail ( ) 42 ( ) 48 ( ) 52.forward ( ) 54 ( ) 3, (),, sendmail, sendmail(1m) sendmail 8.13.,,. sendmail DNS. 25 ( ) 21
sendmail NIS,,. 33 sendmail ( ) 42 ( ).. 48 ( ).forward.forward.forward /etc/shells.forward.,, sendmail,,. 52.forward ( ) 54 ( ) 59,. 23, 24, 22 Oracle Solaris 11.1 sendmail 2012 10
. aliases.. NIS. 42 ( ). 52.forward ( ).forward. 25 ( ) 21 2 1. /etc/mail/aliases 2 1 /etc/mail/sendmail.cf 2 () 23
. NIS mailhost.domain-name /etc/hosts.dns LDAP /etc/hosts. 29 NIS /etc/mail/aliases /var/mail 25 25 ( ) 2 2., /etc/mail/aliases. 2 2 UUCP /var/mail. /etc/mail/sendmail.cf.. 24 Oracle Solaris 11.1 sendmail 2012 10
. NIS mailhost.domain-name /etc/hosts.dns LDAP /etc/hosts. 29 NIS /etc/mail/aliases /var/mail 25 25 ( ) ( ) sendmail DNS DNS 26 27 29 31 32 sendmail DNS. 23 2 1 18 1 1 24 2 2 2 () 25
. NFS /var/mail... ~/.forward. 74 3, ().. mail.local /var/mail.. /var/mail. POP(Post Office Protocol) IMAP(Internet Message Access Protocol). /var/mail POP IMAP. /var/mail /etc/dfs/dfstab. 1 2 3 Oracle Solaris 11.1 : sendmail # svcadm disable -t network/smtp:sendmail /var/mail # share /var/mail 5 26 Oracle Solaris 11.1 sendmail 2012 10
/var/mail a. () NFS Oracle Solaris 11.1 /var/mail NFS b. () /var/mail /etc/dfs/dfstab /etc/dfs/dfstab share -F nfs -o rw /var/mail 4 5. # shareall a. () NIS # ypwhich ypwhich(1) b. () DNS # nslookup hostname hostname nslookup(1m) c. ()LDAP # ldaplist ldaplist(1) 6 sendmail # svcadm enable network/smtp:sendmail /etc/mail/aliases. 2 () 27
POP(Post Office Protocol) IMAP(Internet Message Access Protocol). POP IMAP. 1 2 3 4 5 Oracle Solaris 11.1 : sendmail # svcadm disable -t network/smtp:sendmail /var/mail. ls. # ls -l /var/mail /var/mail not found /var/mail /var/mail. /var/mail. a. () /var/mail /etc/auto_direct /var/mail -rw,hard,actimeo=0 server:/var/mail server b. () /var/mail /etc/vfstab /var/mail /var/mail server:/var/mail - /var/mail nfs - no rw,hard,actimeo=0 # mountall 28 Oracle Solaris 11.1 sendmail 2012 10
NFS actimeo=0. 6 7 8 /etc/hosts /etc/hosts. # cat /etc/hosts # # Internet host table #.. IP-address mailhost mailhost mailhost.example.com IP-address IP example.com mailhost hosts(4) 42 ( ) mail.local /var/mail.. sendmail # svcadm enable network/smtp:sendmail 1 2 Oracle Solaris 11.1 : sendmail # svcadm disable -t network/smtp:sendmail 2 () 29
3 4 host-name check-hostname sendmail % /usr/sbin/check-hostname hostname phoenix OK: fully qualified as phoenix.example.com /etc/hosts. /etc/hosts a. () NIS /etc/hosts IP mailhost mailhost.domain IP-address mailhost mailhost mailhost.domain loghost IP-address IP mailhost domain domain. % /usr/lib/sendmail -bt -d0 </dev/null Version 8.13.1+Sun Compiled with: LDAPMAP MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS NISPLUS QUEUE SCANF SMTP USERDB XDEBUG ============ SYSTEM IDENTITY (after readcf) ============ (short domain name) $w = phoenix (canonical domain name) $j = phoenix.example.com (subdomain name) $m = example.com (node name) $k = phoenix ======================================================== hosts # cat /etc/hosts # # Internet host table # 172.31.255.255 localhost 192.168.255.255 phoenix mailhost mailhost.example.com loghost 30 Oracle Solaris 11.1 sendmail 2012 10
b. () NIS /etc/hosts. IP-address mailhost mailhost mailhost.domain loghost 5 6 sendmail # svcadm enable network/smtp:sendmail 55 74 3, ().... UUCP(UNIX-to-UNIX Copy Program) UUCP. 1 2 3 Oracle Solaris 11.1 : sendmail # svcadm disable -t network/smtp:sendmail host-name check-hostname sendmail # /usr/sbin/check-hostname hostname phoenix OK: fully qualified as phoenix.example.com /etc/hosts. 29 4 2 () 31
4 a. () NIS # ypwhich ypwhich(1) b. () DNS # nslookup hostname hostname nslookup(1m) c. ()LDAP # ldaplist ldaplist(1) 5 6 sendmail # svcadm enable network/smtp:sendmail 55 74 3, () 1 sendmail DNS DNS. MX( ) CNAME DNS,. sendmail DNS 93 sendmail 3, () Oracle Solaris Administration: Naming and Directory Services Oracle Solaris 11.1 : 32 Oracle Solaris 11.1 sendmail 2012 10
sendmail 2 mailhost mailhost.domain nslookup DNS mailhost mailhost.domain nslookup(1m) sendmail ( ) sendmail sendmail.cf 34 sendmail.cf sendmail sendmail TLS( ) SMTP sendmail sendmail.cf submit.mc sendmail sendmail SMTP TLS. 35 35 36 sendmail 37 TLS SMTP 41 sendmail.cf sendmail 34 sendmail.cf sendmail.cf. /etc/mail/cf/readme. http://www.sendmail.org sendmail. 66 86 sendmail 3, () 111 sendmail 8.12 m4 2 () 33
sendmail sendmail.cf /usr/lib/mail/cf/main-v7sun.mc /etc/mail/cf/cf/sendmail.mc. 1 2 3 4 5 6 7 Oracle Solaris 11.1 : sendmail # svcadm disable -t network/smtp:sendmail. # cd /etc/mail/cf/cf # cp sendmail.mc myhost.mc myhost.mc ( : myhost.mc), # cat myhost.mc.. MASQUERADE_AS( host.domain ) host.domain MASQUERADE_AS $j host.domain. m4 # make myhost.cf -C # /usr/lib/sendmail -C myhost.cf -v testaddr </dev/null testaddr. sendmail. 55 # cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.save # cp myhost.cf /etc/mail/sendmail.cf 34 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8 sendmail # svcadm enable network/smtp:sendmail IP http://www.sendmail.org/tips/ virtualhosting sendmail. Sendmail Configuration(Sendmail ) 3b. # cd sendmail-version/cf/cf #./Build mailserver.cf # cp mailserver.cf /etc/mail/sendmail.cf Oracle Solaris # cd /etc/mail/cf/cf # make mailserver.cf # cp mailserver.cf /etc/mail/sendmail.cf mailserver.cf 33 sendmail /etc/mail/sendmail.cf. 1 sendmail.cf submit.cf. sendmail.cf sendmail submit.cf 2 1. Oracle Solaris 11.1 : 2 sendmail # svccfg -s sendmail svc:/network/smtp:sendmail> setprop config/path_to_sendmail_mc=/etc/mail/cf/cf/myhost.mc svc:/network/smtp:sendmail> quit 2 () 35
sendmail 3 2 1 sendmail sendmail # svcadm refresh svc:/network/smtp:sendmail # svcadm restart svc:/network/smtp:sendmail submit.cf submit.mc sendmail # svccfg -s sendmail-client:default svc:/network/smtp:sendmail> setprop config/path_to_submit_mc=/etc/mail/cf/cf/submit-myhost.mc svc:/network/smtp:sendmail> exit # svcadm refresh svc:/network/sendmail-client # svcadm restart svc:/network/sendmail-client sendmail sendmail ( ). sendmail. 1 2 3 Oracle Solaris 11.1 : sendmail # svccfg -s sendmail svc:/network/smtp:sendmail> setprop config/local_only = false svc:/network/smtp:sendmail> quit sendmail # svcadm refresh svc:/network/smtp:sendmail # svcadm restart svc:/network/smtp:sendmail 36 Oracle Solaris 11.1 sendmail 2012 10
sendmail TLS SMTP SMTP 8.13 sendmail TLS( ). SMTP,. sendmail TLS 97 sendmail 8.13 TLS SMTP 1 2 3 Oracle Solaris 11.1 : sendmail # svcadm disable -t network/smtp:sendmail sendmail TLS a. # cd /etc/mail # mkdir -p certs/ca # cd certs/ca # mkdir certs crl newcerts private # echo "01" > serial # cp /dev/null index.txt # cp /etc/openssl/openssl.cnf. b. openssl.cnf dir /etc/openssl /etc/mail/certs/ca c. openssl TLS # openssl req -new -x509 -keyout private/cakey.pem -out cacert.pem -days 365 \ -config openssl.cnf Generating a 1024 bit RSA private key...++++++...++++++ writing new private key to private/cakey.pem Enter PEM pass phrase: Verifying - Enter PEM pass phrase: ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, 2 () 37
sendmail If you enter., the field will be left blank. ----- Country Name (2 letter code) []:US State or Province Name (full name) []:California Locality Name (eg, city) []:Menlo Park Organization Name (eg, company) [Unconfigured OpenSSL Installation]:Oracle Organizational Unit Name (eg, section) []:Solaris Common Name (eg, YOUR name) []:somehost.somedomain.example.com Email Address []:someuser@example.com req -new req -x509 req. -keyout private/cakey.pem req private/cakey.pem. -out cacert.pem req cacert.pem. -days 365 req 365. 30. -config openssl.cnf req openssl.cnf.. Country Name( : US) State or Province Name( : California) Locality Name( : Menlo Park) Organization Name( Oracle) Organizational Unit Name( : Solaris) Common Name( ) check-hostname(1m) Email Address( : someuser@example.com) 4 () a.. # cd /etc/mail/certs/ca # openssl req -nodes -new -x509 -keyout newreq.pem -out newreq.pem -days 365 \ -config openssl.cnf Generating a 1024 bit RSA private key...++++++...++++++ 38 Oracle Solaris 11.1 sendmail 2012 10
sendmail writing new private key to newreq.pem ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter., the field will be left blank. ----- Country Name (2 letter code) []:US State or Province Name (full name) []:California Locality Name (eg, city) []:Menlo Park Organization Name (eg, company) [Unconfigured OpenSSL Installation]:Oracle Organizational Unit Name (eg, section) []:Solaris Common Name (eg, YOUR name) []:somehost.somedomain.example.com Email Address []:someuser@example.com 3c. newreq.pem. b. # cd /etc/mail/certs/ca # openssl x509 -x509toreq -in newreq.pem -signkey newreq.pem -out tmp.pem Getting request Private Key Generating certificate request # openssl ca -config openssl.cnf -policy policy_anything -out newcert.pem -infiles tmp.pem Using configuration from openssl.cnf Enter pass phrase for /etc/mail/certs/ca/private/cakey.pem: Check that the request matches the signature Signature ok Certificate Details: Serial Number: 1 (0x1) Validity Not Before: Jun 23 18:44:38 2005 GMT Not After : Jun 23 18:44:38 2006 GMT Subject: countryname = US stateorprovincename = California localityname = Menlo Park organizationname = Oracle organizationalunitname = Solaris commonname = somehost.somedomain.example.com emailaddress = someuser@example.com X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: 93:D4:1F:C3:36:50:C5:97:D7:5E:01:E4:E3:4B:5D:0B:1F:96:9C:E2 X509v3 Authority Key Identifier: keyid:99:47:f7:17:cf:52:2a:74:a2:c0:13:38:20:6b:f1:b3:89:84:cc:68 DirName:/C=US/ST=California/L=Menlo Park/O=Oracle/OU=Solaris/\ CN=someuser@example.com/emailAddress=someuser@example.com serial:00 2 () 39
sendmail Certificate is to be certified until Jun 23 18:44:38 2006 GMT (365 days) Sign the certificate? [y/n]:y 1 out of 1 certificate requests certified, commit? [y/n]y Write out database with 1 new entries Data Base Updated # rm -f tmp.pem newreq.pem. newcert.pem. x509 ca CRL( ) 5 6 7 8 9.mc sendmail. define( confcacert_path, /etc/mail/certs )dnl define( confcacert, /etc/mail/certs/cacert.pem )dnl define( confserver_cert, /etc/mail/certs/mycert.pem )dnl define( confserver_key, /etc/mail/certs/mykey.pem )dnl define( confclient_cert, /etc/mail/certs/mycert.pem )dnl define( confclient_key, /etc/mail/certs/mykey.pem )dnl 98 TLS SMTP sendmail.cf /etc/mail 33 sendmail openssl.mc. # cd /etc/mail/certs # ln -s CA/cacert.pem CAcert.pem # ln -s CA/newcert.pem MYcert.pem # ln -s CA/newreq.pem MYkey.pem MYkey.pem # chmod go-r MYkey.pem confcacert_path CA # C=CAcert.pem # ln -s $C openssl x509 -noout -hash < $C.0 40 Oracle Solaris 11.1 sendmail 2012 10
sendmail 10 a. confcacert /etc/mail/certs/host.domain.cert.pem host.domain b. confcacert_path CA # C=host.domain.cert.pem # ln -s $C openssl x509 -noout -hash < $C.0 host.domain 11 2 2 sendmail # svcadm enable network/smtp:sendmail Received: TLS Received:. Received: from his.example.com ([IPv6:2001:db8:3c4d:15::1a2f:1a2b]) by her.example.com (8.13.4+Sun/8.13.4) with ESMTP id j2tnub8i242496 (version=tlsv1/sslv3 cipher=dhe-rsa-aes256-sha bits=256 verify=ok) for <janepc@her.example.com>; Tue, 29 Mar 2005 15:30:11-0800 (PST) Received: from her.example.com (her.city.example.com [192.168.0.0]) by his.example.com (8.13.4+Sun/8.13.4) with ESMTP id j2tnu7cl571102 version=tlsv1/sslv3 cipher=dhe-rsa-aes256-sha bits=256 verify=ok) for <janepc@her.example.com>; Tue, 29 Mar 2005 15:30:07-0800 (PST) verify OK 100 TLS SMTP OpenSSL openssl(1) (http://www.openssl.org/docs/apps/openssl.html) req(1) (http://www.openssl.org/docs/apps/req.html) x509(1) (http://www.openssl.org/docs/apps/x509.html) ca(1) (http://www.openssl.org/docs/apps/ca.html) sendmail.cf sendmail SMTP. SMTP 2 () 41
( )., 106 sendmail 8.12 submit.cf 1 2 3 4 5 6 7 Oracle Solaris 11.1 : sendmail # svcadm disable -t sendmail-client. # cd /etc/mail/cf/cf # cp submit.mc submit-myhost.mc myhost.mc ( : submit-myhost.mc) IP msp # grep msp submit-myhost.mc FEATURE( msp, [#.#.#.#] )dnl m4 # make submit-myhost.cf # cp /etc/mail/submit.cf /etc/mail/submit.cf.save # cp submit-myhost.cf /etc/mail/submit.cf sendmail # svcadm enable sendmail-client ( ) 87 3, () 42 Oracle Solaris 11.1 sendmail 2012 10
NIS mail.aliases postmaster NIS mail.aliases NIS /etc/mail/aliases postmaster. 43 NIS mail.aliases 44 46 46 postmaster.. makemap. makemap(1m) NIS.. 93 sendmail 87 3, () 1 2 3 NIS mail.aliases NIS mail.aliases, NIS Oracle Solaris 11.1 : /etc/mail/aliases. a. # cat /etc/mail/aliases.. alias:expanded-alias 2 () 43
alias expanded-alias (user@host.domain.com) b. Postmaster: root # cat /etc/mail/aliases.. Postmaster: root c. root # cat /etc/mail/aliases.. root: user@host.domain.com user@host.domain.com 4 5 6 NIS. /var/yp # cd /var/yp make # make /etc/hosts /etc/mail/aliases NIS 1 2 3 Oracle Solaris 11.1 : /etc/mail/aliases. a. user1: user2@host.domain user1 44 Oracle Solaris 11.1 sendmail 2012 10
user2@host.domain b. Postmaster: root # cat /etc/mail/aliases.. Postmaster: root c. root # cat /etc/mail/aliases.. root: user@host.domain.com user@host.domain.com 4 5 # newaliases /etc/mail/sendmail.cf AliasFile /etc/mail/aliases.db/etc/mail/aliases.dir /etc/mail/aliases.pag a. () /etc/mail/aliases, /etc/mail/aliases.dir /etc/mail/aliases.pag rcp rsync 3. rcp(1) rsync(1). newaliases. /etc/mail/aliases. b. () /etc/mail/aliases /etc/mail/aliases.db rcp rsync. rcp(1) rsync(1). newaliases. /etc/mail/aliases. 2 () 45
1 2 3. Oracle Solaris 11.1 :.. old-name@newdomain.com new-name@newdomain.com old-name@olddomain.com error:nouser No such user here @olddomain.com %1@newdomain.com old_name@newdomain.com new_name@newdomain.com old_name@olddomain.com olddomain.com newdomain.com. olddomain newdomain. # /usr/sbin/makemap maptype newmap < newmap maptype newmap dbm, btree hash dbm.pag.dir.db. postmaster postmaster. postmaster NIS /etc/mail/aliases. 47 /etc/mail/aliases postmaster 46 Oracle Solaris 11.1 sendmail 2012 10
47 postmaster 48 /etc/mail/aliases postmaster 1 2 3 4 1 2 /etc/mail/aliases postmaster /etc/mail/aliases postmaster. Oracle Solaris 11.1 : /etc/mail/aliases. # cat /etc/mail/aliases # Following alias is required by the mail protocol, RFC 2821 # Set it to the address of a HUMAN who deals with this system s # mail problems. Postmaster: root /etc/mail/aliases root Postmaster: mail-address mail-address ().. /etc/mail/aliases 47 postmaster postmaster postmaster. Oracle Solaris 11.1 : postmaster. (*) Oracle Solaris 11.1 CLI ( ) 2 () 47
( ) 3 1 2 3 4 mail # mail -f postmaster postmaster /etc/mail/aliases postmaster /etc/mail/aliases postmaster. Oracle Solaris 11.1 : root # cat /etc/mail/aliases.. root: user@host.domain.com user@host.domain.com /etc/mail/aliases. sysadmin. # cat /etc/mail/aliases.. sysadmin: /usr/somewhere/somefile sysadmin /usr/somewhere/somefile # newaliases. ( ) /var/spool/mqueue 49 /var/spool/mqueue 48 Oracle Solaris 11.1 sendmail 2012 10
/var/spool/mqueue 50 /var/spool/mqueue /var/spool/mqueue /var/spool/mqueue /var/spool/omqueue 50 /var/spool/mqueue 51 /var/spool/mqueue 51 /var/spool/omqueue 106 sendmail 8.12 submit.cf 116 sendmail 8.12 49 /var/spool/mqueue 50 /var/spool/mqueue 50 /var/spool/mqueue 51 /var/spool/mqueue 51 /var/spool/omqueue /var/spool/mqueue # /usr/bin/mailq more ID 2 () 49
solaris.admin.mail.mailq sendmail -bp prof_attr. prof_attr(4) mailq(1) /var/spool/mqueue, 1 2 Oracle Solaris 11.1 : # /usr/lib/sendmail -q -v /var/spool/mqueue, 1 2 Oracle Solaris 11.1 : -qrstring # /usr/lib/sendmail -qrstring string user@host.domain( : ) -qi nnnnn. # /usr/lib/sendmail -qinnnnn nnnnn ID 50 Oracle Solaris 11.1 sendmail 2012 10
1 2 3 4 5 6 /var/spool/mqueue. Oracle Solaris 11.1 : sendmail # svcadm disable network/smtp:sendmail sendmail. /var/spool # cd /var/spool mqueue omqueue mqueue. # mv mqueue omqueue; mkdir mqueue // / daemon # chmod 750 mqueue; chown root:bin mqueue sendmail # svcadm enable network/smtp:sendmail 1 2 /var/spool/omqueue. Oracle Solaris 11.1 : # /usr/lib/sendmail -oq/var/spool/omqueue -q -oq -q -v 2 () 51
.forward ( ) 3 # rmdir /var/spool/omqueue.forward ( ).forward 90.forward 3, ().forward.forward /etc/shells,.,.forward..forward. 52.forward 53.forward 54 /etc/shells.forward.forward.. 90.forward 3, () 52.forward 53.forward 54 /etc/shells.forward.forward 1 Oracle Solaris 11.1 : 52 Oracle Solaris 11.1 sendmail 2012 10
.forward 2 3 4 /etc/mail/cf/domain/solaris-generic.m4 m4. # cd /etc/mail/cf/domain # cp solaris-generic.m4 mydomain.m4 mydomain define( confforward_path, )dnl confforward_path m4 null 34 sendmail.cf.mc DOMAIN( solaris-generic ) DOMAIN( mydomain ). 1 2 3 4.forward.forward Oracle Solaris 11.1 : /etc/mail/cf/domain/solaris-generic.m4 m4. # cd /etc/mail/cf/domain # cp solaris-generic.m4 mydomain.m4 mydomain define( confforward_path, $z/.forward:/var/forward/$u )dnl confforward_path m4 34 sendmail.cf 2 () 53
( ).mc DOMAIN( solaris-generic ) DOMAIN( mydomain ). 1 2 3 4 5 /etc/shells..forward. grep.. http://www.sendmail.org/vendor/sun/gen-etc-shells.html Oracle Solaris 11.1 : gen-etc-shells #./gen-etc-shells.sh > /tmp/shells getent svc:/system/name-service/switch /tmp/shells /etc/shells # mv /tmp/shells /etc/shells ( ) sendmail 55 54 Oracle Solaris 11.1 sendmail 2012 10
sendmail 56 56 sendmail 57 syslogd 58 59. 1 2 3 4. sendmail # svcadm refresh network/smtp:sendmail. # /usr/lib/sendmail -v names </dev/null names null. (). 2 () 55
5 6 7 8 () () UUCP.. UUCP sendmail UUCP. postmaster % mconnect connecting to host localhost (127.0.0.1), port 25 connection open 220 your.domain.com ESMTP Sendmail 8.13.6+Sun/8.13.6; Tue, 12 Sep 2004 13:34:13-0800 (PST) expn sandy 250 2.1.5 <sandy@phoenix.example.com> quit 221 2.0.0 your.domain.com closing connection % mconnect.. mconnect(1) expn sandy sandy@phoenix.example.com sandy. 1 sendmail sendmail. # /usr/lib/sendmail -bt 56 Oracle Solaris 11.1 sendmail 2012 10
2 3 2 3 (>) > 3,0 mail-sraddress mail-address. Ctrl-d.. % /usr/lib/sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> > 3,0 sandy@phoenix canonify input: sandy @ phoenix Canonify2 input: sandy < @ phoenix > Canonify2 returns: sandy < @ phoenix. example. com. > canonify returns: sandy < @ phoenix. example. com. > parse input: sandy < @ phoenix. example. com. > Parse0 input: sandy < @ phoenix. example. com. > Parse0 returns: sandy < @ phoenix. example. com. > ParseLocal input: sandy < @ phoenix. example. com. > ParseLocal returns: sandy < @ phoenix. example. com. > Parse1 input: sandy < @ phoenix. example. com. > MailerToTriple input: < mailhost. phoenix. example. com > sandy < @ phoenix. example. com. > MailerToTriple returns: $# relay $@ mailhost. phoenix. example. com $: sandy < @ phoenix. example. com. > Parse1 returns: $# relay $@ mailhost. phoenix. example. com $: sandy < @ phoenix. example. com. > parse returns: $# relay $@ mailhost. phoenix. example. com $: sandy < @ phoenix. example. com. > mconnect.. mconnect(1) sandy % mconnect phoenix connecting to host phoenix (172.31.255.255), port 25 connection open 220 phoenix.example.com ESMTP Sendmail 8.13.1+Sun/8.13.1; Sat, 4 Sep 2004 3:52:56-0700 expn sandy 2 () 57
250 2.1.5 <sandy@phoenix.example.com> quit mconnect SMTP? sendmail? /etc/mail/sendmail.cf? sendmail 25? syslogd syslogd loghost. /etc/hosts. loghost NIS. loghost syslogd. /etc/syslog.conf syslogd /etc/syslog.conf. syslog mail.alert mail.crit mail.warning mail.notice mail.info mail.debug /etc/syslog.conf,, /var/log/syslog. mail.crit;mail.info;mail.debug /var/log/syslog,. syslog. 10.10 loghost syslogd Oracle Solaris 11.1 58 Oracle Solaris 11.1 sendmail 2012 10
Received MAILER-DAEMON sendmail crontab. SYSERR. mailstats sendmail http://www.sendmail.org/faq.. : : : 451 timeout waiting for input during source : sendmail SMTP Timeout RCPT : /etc/mail/sendmail.cf Timeout.. 550 hostname... Host unknown : sendmail DNS( ) (@) : nslookup. 2 () 59
550 username... User unknown : sendmail (@) :. 554 hostname... Local configuration error : sendmail : /etc/mail/sendmail.cf $j : SMTP HELO. HELO $j. http://www.sendmail.org/faq/section4#4.5 config error: mail loops back to myself. : MX bar foo foo bar. : http://www.sendmail.org/faq/section4#4.5 host name configuration error : I refuse to talk to myself sendmail Local configuration error : 554 hostname... Local configuration error user unknown : Username... user unknown. : /etc/mail/aliases.mailrc 60 Oracle Solaris 11.1 sendmail 2012 10
.. http://www.sendmail.org/faq/section4#4.17 2 () 61
62
3 3 () sendmail, Oracle Solaris OS 1, () 2, (). 64 Oracle Solaris sendmail 67 76 92 93 sendmail 96 sendmail 8.14 97 sendmail 8.13 105 sendmail 8.12 sendmail(1m) mail.local(1m) mailstats(1) makemap(1m) editmap(1m) 63
Oracle Solaris sendmail Oracle Solaris sendmail, Berkeley Oracle Solaris sendmail 64 sendmail 65 MILTER, sendmail API 66 sendmail 66 sendmail sendmail. http:// www.sendmail.org. 3 1 sendmail SOLARIS=21000 MILTER NETINET6 Solaris 10 API 8.13 sendmail 65 MILTER, sendmail API IPv6 conf.h Makefile 3 2 NDBM NEWDB USERDB NIS NISPLUS LDAPMAP MAP_REGEX ndbm Berkeley DB nis nisplus LDAP 64 Oracle Solaris 11.1 sendmail 2012 10
Oracle Solaris sendmail 3 3 OS SUN_EXTENSIONS SUN_INIT_DOMAIN SUN_SIMPLIFIED_LDAP VENDOR_DEFAULT=VENDOR_SUN sun_compat.o NIS. http://www.sendmail.org Sun LDAP API http://www.sendmail.org Sun sendmail 3 4 sendmail SASL (RFC 2554) STARTTLS (RFC 2487) sendmail % /usr/lib/sendmail -bt -d0.10 < /dev/null preceding Sun. MILTER, sendmail API sendmail API MILTER. sendmail. sendmail 8.13 API http://www.sendmail.org https://www.milter.org/ 3 () 65
Oracle Solaris sendmail sendmail Oracle Solaris sendmail.org.. Oracle Solaris sendmail. 3 5 sendmail sendmail hoststat sendmail -bh mailq sendmail -bp newaliases sendmail -bi purgestat sendmail -bh smtpd sendmail -bd sendmail sendmail.cf sendmail. 0 10.. Berkeley Sun. Sun 3 6 V7/Sun V8/Sun V9/Sun V10/Sun 8.8 sendmail 8.9 sendmail Solaris 8. 8.10 8.11 sendmail 8.12, 8.13 8.14 sendmail 8.12 Solaris 9 Solaris 10 8.13 8.14 Oracle Solaris 11 66 Oracle Solaris 11.1 sendmail 2012 10
V1/Sun. http://www.sendmail.org/vendor/sun/ differences.html#4 33 sendmail 2, () 67 74 67 67 68 68 sendmail 69 71 73 sendmail Oracle Solaris /usr/bin/mail /usr/bin/mailx (transport). Oracle Solaris sendmail.. 3 () 67
Oracle Solaris UUCP - uux - Oracle Solaris mail.local 105 sendmail 8.12. 115 sendmail 8.12 115 sendmail 8.12 sendmail sendmail sendmail sendmail.cf. 33 sendmail 2, () 68 SMTP(Simple Mail Transfer Protocol) 69 UUCP(UNIX-to-UNIX Copy Program) http://www.sendmail.org/m4/readme.html /etc/mail/cf/readme SMTP(Simple MailTransfer Protocol) SMTP smtp SMTP esmtp SMTP smtp8 8 MIME SMTP dsmtp F=% 114 sendmail 8.12 MAILER() 115 sendmail 8.12 68 Oracle Solaris 11.1 sendmail 2012 10
UUCP(UNIX-to-UNIX Copy Program) UUCP. http://www.sendmail.org/m4/ uucp_mailers.html /etc/mail/cf/readme USING UUCP MAILERS UUCP uucp-old uucp-new $=U uucp-old uucp uucp-old $=Y uucp-new UUCP. suucp uucp-new MAILER(smtp) 2 uucp-dom uucp-uudom SMTP $=Z uucp-uudom uucp-uudom uucp-dom smtp UUCP.mc MAILER(smtp) MAILER(uucp)., UUCP. 69 70 70 71. 3 () 69
. 3 7 com edu gov mil net org,. sendmail NIS, NIS bldg5.example.com example.com. NIS NIS. DNS. 93 sendmail. 71 user@subdomain.....subdomain2.subdomain1.top-level-domain @. 70 Oracle Solaris 11.1 sendmail 2012 10
( : bob::vmsvax@gateway smallberries%mill.uucp@gateway) ( : iggy.ignatz) 68 sendmail @,. @... user@host.domain UUCP. host.domain!user. user@domain @. ( ) (@ ). ID. /var/mail/username... NFS. /var/mail 3 () 71
.. NFS. /etc/mail/aliases NIS. 3 8 username Firstname.Lastname Firstname_Lastname Firstinitial.Lastname Firstinitial_Lastname postmaster MAILER-DAEMON aliasname-request owner-aliasname owner-owner %domain... postmaster. postmaster. sendmail MAILER-DAEMON -request owner- owner-aliasname. (%) % % @ %. percent hack. sendmail 8, Envelope.. 72 Oracle Solaris 11.1 sendmail 2012 10
mygroup: :include:/pathname/mygroup.list owner-mygroup: mygroup-request mygroup-request: sandys, ignatz mygroup owner-mygroup. mygroup-request. mygroup Envelope mygroup-request. 42 ( ) 2, () 87..., Kevin Smith. Kevin Smith., ignatz example.com mars ignatz@mars ignatz@example ignatz example.., ignatz. ignatz: iggy.ignatz iggyi: iggy.ignatz iggy.ignatz: ignatz@mars., mars planets frednis. fred: fred@planets, smallberries example.com privet smallberries@example.com 3 () 73
NIS aliases /etc/mail/aliases.. NIS aliases. /etc/mail/aliases.. ~/.mailrc /etc/mail/aliases. NIS.. 74 75 75. 75 /etc/hosts IP mailhost hosts mailhost. 29. 2, (). Oracle Solaris 11.1 UUCP PPP 1, Solaris PPP 4.0(), Oracle Solaris 11.1 UUCP PPP 10, UUCP() Oracle Solaris 11.1 IPv4 74 Oracle Solaris 11.1 sendmail 2012 10
.. /var/mail 26 2, ().. From.. NFS root /etc/vfstab /var/mail.,. NFS...... /etc/mail/aliases. 27 2, (), SNA(Systems Network Architecture) TCP/IP. 3 () 75
sendmail sendmail.. sendmail.cf.. 3 1.. 31 2, (),, 77 vacation 77 /usr/bin 78 /etc/mail 81 /usr/lib 76 Oracle Solaris 11.1 sendmail 2012 10
82 83 84 sendmail 87 90.forward 91 /etc/default/sendmail vacation vacation....vacation.filter...vacation.filter. company.com mydomain.com onefriend@hisisp.com anotherfriend@herisp.com...., somebody@dept.company.com someone@company.com company.com. vacation(1) /usr/bin /usr/bin mail mailcompat SunOS 4.1 3 () 77
mailq mailstats /etc/mail/statistics ( ) mailx mconnect praliases praliases(1) rmail /usr/bin/mail.. vacation /etc/mail /etc/mail Mail.rc mailx aliases aliases.db newaliases aliases.dir newaliases. Solaris 9. aliases.pag newaliases. Solaris 9. mailx.rc mailx main.cf sendmail.cf 8.13 sendmail. relay-domains. 78 Oracle Solaris 11.1 sendmail 2012 10
sendmail.cf submit.cf MSP(Mail Submission Program) 106 sendmail 8.12 submit.cf local-host-names helpfile SMTP HELP sendmail.pid PID /system/volatile statistics sendmail. sendmail sendmail.st. subsidiary.cf sendmail.cf 8.13 sendmail. trusted-users ( ). root. X-Authentication-Warning: header being added to a message /etc/mail/cf /etc/mail cf. sendmail.cf cf 3 9. /usr /usr/lib/mail /etc/mail/cf. /usr/lib/mail/sh/check-hostname /usr/lib/mail/sh/check-permissions /usr/sbin. 82 3 9 /etc/mail/cf README 3 () 79
3 9 /etc/mail/cf () cf/main.cf cf/sendmail.cf cf/main.mc cf/sendmail.mc cf/makefile cf/submit.cf MSP(Mail Submission Program) cf/submit.mc submit.cf MSP(Mail Submission Program) m4 cf/sendmail.cf sendmail cf/sendmail.mc sendmail.cf m4 cf/subsidiary.cf cf/sendmail.cf /var/mail NFS cf/subsidiary.mc cf/sendmail.mc subsidiary.cf m4 domain domain/generic.m4 Berkeley domain/solaris-antispam.m4 sendmailsendmail,, domain/solaris-generic.m4 sendmailsendmail 80 Oracle Solaris 11.1 sendmail 2012 10
3 9 /etc/mail/cf () feature README m4 mailer local, smtp uucp main-v7sun.mc cf/sendmail.mc ostype ostype/solaris2.m4 mail.local ostype/solaris2.ml.m4 mail.local ostype/solaris2.pre5.m4 mail ostype/solaris8.m4 mail.local (LMTP ), IPv6, /system/volatile sendmail.pid subsidiary-v7sun.mc cf/sendmail.mc /usr/lib /usr/lib 3 10 /usr/lib mail.local sendmail smrsh sendmail program sendmail /var/adm/sm.bin (sendmail ). /var/adm/sm.binsmrsh(1m) m4 FEATURE( smrsh ) mc 3 () 81
3 10 /usr/lib () mail /etc/mail/cf 79 /etc/mail/cf 3 11 3 11 /etc/default/sendmail sendmail /etc/shells /etc/mail/cf/sh m4 /system/volatile/sendmail.pid PID /usr/sbin/check-permissions :include:.forward /usr/sbin/check-hostname sendmail /usr/sbin/editmap sendmail /usr/sbin/in.comsat /usr/sbin/makemap /usr/sbin/newaliases /usr/lib/sendmail. /usr/bin. /usr/sbin/syslogd sendmail /usr/sbin/etrn Perl /var/mail/mailbox1, /var/mail/mailbox2. 82 Oracle Solaris 11.1 sendmail 2012 10
3 11 () /var/spool/clientmqueue /var/spool/mqueue 3 2 3 2 1. mailx. mailx(1) 2. sendmail 3. sendmail. /etc/mail/sendmail.cf,, sendmail 4. sendmail 5. /usr/lib/mail.local /var/mail/username 6. mail, mailx 3 () 83
sendmail sendmail sendmail TCP/IP UUCP. sendmail SMTP, sendmail. 69 () Oracle Solaris sendmail sendmail mail.local procmail sendmail mailx Mozilla Mail sendmail sendmail 84 sendmail 86 sendmail 86 sendmail sendmail sendmail. 84 Oracle Solaris 11.1 sendmail 2012 10
.. 1....... root..,.. 87 42 ( ) 2, () 2....forward 90.forward 52.forward ( ) 2, () 3. root. root. 3 () 85
. 88 /etc/mail/aliases 42 ( ) 2, () /usr/bin/mailx sendmail. sendmail NIS. svc:/system/name-service/switch nsswitch.conf(4) sendmail sendmail sendmail. sendmail, sendmail sendmail. 83 sendmail. sendmail sendmail. NIS.. I am on vacation.. vacation(1) sendmail. sendmail sendmail, sendmail /etc/mail/sendmail.cf Oracle Solaris /etc/mail 86 Oracle Solaris 11.1 sendmail 2012 10
1. sendmail.cf - sendmail 2. submit.cf - Mail Submission Program sendmail 106 sendmail 8.12 submit.cf,,.. 25 ( ) 33 sendmail 2, () sendmail 8.13 main.cf. -. 116 sendmail 8.12 48 ( ) - -. sendmail,. -, 88.mailrc 88 /etc/mail/aliases 89 NIS aliases. 42 ( ) 2, () 3 () 87
.mailrc.mailrc...mailrc. alias aliasname value value value... aliasname value scott scott. /etc/mail/aliases /etc/mail/aliases. /etc/mail/aliases. aliasname: value,value,value... aliasname value /etc/mail/aliases.. /etc/mail/aliases /etc/mail/aliases newaliases. sendmail. 44 2, ()., saturn ignatz /etc/mail/aliases. ignatz: ignatz@saturn. root root/etc/mail/aliases., saturn root: sysadmin@saturn /etc/mail/aliases 88 Oracle Solaris 11.1 sendmail 2012 10
root.. aliasname: :include:/path/aliasfile aliasname /path/aliasfile,. user1@host1 user2@host2 /etc/mail/aliases. filename aliasname aliasname: /home/backup/filename. filename aliasname: " tee -a /home/backup/filename lp" 42 ( ) 2, () NIS aliases NIS aliases. sendmail NIS aliases /etc/mail/aliases nsswitch.conf(4) NIS aliases. aliasname: value,value,value... aliasname value NIS aliases. NIS.. aliasname: aliasname@host aliasname host /etc/mail/alias 3 () 89
43 NIS mail.aliases 2, ().forward sendmail.forward. 90 90.forward 91.forward.hostname 91.forward+detail 52.forward ( ) 2, ().forward.forward host1 user@host2 host2 sendmail NIS user user@host1..forward root bin. aliases.forward.forward ( ).forward.. root.,.forward /export/home/terry root /export /export/home...forward. 90 Oracle Solaris 11.1 sendmail 2012 10
.forward.hostname.forward.hostname., sandy@phoenix.example.com sandy@example.com.forward.phoenix sandy % cat.forward.phoenix sandy@example.com " /usr/bin/vacation sandy" % cat.vacation.msg From: sandy@example.com (via the vacation program) Subject: my alias has changed My alias has changed to sandy@example.com. Please use this alias in the future. The mail that I just received from you has been forwarded to my new address. Sandy vacation..forward vacation..forward+detail.forward+detail detail..:%&!^[]+.., sandy+test1@example.com. sandy+test1@example.com.forward+detail sandy@example.com :. /etc/default/sendmail sendmail. CLIENTOPTIONS= string (/var/spool/clientmqueue). 3 () 91
CLIENTQUEUEINTERVAL=# QUEUEINTERVAL CLIENTQUEUEINTERVAL CLIENTQUEUEINTERVAL SMTP. /var/spool/clientmqueue. ETRN_HOSTS= string SMTP. etrn(1m) MODE=-bd sendmail -bd. OPTIONS=string QUEUEINTERVAL=# # s( ), m( ), h(), d( ) w( ). sendmail sendmail 15 QUEUEOPTIONS=p p... sendmail. 92 Oracle Solaris 11.1 sendmail 2012 10
sendmail sendmail.cf 1. 2. /usr/lib/mail.local 3. 4.. sendmail sendmail sendmail 93 sendmail.cf 94 sendmail 95 NIS sendmail 96 sendmail NIS DNS 32 sendmail DNS 42 ( ) 2, () sendmail.cf sendmail.cf SMTP IP SMTP. sendmail.cf 3 () 93
sendmail.. sendmail sendmail 94 94 nsswitch.conf(4)., A.B.C.D A.B.C.D B.C.D C.D D.. sendmail gethostbyname(). mailhost ( : smith.admin.acme.com ) ( : smith) sendmail. gethostbyname() 94 Oracle Solaris 11.1 sendmail 2012 10
sendmail NIS DNS gethostbyname() sendmail. gethostbyname(), admin.acme.com gethostbyname(smith.admin.acme.com) gethostbyname(smith). gethostbyname()., smith.admin.acme.com gethostbyname(smith) ebb.admin.acme.com esg.admin.acme.com. gethostbyname() gethostbyname(3nsl) NIS sendmail sendmail NIS NIS sendmail NIS, ebs.admin.acme.com admin.acme.com. NIS mailhost. NIS. NIS sendmail.cf %l %y sendmail sendmail IP SMTP NIS sendmail.cf. gethostbyname() NIS NIS., ebs.admin.acme.com esg.admin.acme.com. NIS NIS. 3 () 95
sendmail 8.14 42 ( ) 2, () sendmail NIS DNS sendmail NIS DNS NIS sendmail NIS, ebs.admin.acme.com admin.acme.com. DNS NIS DNS NIS mailhost. NIS DNS NIS DNS NIS DNS. NIS NIS., ebs.admin.acme.com esg.admin.acme.com. NIS NIS. 32 sendmail DNS 42 ( ) 2, () sendmail 8.14 sendmail 8.14 sendmail. sendmail.cf submit.mc. 35. sendmail cron Become Local( ) -bl sendmail(1m) -bd Become Daemon( ) 36 sendmail 96 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.13 makemap -t -u -u -t -u -t makemap(1m) sendmail 8.13 sendmail FallBackSmartHost main.cf subsidiary.cf. main.cf MX subsidiary.cf DNS MX FallBackSmartHost MX ( ) MX 8.13 102 sendmail 8.13 102 sendmail 8.13 104 sendmail 8.13 FEATURE() TLS( ) SMTP. sendmail 8.13TLS SMTP SMTP. 3. SMTP 8.13 sendmail TLS( ). SMTP TLS SSL(Secure Sockets Layer). 3 () 97
sendmail 8.13 STARTTLS TLS SMTP SMTP. STARTTLS 220 Ready to start TLS 501 Syntax error (no parameters allowed) 454 TLS not available due to temporary reason 220 TLS 501 STARTTLS STARTTLS 454 SMTP TLS. TLS. 530 Must issue a STARTTLS command first 530 STARTTLS. SMTP. TLS SMTP. SMTP STARTTLS TLS SMTP sendmail TLS. 37 TLS SMTP sendmail.cf TLS SMTP TLS SMTP O OptionName= argument # for the configuration file -O OptionName= argument # for the command line define( m4name', argument) # for m4 configuration 98 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.13 3 12 TLS SMTP CACertFile CACertPath ClientCertFile ClientKeyFile CRLFile DHParameters m4 : confcacert : filename : CA m4 : confcacert_path : path : CA m4 : confclient_cert : filename : sendmail m4 : confclient_key : filename : m4 : confcrl : filename : X.509v3 m4 : confdh_parameters : filename : DH(Diffie-Hellman) 3 () 99
sendmail 8.13 3 12 TLS SMTP () RandFile m4 : confrand_file : file:filename egd:unix socket : file: egd: UNIX Oracle Solaris OS. random(7d) ServerCertFile m4 : confserver_cert : filename : sendmail Timeout.starttls m4 : confto_starttls : amount of time : 1h SMTP STARTTLS TLSSrvOptions m4 : conftls_srv_options : V : V sendmail SMTP TLS. CACertPath CACertFile ServerCertFile ClientKeyFile. TLS SMTP STARTTLS 100 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.13 3 13 TLS SMTP ${cert_issuer} ${cert_subject} ${cn_issuer} ${cn_subject} ${tls_version} ${cipher} ${cipher_bits} ${verify} CA( ) DN( ) DN CA CN( ) CN TLS ( ). OK NO NOT FAIL. NONE STARTTLS TEMP PROTOCOL SMTP SOFTWARE STARTTLS ${server_name} ${server_addr} SMTP SMTP TLS SMTP TLS SMTP 3 14 TLS SMTP tls_server tls_client tls_rcpt TLS_connection sendmail TLS sendmail TLS MTA DNS TLS RHS 3 () 101
sendmail 8.13 3 14 TLS SMTP () try_tls sendmail MTA STARTTLS MTA STARTTLS STARTTLS. http://www.sendmail.org/m4/starttls.html TLS SMTP SMTP. SMTP TLS. ( : sendmail).. SMTP SMTP TLS,. Oracle Solaris 11.1 : sendmail 8.13 8.13 sendmail sendmail(1m) 3 15 8.13 sendmail -D logfile logfile. -q[!]qsubstr -Qreason reason substr -Qreason! substr reason reason -q[!]qsubstr substr reason sendmail 8.13 102 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.13 O OptionName=argument # for the configuration file -O OptionName=argument # for the command line define( m4name,argument) # for m4 configuration 3 16 8.13 sendmail ConnectionRateWindowSize FallBackSmartHost InputMailFilters PidFile QueueSortOrder RejectLogInterval m4 : confconnection_rate_window_size : number : 60 m4 : conffallback_smarthost : hostname MX m4 : confinput_mail_filters : filename sendmail m4 : confpid_file : filename : /system/volatile/sendmail.pid 8.13 sendmail m4 : confqueue_sort_order : none 8.13 none m4 : confreject_log_interval : period-of-time :3 3h period-of-time 3 () 103
sendmail 8.13 3 16 8.13 sendmail () SuperSafe m4 : confsafe_queue : s : postmilter : true postmilter sendmail milters sendmail SMTP. postmilter true sendmail 8.13 FEATURE() FEATURE() m4 FEATURE( name, argument ) 3 17 sendmail 8.13 FEATURE() FEATURE() conncontrol greet_pause local_lmtp access_db SMTP /etc/mail/cf/readme smtp greet_pause /etc/mail/cf/readme Oracle Solaris LMTP mail.local. 8.13 LMTP.. FEATURE( local_lmtp, /usr/local/bin/lmtp, lmtp ) mtamark ratecontrol use_client_ptr TTX RR (MTAMark) /etc/mail/cf/readme access_db /etc/mail/cf/readme FEATURE() check_relay$&{client_ptr} 104 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.12 sendmail 8.12. 105 sendmail 8.12 TCP 106 sendmail 8.12 submit.cf 107 sendmail 8.12 108 sendmail 8.12 PidFile ProcessTitlePrefix 109 sendmail 8.12 110 sendmail 8.12 110 sendmail 8.12 MAX 111 sendmail 8.12 m4 111 sendmail 8.12 FEATURE() 114 sendmail 8.12 MAILER() 115 sendmail 8.12 115 sendmail 8.12 116 sendmail 8.12 117 sendmail 8.12 LDAP 118 sendmail 8.12 118 sendmail 8.12 119 sendmail 8.12 120 sendmail 8.12 IPv6 sendmail 8.12 TCP TCP (ACL) TCP, rlogind, telnetd, ftpd. 8.12 sendmail TCP.. sendmail TCP hosts_access(4) Solaris 9 inetd(1m) sshd(1m) TCP ACL Oracle Solaris 11.1 : UFS 3 () 105
sendmail 8.12 sendmail 8.12 submit.cf 8.12 sendmail /etc/mail/submit.cf submit.cf Mail Submission Program sendmail Mail Submission Program root submit.cf sendmail submit.cf MSP(Mail Submission Program) mailx MSP. sendmail(1m) -Ac -Am submit.cf -bm - -bs - SMTP -bt - submit.cf sendmail SMTP. submit.cf sendmail sendmail /var/spool/clientmqueue sendmail submit.cf MSP ( ) /var/spool/clientmqueue /usr/lib/sendmail -Ac -q15m Solaris 9 submit.cf submit.cf Solaris 9. sendmail submit.cf sendmail submit.cf sendmail.cf sendmail.cf submit.cf sendmail.cf sendmail root MTA( ). /usr/lib/sendmail -L sm-mta -bd -q1h 106 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.12 sendmail.cf sendmail.cf 25 587 SMTP sendmail.cf /var/spool/mqueue sendmail 8.12 submit.cf sendmail 8.12 root. mailq(1) 48 ( ) Mail Submission Program root sendmail.forward. sendmail -bv.. sendmail 8.12 sendmail sendmail 8.12 sendmail Mail Submission Program SMTP. SMTP SMTP.. 41 sendmail.cf sendmail 8.12 sendmail sendmail(1m) 3 18 -Ac -Am -bp sendmail 8.12 submit.cf submit.cf 106 sendmail 8.12 submit.cf sendmail.cf 106 sendmail 8.12 submit.cf 3 () 107
sendmail 8.12 3 18 sendmail 8.12 () -G. ftp://ftp.sendmail.org sendmail. -L tag syslog tag -q[!]i substring -q[!]r substring -q[!]s substring substring! substring IDsubstring! ID substring substring! substring - qf fork fork(2) -qgname -qptime name -q time -U ftp://ftp.sendmail.org sendmail 8.12. -G. sendmail 8.12 PidFile ProcessTitlePrefix PidFile ProcessTitlePrefix sendmail(1m) 3 19 PidFile ProcessTitlePrefix ${daemon_addr} ${daemon_family} ${daemon_info} ${daemon_name} ${daemon_port} ( : 0.0.0.0) ( : inet inet6) ( : SMTP+queueing@00:30:00) ( : MSA) ( : 25) 108 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.12 3 19 PidFile ProcessTitlePrefix () ${queue_interval} ( : 00:30:00) sendmail 8.12 sendmail sendmail(1m) 3 20 sendmail ${addr_type} ${client_resolve} ${deliverymode} ${dsn_notify}, ${dsn_envid}, ${dsn_ret} ${if_addr} ${if_addr_out}, ${if_name_out}, ${if_family_out} Envelope ${client_name}: OK, FAIL, FORGED TEMP resolve sendmail DeliveryMode DSN ${if_addr}. ${if_name} ${load_avg} ${msg_size} ESMTP (SIZE=parameter) sendmail check_compat check_compat 3 24 3 () 109
sendmail 8.12 3 20 sendmail () ${nrcpts} ${ntries} ${rcpt_mailer}, ${rcpt_host}, ${rcpt_addr}, ${mail_mailer}, ${mail_host}, ${mail_addr} ($#mailer), ($@ host) ($: addr) RHS(Right-Hand Side) RCPT MAIL sendmail 8.12 sendmail. 3 21 sendmail LOCAL_MAILER_EOL LOCAL_MAILER_FLAGS MAIL_SETTINGS_DIR MODIFY_MAILER_FLAGS RELAY_MAILER_FLAGS Return-Path: ( ) *_MAILER_FLAGS, sendmail 8.12 MAX sendmail MAX. 3 22 MAX MAXBADCOMMANDS 25 MAXNOOPCOMMANDS 20 NOOP, VERB, ONEX, XUSR MAXHELOCOMMANDS 3 HELO, EHLO 110 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.12 3 22 MAX () MAXVRFYCOMMANDS 6 VRFY, EXPN MAXETRNCOMMANDS 8 ETRN 0. sendmail 8.12 m4 sendmail m4. symbolic-name( value ) sendmail.cf 33 sendmail 2, () 3 23 sendmail m4 m4 FEATURE() 111 sendmail 8.12 FEATURE() LOCAL_DOMAIN() w ($=w ). MASQUERADE_EXCEPTION () SMART_HOST() VIRTUSER_DOMAIN() VIRTUSER_DOMAIN_FILE() ( : user@[host]). $={VirtHost} $=R $=R sendmail 8.12 FEATURE() FEATURE() FEATURE FEATURE( name, argument ) 3 () 111
sendmail 8.12 sendmail.cf 33 sendmail 2, () 3 24 FEATURE() FEATURE() compat_check : FEATURE(). FEATURE() <@> sender @sdomain<@> recipient@rdomain. delay_checks : friend hater FEATURE(). FEATURE( delay_checks ) MAIL check_mail check_relay. check_rcpt /etc/mail/cf/readme dnsbl : FEATURE() DNS DNS FEATURE(). FEATURE(). enhdnsbl : DNS dnsbl FEATURE(). /etc/mail/cf/readme generics_entire_domain : $=G genericstable FEATURE(). ldap_routing : http://www.sendmail.org LDAP FEATURE(). local_lmtp : LMTP mail.local Oracle Solaris LMTP DSN( ) SMTP FEATURE(). 112 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.12 3 24 FEATURE() () FEATURE() local_no_masquerade : FEATURE(). lookupdotdomain :.domain FEATURE(). nocanonify : canonify_hosts FEATURE(). CANONIFY_DOMAIN CANONIFY_DOMAIN_FILE $[ $]. canonify_hosts <user@host>. no_default_msa : RFC 2476 m4 sendmail FEATURE(). nouucp :! reject! nospecial! FEATURE(). nullclient : FEATURE(). preserve_local_plus_detail : sendmail +detail FEATURE(). preserve_luser_host : LUSER_RELAY FEATURE(). queuegroup : FEATURE(). 3 () 113
sendmail 8.12 3 24 FEATURE() () FEATURE() relay_mail_from : domain RELAY From: FEATURE(). domain virtuser_entire_domain : VIRTUSER_DOMAIN VIRTUSER_DOMAIN_FILE virtusertable $={VirtHost} FEATURE(). FEATURE( virtuser_entire_domain ) $={VirtHost}. FEATURE(). 3 25 FEATURE() FEATURE() rbl remote_mode sun_reverse_alias_files sun_reverse_alias_nis sun_reverse_alias_nisplus FEATURE( dnsbl ) FEATURE( enhdnsbl ) FEATURE() MASQUERADE_AS( $S ) /etc/mail/cf/subsidiary.mc FEATURE( remote_mode ) $S sendmail.cf SMART_HOST. FEATURE( genericstable ) FEATURE( genericstable ) FEATURE( genericstable ) sendmail 8.12 MAILER() MAILER() MAILER( symbolic-name ) sendmail MAILER( smtp ) dsmtp F=% dsmtp IPC $h DSMTP_MAILER_ARGS 114 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.12 MAILER uucp-dom uucp-uudom MAILER( smtp ) MAILER( uucp ) MAILER. 68 sendmail sendmail.cf 33 sendmail 2, () sendmail 8.12 F=. Mlocal, Mprog, Msmtp, Mesmtp, Msmtp8, Mrelay, P=/usr/lib/mail.local, F=lsDFMAw5:/ @qsxfmnz9, S=10/30, R=20/40, P=/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/, P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990, P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990, P=[IPC], F=mDFMuX8, S=11/31, R=21, E=\r\n, L=990, P=[IPC], F=mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040, 3 26 % ETRN -qi, -qr -qs.. 1 null ( : \0) 2 ESMTP SMTP 6 7. sendmail 8.12 M Magent-name, equate, equate,... W=. Msmtp, P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990, W=2m 3 () 115
sendmail 8.12 m4 define( SMTP_MAILER_MAXMSGS, 1000 ) smtp 1,000 sendmail.cf 33 sendmail 2, () mailer 3 27 /= : chroot() m= : define() m4 SMTP_MAILER_MAXMSGS - smtp LOCAL_MAILER_MAXMSGS - local RELAY_MAILER_MAXMSGS - relay smtp, local relay W= : sendmail 8.12 (*) QueueDirectory O QueueDirectory=/var/spool/mqueue/q* /var/spool/mqueue/q* q sendmail. Verbose (-v) 60 ID. 116 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.12 8.12 root. mailq(1) 48 ( ) Envelope 14 15. 14. 48 ( ) sendmail 8.12 LDAP sendmail LDAP(Lightweight Directory Access Protocol) LDAPROUTE_EQUIVALENT() LDAPROUTE_EQUIVALENT_FILE() LDAP. /etc/mail/cf/readme ftp://ftp.sendmail.org sendmail LDAPX LDAP LDAP Kldap ldap options LDAP -v Kldap ldap -v"mail,more-mail" LDAP LDAP sendmail LDAP. sendmail LDAP. -Vseparator separator. %s LDAP %0. %0 LDAP * 3 28 LDAP -k"uid=%s" -k"uid=*" -k"uid=%0" -k"uid=\2a" * 3 () 117
sendmail 8.12 LDAP 3 29 LDAP -1. -r never always search find LDAP -Z size sendmail 8.12 [TCP]. P=[IPC] ([IPC]) UNIX. LMTP.. Mexecmail, P=[IPC], F=lsDFMmnqSXzA5@/:, E=\r\n, S=10, R=20/40, T=DNS/RFC822/X-Unix, A=FILE /system/volatile/lmtpd [IPC]. 3 30 A=FILE A=TCP A=IPC UNIX TCP/IP sendmail 8.12 3 31 Set check_eoh 118 Oracle Solaris 11.1 sendmail 2012 10
sendmail 8.12 3 31 () Set check_etrn check_expn check_vrfy check_rcpt RCPT ETRN check_rcpt RCPT EXPN check_rcpt RCPT VRFY. H. 9 ( )., token (1) token. R$+ (1) $@ 1 sendmail check_relay TCP SMTP RSET OperatorChars OperatorChars. S0. sendmail 8.12 /usr /usr/lib/mail /etc/mail/cf 79 /etc/mail/cf /usr/lib/mail/sh/check-hostname /usr/lib/mail/sh/check-permissions /usr/sbin. 82 /usr/lib/mail/cf/main-v7sun.mc /etc/mail/cf/cf/main.mc. /usr/lib/mail/cf/subsidiary-v7sun.mc /etc/mail/cf/cf/subsidiary.mc. helpfile /etc/mail/helpfile. (/etc/mail/sendmail.hf). 3 () 119