s11 sendmail guide

Upload: sunny-suen

Post on 03-Jun-2018

234 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 S11 Sendmail Guide

    1/130

    Managing sendmail Services in OracleSolaris 11.1

    Part No: E2899901October 2012

  • 8/12/2019 S11 Sendmail Guide

    2/130

    Copyright 2002, 2012, Oracleand/or itsaffiliates. Allrights reserved.

    This software and related documentation are provided undera license agreement containingrestrictions on use and disclosure and are protected by intellectualproperty laws. Exceptas expresslypermitted in your license agreementor allowed by law, youmay notuse, copy, reproduce, translate, broadcast, modify, license,transmit,distribute,exhibit,perform,publish,or display anypart,in anyform,or by anymeans. Reverse engineering,disassembly,or decompilation of this software,unless required by law for interoperability, is prohibited.

    Theinformationcontained hereinis subject to changewithout noticeand is notwarranted to be error-free. If yound anyerrors,please reportthem to us in writing.

    Ifthis is software or related documentation that is deliveredto theU.S. Government or anyonelicensing it on behalfof theU.S. Government, thefollowing noticeisapplicable:

    U.S. GOVERNMENT END USERS.Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/ordocumentation, deliveredto U.S. Governmentend users are "commercialcomputersoftware" pursuant to the applicable Federal Acquisition Regulation andagency-specic supplemental regulations.As such, use, duplication, disclosure,modication, and adaptation of the programs, including any operating system,integratedsoftware,any programs installed on the hardware, and/or documentation, shallbe subject to license termsand license restrictions applicable to theprograms.No other rightsare granted to theU.S. Government.

    This software or hardware is developedfor general usein a variety of information management applications. Itis notdeveloped or intended foruse in anyinherentlydangerousapplications, includingapplications that maycreate a risk of personal injury. If youuse this software or hardware in dangerousapplications, then youshallbe responsible to take allappropriate fail-safe, backup, redundancy, andothermeasuresto ensure itssafe use. OracleCorporationand itsaffiliatesdisclaimany

    liabilityfor anydamagescausedby useof this software or hardware in dangerousapplications.Oracleand Java areregistered trademarks of Oracleand/or itsaffiliates. Other names maybe trademarks of their respective owners.

    Inteland Intel Xeon aretrademarks or registered trademarks of Intel Corporation.All SPARCtrademarks areused under license andare trademarks or registeredtrademarks of SPARCInternational,Inc. AMD, Opteron, theAMD logo, andthe AMDOpteron logo aretrademarksor registered trademarks of Advanced MicroDevices. UNIX is a registered trademarkof TheOpen Group.

    This software or hardware anddocumentation mayprovide accessto or information on content, products,and services from third parties. OracleCorporationanditsaffiliates arenot responsible forand expresslydisclaimall warranties of anykind with respect to third-party content, products,and services.Oracle Corporationandits affiliates will notbe responsible forany loss, costs,or damages incurred dueto your accessto or useof third-party content, products,or services.

    Ce logiciel et la documentation quilaccompagnesont protgs parles lois surla propritintellectuelle. Ilssont concds souslicenceet soumis desrestrictionsdutilisation et de divulgation.Sauf disposition de votre contrat de licence ou de la loi, vous ne pouvezpas copier, reproduire, traduire,diffuser,modier,breveter,transmettre,distribuer,exposer,excuter, publier ou afficherle logiciel,mme partiellement, sous quelque forme et parquelque procd quece soit. Par ailleurs,il estinterdit de procder toute ingnierie inverse du logiciel,de le dsassemblerou de le dcompiler, except desns dinteroprabilitavecdes logicielstiersou telqueprescrit parla loi.

    Les informations fournies dans ce document sont susceptibles de modication sans pravis. Parailleurs, Oracle Corporationne garantit pas quellessoient exemptesderreurs et vous invite, le caschant, luien faire part parcrit.

    Sice logiciel,ou la documentation quilaccompagne, estconcd sous licence au Gouvernementdes Etats-Unis, ou toute entitqui dlivre la licence de ce logicielou lutilisepour le compte du Gouvernementdes Etats-Unis, la notice suivante sapplique:

    U.S. GOVERNMENT END USERS.Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/ordocumentation, deliveredto U.S. Governmentend users are "commercialcomputersoftware" pursuant to the applicable Federal Acquisition Regulation and

    agency-specic supplemental regulations.As such, use, duplication, disclosure,modication, and adaptation of the programs, including any operating system,integratedsoftware,any programs installed on the hardware, and/or documentation, shallbe subject to license termsand license restrictions applicable to theprograms.No other rightsare granted to theU.S. Government.

    Ce logiciel ou matriel a tdvelopp pour un usage gnral dans le cadre dapplicationsde gestiondes informations. Ce logiciel ou matriel nestpas conu ni nestdestin tre utilis dans desapplications risque, notammentdans desapplications pouvant causerdes dommages corporels. Si vous utilisez ce logiciel ou matrieldans le cadre dapplicationsdangereuses, il estde votre responsabilit de prendre toutesles mesures de secours, de sauvegarde, de redondance et autresmesuresncessaires son utilisation dans des conditionsoptimalesde scurit. Oracle Corporationet ses affilis dclinent touteresponsabilitquant aux dommages causspar lutilisation de ce logiciel ou matriel pource typedapplications.

    Oracleet Java sont desmarques dposes dOracleCorporationet/oude sesaffilis. Tout autre nommentionn peut correspondre desmarques appartenant dautres propritaires quOracle.

    Intelet Intel Xeon sontdes marques ou desmarques dposes dIntel Corporation.Toutes lesmarques SPARCsont utilisessous licence et sont desmarques ou des

    marques dposes de SPARCInternational,Inc. AMD, Opteron, le logo AMDet le logo AMDOpteron sont desmarques ou desmarques dposes dAdvanced MicroDevices. UNIX estune marquedpose dThe Open Group.

    Ce logiciel ou matriel et la documentation quilaccompagnepeuvent fournir desinformations ou desliensdonnant accs descontenus, desproduitset desservicesmanant de tiers.Oracle Corporation et sesaffilis dclinenttouteresponsabilitou garantie expresse quant auxcontenus, produits ou services manant de tiers.Enaucun cas, OracleCorporationet sesaffilis ne sauraienttretenus pour responsablesdes pertessubies, descotsoccasionnsou desdommagescauss parlaccs descontenus, produits ou services tiers,ou leur utilisation.

    121010@25097

  • 8/12/2019 S11 Sendmail Guide

    3/130

    Contents

    Preface...................................................................................................................................................13

    1 Mail Services (Overview) ....................................................................................................................15

    What's New With Mail Services ......................................................................................................... 15

    Changes in this Release ............................................................................................................... 16

    Signicant Changes in Earlier Releases ..................................................................................... 16

    Other sendmail Information Sources .............................................................................................. 17

    Introduction to the Components of Mail Services .......................................................................... 17

    Overview of the Software Components .................................................................................... 17

    Overview of the Hardware Components .................................................................................. 18

    2 Mail Services (Tasks) ...........................................................................................................................21

    Task Map for Mail Services ................................................................................................................ 21

    Planning Your Mail System ................................................................................................................ 22

    Local Mail Only ............................................................................................................................ 23

    Local Mail and a Remote Connection ....................................................................................... 24

    Setting Up Mail Services (Task Map) ................................................................................................ 25

    Setting Up Mail Services ..................................................................................................................... 25

    How to Set Up a Mail Server ....................................................................................................... 26

    How to Set Up a Mail Client ........................................................................................................ 27

    How to Set Up a Mail Host .......................................................................................................... 29

    How to Set Up a Mail Gateway ................................................................................................... 31

    How to Use DNS With sendmail............................................................................................... 32

    Changing the sendmail Conguration (Task Map) ....................................................................... 33

    Changing the sendmail Conguration ............................................................................................ 33

    How to Build a Newsendmail.cf File ...................................................................................... 34Setting Up a Virtual Host ............................................................................................................ 35

    3

  • 8/12/2019 S11 Sendmail Guide

    4/130

    How to Automatically Rebuild a Conguration File ............................................................... 35

    How to Use sendmail in the Open Mode .................................................................................. 36

    How to Set SMTP to Use TLS ..................................................................................................... 37How to Manage Mail Delivery by Using an Alternate Conguration ofsendmail.cf....... 41

    Administering Mail Alias Files (Task Map) ..................................................................................... 42

    Administering Mail Alias Files .......................................................................................................... 43

    How to SetUp anNIS mail.aliases Map ............................................................................... 43

    How to Set Up a Local Mail Alias File ........................................................................................ 44

    How to Create a Keyed Map File ................................................................................................ 46

    Managing the postmaster Alias ................................................................................................ 46

    Administering the Queue Directories (Task Map) ......................................................................... 48

    Administering the Queue Directories ............................................................................................... 49

    How to Display the Contents of the Mail Queue, /var/spool/mqueue ................................ 49

    How to Force Mail Queue Processing in the Mail Queue, /var/spool/mqueue.................. 50

    How to Run a Subset of the Mail Queue, /var/spool/mqueue .............................................. 50

    How to Move the Mail Queue, /var/spool/mqueue ............................................................... 51

    How to Run the Old Mail Queue, /var/spool/omqueue ........................................................ 51

    Administering .forward Files (Task Map) ...................................................................................... 52

    Administering .forward Files ........................................................................................................... 52

    How to Disable .forward Files ................................................................................................... 52

    How to Change the .forwardFile Search Path ....................................................................... 53

    How to Create and Populate /etc/shells ............................................................................... 54Troubleshooting Procedures and Tips for Mail Services (Task Map) ........................................... 54

    Troubleshooting Procedures and Tips for Mail Services ................................................................ 55

    How to Test the Mail Conguration .......................................................................................... 55

    How to Check Mail Aliases ......................................................................................................... 56

    How to Test the sendmail Rule Sets .......................................................................................... 57

    How to Verify Connections to Other Systems ......................................................................... 57

    Logging Error Messages .............................................................................................................. 58

    Other Sources for Mail Diagnostic Information ...................................................................... 59

    Resolving Error Messages ................................................................................................................... 59

    3 Mail Services (Reference) ...................................................................................................................63

    Oracle Solaris Version ofsendmail .................................................................................................. 64

    Flags Used and Not Used to Compile sendmail ...................................................................... 64

    Contents

    Managing sendmailServices in Oracle Solaris 11.1 October20124

  • 8/12/2019 S11 Sendmail Guide

    5/130

    MILTER, Mail Filter API for sendmail........................................................................................ 65

    Alternative sendmail Commands ............................................................................................. 66

    Versions of the Conguration File ............................................................................................. 66Software and Hardware Components of Mail Services .................................................................. 67

    Software Components ................................................................................................................. 67

    Hardware Components ............................................................................................................... 74

    Mail Service Programs and Files ........................................................................................................ 77

    Enhancement for vacation Utility ............................................................................................ 77

    Contents of the /usr/bin Directory .......................................................................................... 78

    Contents of the /etc/mail Directory ........................................................................................ 78

    Contents of the /etc/mail/cf Directory ................................................................................. 79

    Contents of the /usr/lib Directory .......................................................................................... 81

    Other Files Used for Mail Services ............................................................................................. 82

    Interactions of Mail Programs .................................................................................................... 83

    sendmail Program ....................................................................................................................... 84

    Mail Alias Files ............................................................................................................................. 88.forward Files .............................................................................................................................. 90

    /etc/default/sendmail File ..................................................................................................... 91

    Mail Addresses and Mail Routing ...................................................................................................... 92

    Interactions ofsendmail With Name Services ................................................................................ 93

    sendmail.cf and Mail Domains ................................................................................................ 93

    sendmail and Name Services ..................................................................................................... 94

    Interactions of NIS and sendmail.............................................................................................. 95

    Interactions ofsendmail With NIS and DNS .......................................................................... 96

    Changes in Version 8.14 ofsendmail............................................................................................... 96

    Changes in Version 8.13 ofsendmail............................................................................................... 97

    Support for Running SMTP With TLS in Version 8.13 ofsendmail .................................... 97

    Additional Command-Line Options in Version 8.13 ofsendmail ..................................... 102

    Additional and Revised Conguration File Options in Version 8.13 ofsendmail............ 103

    Additional and Revised FEATURE() Declarations in Version 8.13 ofsendmail ................. 104

    Changes From Version 8.12 ofsendmail....................................................................................... 105

    Support for TCP Wrappers From Version 8.12 ofsendmail ............................................... 106

    submit.cf Conguration File From Version 8.12 ofsendmail........................................... 106

    Additional or Deprecated Command-Line Options From Version 8.12 ofsendmail...... 108

    Additional Arguments for the PidFile and ProcessTitlePrefix Options From Version8.12 ofsendmail......................................................................................................................... 109

    Contents

    5

  • 8/12/2019 S11 Sendmail Guide

    6/130

    Additional Dened Macros From Version 8.12 ofsendmail............................................... 109

    Additional Macros From Version 8.12 ofsendmail.............................................................. 110

    Additional MAX Macros From Version 8.12 ofsendmail....................................................... 111Additional and Revised m4 Conguration Macros From Version 8.12 ofsendmail ......... 111

    Changes to the FEATURE() Declaration From Version 8.12 ofsendmail ........................... 112

    Changes to the MAILER() Declaration From Version 8.12 ofsendmail.............................. 115

    Additional Delivery Agent Flags From Version 8.12 ofsendmail....................................... 116

    Additional Equates for Delivery Agents From Version 8.12 ofsendmail .......................... 116

    Additional Queue Features From Version 8.12 ofsendmail................................................ 117

    Changes for LDAP From Version 8.12 ofsendmail.............................................................. 118

    Change to the Built-In Mailer From Version 8.12 ofsendmail ........................................... 119

    Additional Rule Sets From Version 8.12 ofsendmail ........................................................... 120

    Changes to Files From Version 8.12 ofsendmail .................................................................. 120

    sendmail Version 8.12 and IPv6 Addresses in Conguration ............................................. 121

    Index................................................................................................................................................... 123

    Contents

    Managing sendmailServices in Oracle Solaris 11.1 October20126

  • 8/12/2019 S11 Sendmail Guide

    7/130

    Figures

    FIGURE 11 Typical Electronic Mail Conguration ................................................................... 19

    FIGURE 21 Local Mail Conguration ......................................................................................... 23

    FIGURE 22 Local Mail Conguration Witha UUCP Connection ..........................................24

    FIGURE 31 Gateway Between Different Communications Protocols ..................................... 76

    FIGURE 32 Interactions of Mail Programs ................................................................................. 83

    7

  • 8/12/2019 S11 Sendmail Guide

    8/130

    8

  • 8/12/2019 S11 Sendmail Guide

    9/130

    Tables

    TABLE 31 General sendmail Flags ............................................................................................ 64

    TABLE 32 Maps and Database Types ........................................................................................ 64TABLE 33 OS Flags ...................................................................................................................... 65

    TABLE 34 Generic Flags Not Used in This Version ofsendmail ........................................... 65

    TABLE 35 Alternate sendmail Commands .............................................................................. 66

    TABLE 36 Version Values for the Conguration File ............................................................. 66

    TABLE 37 Top-Level Domains .................................................................................................. 70

    TABLE 38 Conventions for the Format of Mailbox Names .................................................... 72

    TABLE 39 Contents of the /etc/mail/cf Directory Used for Mail Services .......................80

    TABLE 310 Contents of the /usr/lib Directory ....................................................................... 81

    TABLE 311 Other Files Used for Mail Services ........................................................................... 82

    TABLE 312 Conguration File Options for Running SMTP WithTLS .................................. 99

    TABLE 313 Macros for Running SMTP WithTLS ..................................................................101

    TABLE 314 Rule Sets for Running SMTP With TLS ................................................................101

    TABLE 315 Command-Line Options Available in Version 8.13 ofsendmail ......................102TABLE 316 Conguration File Options Available in Version 8.13 ofsendmail ..................103

    TABLE 317 FEATURE() Declarations Available in Version 8.13 ofsendmail .......................104

    TABLE 318 Additional or Deprecated Command-Line Options From Version 8.12 ofsendmail .................................................................................................................. 108

    TABLE 319 Arguments for the PidFile and ProcessTitlePrefix Options ......................109

    TABLE 320 Additional Dened Macros for sendmail ............................................................109

    TABLE 321 Additional Macros Used to Build the sendmail Conguration File .................111

    TABLE 322 Additional MAX Macros ............................................................................................ 111

    TABLE 323 Additional and Revised m4 Conguration Macros for sendmail ......................112

    TABLE 324 Additional and Revised FEATURE() Declarations ................................................112

    TABLE 325 Unsupported FEATURE() Declarations .................................................................115

    TABLE 326 Additional Mailer Flags .......................................................................................... 116

    TABLE 327 Additional Equates for Delivery Agents ...............................................................117TABLE 328 Comparison of Tokens ........................................................................................... 119

    9

  • 8/12/2019 S11 Sendmail Guide

    10/130

    TABLE 329 Additional LDAP Map Flags .................................................................................. 119

    TABLE 330 Possible Values for the First Mailer Argument ....................................................119

    TABLE 331 New Rule Sets ........................................................................................................... 120

    Tables

    Managing sendmailServices in Oracle Solaris 11.1 October201210

  • 8/12/2019 S11 Sendmail Guide

    11/130

    Examples

    EXAMPLE 21 Establishing Automatic Rebuilding ofsubmit.cf ................................................ 36

    EXAMPLE 22 Received: Mail Header ............................................................................................ 41EXAMPLE 23 Address Test Mode Output ...................................................................................... 57

    11

  • 8/12/2019 S11 Sendmail Guide

    12/130

    12

  • 8/12/2019 S11 Sendmail Guide

    13/130

    Preface

    Managing sendmail Services in Oracle Solaris 11.1 is part of a multivolume set that covers a

    signicant part of the Oracle Solaris system administration information. This book assumesthat you have already installed the Oracle Solaris operating system, and you have set up any

    networking software that you plan to use.

    Note This Oracle Solaris release supports systems that use the SPARC and x86 families of

    processor architectures. The supported systems appear in the Oracle Solaris OS: Hardware

    Compatibility Lists. This document cites any implementation differences between the platform

    types.

    Who Should UseThis Book

    This book is intended for anyone responsible for administering one or more systems that run

    the Oracle Solaris release. To use this book, you should have one to two years of UNIX system

    administration experience. Attending UNIX system administration training courses might behelpful.

    Access to Oracle Support

    Oracle customers have access to electronic support through My Oracle Support. For

    information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=infoor visit

    http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trsif you are hearing impaired.

    Typographic Conventions

    The following table describes the typographic conventions that are used in this book.

    13

    http://www.oracle.com/webfolder/technetwork/hcl/index.htmlhttp://www.oracle.com/webfolder/technetwork/hcl/index.htmlhttp://www.oracle.com/webfolder/technetwork/hcl/index.htmlhttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=infohttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=trshttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=trshttp://www.oracle.com/pls/topic/lookup?ctx=acc&id=infohttp://www.oracle.com/webfolder/technetwork/hcl/index.htmlhttp://www.oracle.com/webfolder/technetwork/hcl/index.html
  • 8/12/2019 S11 Sendmail Guide

    14/130

    TABLEP1 Typographic Conventions

    Typeface Description Example

    AaBbCc123 The names of commands, les, and directories,

    and onscreen computer output

    Edityour .login le.

    Usels -ato list all les.

    machine_name% you have mail.

    AaBbCc123 What you type, contrasted with onscreen

    computer output

    machine_name% su

    Password:

    aabbcc123 Placeholder:replacewith a realname orvalue The command toremove a le is rmlename.

    AaBbCc123 Booktitles, new terms, and terms to beemphasized

    Read Chapter 6 in the User's Guide.

    A cache isa copythat isstored

    locally.

    Do notsave the le.

    Note: Some emphasized items

    appear bold online.

    Shell Prompts in Command ExamplesThe following table shows the default UNIX system prompt and superuser prompt for shellsthat are included in the Oracle Solaris OS. Note that the default system prompt that is displayedin command examples varies, depending on the Oracle Solaris release.

    TABLEP2 ShellPrompts

    Shell Prompt

    Bashshell, Korn shell, and Bourne shell $

    Bashshell, Korn shell, and Bourne shell for superuser #

    C shell machine_name%

    C shell for superuser machine_name#

    Preface

    Managing sendmailServices in Oracle Solaris 11.1 October201214

  • 8/12/2019 S11 Sendmail Guide

    15/130

    Mail Services (Overview)

    Setting up and maintaining an electronic mail service involves complex tasks that are critical to

    the daily operation of your network. As a network administrator, you might need to expand an

    existing mail service. Alternately, you might need to set up a mail service on a new network or a

    subnet. The chapters on mail services can help you plan and set up a mail service for your

    network. This chapter provides links to descriptions of new features in sendmail,aswellasalist

    of other sources of information. The chapter also provides overviews of the software and

    hardware components that are required to establish a mail service.

    What's New With Mail Services on page 15 Other sendmail Information Sources on page 17 Introduction to the Components of Mail Services on page 17

    See Chapter 2, Mail Services (Tasks), for procedural information about how to set up and

    administer mail services. For details, refer to Task Map for Mail Services on page 21.

    See Chapter 3, Mail Services (Reference), for a more detailed description of the components of

    mail services. This chapter also describes the mail service programs and les, the mail routing

    process, the interactions ofsendmail with name services, and the features in version 8.13 of

    sendmail.See Changes in Version 8.13 ofsendmailonpage97.

    What's New With Mail Services

    This section provides information about new features in various Oracle Solaris releases.

    1C H A P T E R 1

    15

  • 8/12/2019 S11 Sendmail Guide

    16/130

    Changes in this Release

    The following changes have been made in the Oracle Solaris 11 release:

    The default version of sendmail has been updated to 8.14.5.

    The sendmail instance was split into two instances to provide better management of the

    traditional daemon (svc:/network/smtp:sendmail) and the client queue runner

    (svc:/network/smtp:sendmail-client).

    The system can be congured to automatically rebuild the sendmail.cf and the submit.mc

    conguration les. The required steps are documented in How to Automatically Rebuild a

    Conguration File on page 35. By default, the sendmail daemon runs in the new local daemon mode. The localonly mode

    only accepts incoming mail from the local host or loopback SMTP connections. For

    instance, mail from a cron job or between local users would be accepted. Outbound mail is

    routed as expected, only the incoming mail is changed. The -bl option is used to select the

    local-only mode, also known as the Become Local mode. For more information about this

    mode, see the sendmail(1M) man page. For instructions on how to change back to the -bd

    or Become Daemon mode, see How to Usesendmail

    in the Open Mode on page 36. The -t and -u options to the makemap command now work as expected. The delimiter

    declared with the -t option is used as the delimiter, even with the -u option. Previously a

    space would be used as a delimiter if the -u option was used, regardless of the delimiter

    dened by the -t option. See the makemap(1M) man page for more information about these

    options.

    Significant Changes in Earlier Releases sendmail supports SMTP using Transport Layer Security (TLS). For more information, see

    the following:

    Support for Running SMTP With TLS in Version 8.13 ofsendmailonpage97 Howto Set SMTP to Use TLS on page 37

    sendmailversion 8.13 was added. For information about version 8.13 and other changes,see the following:

    Flags Used and Not Used to Compile sendmailonpage64 MILTER, Mail Filter API for sendmailonpage65 Versions of the Conguration File on page 66 Enhancement for vacation Utility on page 77 Contents of the /etc/mail/cf Directory on page 79 Changes in Version 8.13 ofsendmailonpage97 Support for TCP Wrappers From Version 8.12 ofsendmailonpage106

    What's NewWith MailServices

    Managing sendmailServices in Oracle Solaris 11.1 October201216

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Msendmail-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Msendmail-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mmakemap-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mmakemap-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mmakemap-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Msendmail-1m
  • 8/12/2019 S11 Sendmail Guide

    17/130

    The mail service is managed by the Service Management Facility. Administrative actions onthis service, such as enabling, disabling, or restarting, can be performed by using the svcadmcommand. The service's status can be queried by using the svcs command. For more

    information about the Service Management Facility, see the smf(5) man page and Chapter 2,Managing Services (Overview), inManaging Services and Faults in Oracle Solaris 11.1.

    Other sendmail Information SourcesThe following is a list of additional information sources about sendmail.

    Costales, Bryan. sendmail, Third Edition. O'Reilly & Associates, Inc., 2002. Home page for sendmail http://www.sendmail.org.

    FAQ for sendmail http://www.sendmail.org/faq.

    README for newsendmail conguration les http://www.sendmail.org/m4/readme.html.

    A guide for issues that are related to migrating to more recent versions ofsendmail http://www.sendmail.org/vendor/sun/.

    Introduction to the Components of Mail ServicesMany software and hardware components are required to establish a mail service. Thefollowing sections give a quick introduction to these components. These sections also providesome of the terms that are used to describe the components.

    The rst section, Overview of the Software Components on page 17, denes the terms thatare used when discussing the software parts of the mail delivery system. The next section,Overview of the Hardware Components on page 18, focuses on the functions of the hardwaresystems in a mail conguration.

    Overview of the Software Components

    The following table introduces some of the software components of a mail system. Refer toSoftware Components on page 67 for a complete description of all of the softwarecomponents.

    Component Description

    .forward les Files that you can set up in a user's home directory to redirect

    mail or to send mail to a program automatically

    Introduction to the Components of MailServices

    Chapter 1 Mail Services (Overview) 17

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN5smf-5http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN5smf-5http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVSVFhbrunlevels-25516http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVSVFhbrunlevels-25516http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVSVFhbrunlevels-25516http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVSVFhbrunlevels-25516http://www.sendmail.org/http://www.sendmail.org/faqhttp://www.sendmail.org/faqhttp://www.sendmail.org/m4/readme.htmlhttp://www.sendmail.org/m4/readme.htmlhttp://www.sendmail.org/m4/readme.htmlhttp://www.sendmail.org/vendor/sun/http://www.sendmail.org/vendor/sun/http://www.sendmail.org/vendor/sun/http://www.sendmail.org/m4/readme.htmlhttp://www.sendmail.org/m4/readme.htmlhttp://www.sendmail.org/faqhttp://www.sendmail.org/http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVSVFhbrunlevels-25516http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVSVFhbrunlevels-25516http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN5smf-5
  • 8/12/2019 S11 Sendmail Guide

    18/130

    Component Description

    mailbox A le on a mail server that is the nal destination for email

    messagesmail a ddresses Address that c ontains the n ame o f the r ecipient and t he s ystem

    to which a mail message is delivered

    mail aliases An alternate name that is used in a mail address

    mail queue A collection of mail messages that needs to be processed by the

    mail server

    postmaster A special mail alias that is used to report problems and to ask

    questions about the mailservice

    sendmail conguration le A le that contains all the information necessary for mail

    routing

    Overview of the Hardware Components

    A mail conguration requires three elements, which you can combine on the same system or

    provide in separate systems.

    A mail host A system that is congured to handle email addresses that are difficult to

    resolve

    A minimum of one mail server A system that is congured to hold one or more mailboxes

    Mail clients Systems that access mail from a mail server

    If users are to communicate with networks outside your domain, you must also add a fourth

    element, a mail gateway.

    Figure 11 shows a typical electronic mail conguration, using the three basic mail elements

    plus a mail gateway.

    Introduction to the Components of MailServices

    Managing sendmailServices in Oracle Solaris 11.1 October201218

  • 8/12/2019 S11 Sendmail Guide

    19/130

    Each element is described in detail in Hardware Components on page 74.

    FIGURE 11 Typical Electronic Mail Conguration

    Client Client

    Other domains

    Mail Gateway

    Mail Host

    Mail Server

    . . .. . .

    Mail Server

    Mailboxes

    Client Client

    Mailboxes

    Introduction to the Components of MailServices

    Chapter 1 Mail Services (Overview) 19

  • 8/12/2019 S11 Sendmail Guide

    20/130

    20

  • 8/12/2019 S11 Sendmail Guide

    21/130

    Mail Services (Tasks)

    This chapter describes how to set up and administer mail services. If you are not familiar withadministering mail services, read Chapter 1, Mail Services (Overview), for an introduction tothe components of mail services. This chapter also provides a description of a typical mailservice conguration, as shown in Figure 11. The following list can help you nd groups ofrelated procedures that are covered in this chapter.

    Task Map for Mail Services on page 21 Setting Up Mail Services (Task Map) on page 25 Changing the sendmail Conguration (Task Map) on page 33 Administering Mail Alias Files (Task Map) on page 42 Administering the Queue Directories (Task Map) on page 48 Administering .forward Files (Task Map) on page 52 Troubleshooting Procedures and Tips for Mail Services (Task Map) on page 54

    See Chapter 3, Mail Services (Reference), for a more detailed description of the components ofmail services. This chapter also describes the mail service programs and les, the mail routingprocess, the interactions ofsendmail with name services, and the features in version 8.13 ofsendmail that are not fully described in the sendmail(1M) man page.

    Task Map for Mail ServicesThe following table refers you to other task maps that focus on a specic group of procedures.

    Task Description For Instructions

    Setting u p mail s ervices Use t hese p rocedures t o set u p each

    component of your mail service. Learn

    how tosetup a mailserver,a mailclient,a

    mail host, and a mail gateway. Learn how

    to use DNS with sendmail.

    Setting Up Mail Services (Task Map) on

    page 25

    2C H A P T E R 2

    21

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Msendmail-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Msendmail-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Msendmail-1m
  • 8/12/2019 S11 Sendmail Guide

    22/130

  • 8/12/2019 S11 Sendmail Guide

    23/130

    PlanningYourMail System

  • 8/12/2019 S11 Sendmail Guide

    24/130

    A server that is designated as the mail host. If you are running NIS, you can make this

    designation by adding mailhost.domain-name to the /etc/hosts le on the mail host. If

    you are running another name service, such as DNS or LDAP, you must provide additional

    information in the /etc/hosts le. See How to Set Up a Mail Host on page 29. If you are using a name service other than NIS, you need matching /etc/mail/aliases les

    on any system that has a local mailbox.

    Enough space in /var/mail on each mail client system to hold the mailboxes.

    For task information about setting up your mail service, refer to Setting Up Mail Services on

    page 25. If you are looking for a particular procedure that is related to setting up your mail

    service, refer to Setting Up Mail Services (Task Map) on page 25.

    Local Mail and a Remote Connection

    The most common mail conguration in a small network is shown in Figure 22. One system

    includes the mail server, the mail host, and the mail gateway that provides the remote

    connection. Mail is distributed by using the /etc/mail/aliases les on the mail gateway. Noname service is required.

    In this conguration, you can assume that the mail clients mount their mail les from/var/mail on the mail host. To set up this kind of mail conguration, you need the following.

    The default /etc/mail/sendmail.cf le on each mail client system. This le does not

    require any editing.

    FIGURE 22 Local Mail Conguration With a UUCP Connection

    Mail Client Mail Client

    Mail ClientMail Gateway

    remote

    g y

    Managing sendmailServices in Oracle Solaris 11.1 October201224

    Setting Up MailServices

  • 8/12/2019 S11 Sendmail Guide

    25/130

    A server that is designated as the mail host. If you are running NIS, you can make thisdesignation by adding mailhost.domain-name to the /etc/hosts le on the mail host. Ifyou are running another name service, such as DNS or LDAP, you must provide additional

    information in the /etc/hosts le. See How to Set Up a Mail Host on page 29. If you are using a name service other than NIS, you need matching /etc/mail/aliases les

    on any system that has a local mailbox.

    Enough space in /var/mail on the mail server to hold the client mailboxes.

    For task information about setting up your mail service, refer to Setting Up Mail Services onpage 25. If you are looking for a particular procedure that is related to setting up your mailservice, refer to Setting Up Mail Services (Task Map) on page 25.

    Setting Up Mail Services (Task Map)The following table describes the procedures for setting up mail services.

    Task Description For Instructions

    Setting u p a mail s erver Steps to e nable a server t o route m ail Howto Set Up a MailServer onpage 26

    Setting u p a mail c lient Steps to e nable a user t o receive m ail Howto Set Upa MailClienton page27

    Setting u p a mail h ost Steps to e stablish a mail host that can

    resolve email addresses

    Howto Set Up a MailHoston page29

    Setting up a mail gateway Steps to manage c ommunication w ith

    networks outside your domain

    How to Set Up a Mail Gateway on

    page 31

    Using DNSwith sendmail Steps to enable DNS host lookups How to Use DNS With sendmail onpage 32

    Setting Up Mail ServicesYou can readily set up a mail service if your site does not provide connections to email servicesoutside your company or if your company is in a single domain.

    Mail requires two types of congurations for local mail. Refer to Figure 21 in Local MailOnly on page 23 for a representation of these congurations. Mail requires two morecongurations for communication with networks outside your domain. Refer to Figure 11 inOverview of the Hardware Components on page 18 or Figure 22 in Local Mail and aRemote Connection on page 24 for a representation of these congurations. You can combinethese congurations on the same system or provide these congurations on separate systems.For example, if your mail host and mail server functions are on the same system, follow thedirections in this section for setting up that system as a mail host. Then, follow the directions in

    this section for setting up the same system as a mail server.

    Chapter 2 Mail Services (Tasks) 25

    Setting Up MailServices

  • 8/12/2019 S11 Sendmail Guide

    26/130

    Note The following procedures for setting up a mail server and mail client apply when

    mailboxes are NFS mounted. However, mailboxes typically are maintained in locally mounted

    /var/mail directories, which eliminates the need for the following procedures.

    HowtoSetUpaMailServer

    No special steps are required to set up a mail server that is only serving mail for local users. The

    user must have an entry in the password le or in the namespace. Also, for mail to be delivered,

    the user should have a local home directory for checking the ~/.forward le. For this reason,home directory servers are often set up as the mail server. Hardware Components on page 74

    in Chapter 3, Mail Services (Reference), provides more information about the mail server.

    The mail server can route mail for many mail clients. This type of mail server must have

    adequate spooling space for client mailboxes.

    Note The mail.local program automatically creates mailboxes in the /var/mail directory therst time a message is delivered. You do not need to create individual mailboxes for your mail

    clients.

    For clients to access their mailboxes, the /var/mail directory should be available for remote

    mounting. Alternately, a service such as Post Office Protocol (POP) or Internet Message Access

    Protocol (IMAP) should be available from the server. The following task shows you how to set

    up a mail server byusing the /var/mail directory. To provide conguration guidelines for POP

    or IMAP is beyond the scope of this document.

    For the following task, ensure that the /etc/dfs/dfstab le shows that the /var/mail

    directory is exported.

    Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle

    Solaris 11.1 Administration: Security Services.

    Stop sendmail.

    # svcadm disable -t network/smtp:sendmail

    Check if the /var/mail directory is available forremote access.

    # share

    If the /var/mail directory is listed, proceed to step 5.

    1

    2

    3

    Managing sendmailServices in Oracle Solaris 11.1 October201226

    Setting Up MailServices

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28
  • 8/12/2019 S11 Sendmail Guide

    27/130

    If the /var/mail directory is not listed or if no list appears, continue with the appropriate

    substep.

    a. (Optional) If no listappears, start NFS services.Follow the procedure, How to Set Up Automatic File-System Sharing inManaging

    Network File Systems in Oracle Solaris 11.1, to use the /var/mail directory to start NFS

    services.

    b. (Optional) If the /var/mail directory is not included in the list, add the directory to

    /etc/dfs/dfstab.

    Add the following command line to the /etc/dfs/dfstab le.share -F nfs -o rw /var/mail

    Make the le system available for mounting.

    # shareall

    Ensure that your name service has been started.

    a. (Optional) If you are running NIS, use this command.# ypwhich

    For more information, refer to the ypwhich(1) man page.

    b. (Optional) If you are running DNS, use this command.

    # nslookup hostname

    hostname Use your host name.

    For more information, refer to the nslookup(1M) man page.

    c. (Optional) If you are running LDAP, use this command.

    # ldaplist

    For more information, refer to the ldaplist(1) man page.

    Restart sendmail.

    # svcadm enable network/smtp:sendmail

    HowtoSetUpaMailClientA mail client is a user of mail services with a mailbox on a mail server. Additionally, the mailclient has a mail alias in the /etc/mail/aliases le that points to the location of the mailbox.

    4

    5

    6

    Chapter 2 Mail Services (Tasks) 27

    Setting Up MailServices

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVNFSrfsadmin-57http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVNFSrfsadmin-57http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVNFSrfsadmin-57http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVNFSrfsadmin-57http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ypwhich-1http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ypwhich-1http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mnslookup-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mnslookup-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ldaplist-1http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ldaplist-1http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ldaplist-1http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mnslookup-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ypwhich-1http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVNFSrfsadmin-57http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SVNFSrfsadmin-57
  • 8/12/2019 S11 Sendmail Guide

    28/130

    Note You can also perform the task of setting up a mail client by using a service such as PostOffice Protocol (POP) or Internet Message Access Protocol (IMAP). However, to provide

    conguration guidelines for POP or IMAP is beyond the scope of this document.

    Become an administrator on the mail client's system.

    For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    Stop sendmail.

    # svcadm disable -t network/smtp:sendmail

    Ensure that a /var/mail mount point exists on the mail client's system.

    The mount point should have been created during the installation process. You can use ls toensure that the le system exists. The following example shows the response that you receive ifthe le system has not been created.

    # ls -l /var/mail/var/mail not found

    Ensure thatno les are in the /var/mail directory.

    If mail les do exist in this directory, you should move them so that they are not covered whenthe /var/mail directory is mounted from the server.

    Mount the /var/mail directory from the mail server.

    You can mount the mail directory automatically or at boot time.

    a. (Optional) Mount /var/mail automatically.

    Add an entry such as the following to the /etc/auto_direct le.

    /var/mail -rw,hard,actimeo=0 server:/var/mail

    server Use the assigned server name.

    b. (Optional) Mount /var/mail at boot time.

    Add the following entry to the /etc/vfstab le. This entry permits the /var/mail directory

    on the mail server that is specied to mount the local /var/mail directory.

    server:/var/mail - /var/mail nfs - no rw,hard,actimeo=0

    The client's mailbox is automatically mounted whenever the system is rebooted. If you arenot rebooting the system, type the following command to mount the client mailbox.

    # mountall

    1

    2

    3

    4

    5

    Managing sendmailServices in Oracle Solaris 11.1 October201228

    Setting Up MailServices

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28
  • 8/12/2019 S11 Sendmail Guide

    29/130

    Caution For mailbox locking and mailbox access to work properly, you must include theactimeo=0 option when mounting mail from an NFS server.

    Update /etc/hosts.

    Edit the /etc/hosts le and add an entry for the mail server. This step is not required if you areusing a name service.

    # cat /etc/hosts## Internet host table#

    ..IP-address mailhost mailhost mailhost.example.com

    IP-address Use the assigned IP addresses.

    example.com Use the assigned domain.

    mailhost Use the assigned mailhost.

    For more information, refer to the hosts(4) man page.

    Addanentryfortheclienttooneofthealiasles.

    Refer to Administering Mail Alias Files (Task Map) on page 42 for a task map aboutadministering mail alias les. Note that the mail.local program automatically createsmailboxes in the /var/mail directory the rst time a message is delivered. You do not need tocreate individual mailboxes for your mail clients.

    Restart sendmail.

    # svcadm enable network/smtp:sendmail

    HowtoSetUpaMailHostA mail host resolves email addresses and reroutes mail within your domain. A good candidatefor a mail host is a system that provides your network with a remote connection or connectsyour network to a parent domain. The following procedure shows you how to set up a mail host.

    Become an administrator on the mail host system.

    For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    Stop sendmail.

    # svcadm disable -t network/smtp:sendmail

    6

    7

    8

    1

    2

    Chapter 2 Mail Services (Tasks) 29

    Setting Up MailServices

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN4hosts-4http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN4hosts-4http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN4hosts-4
  • 8/12/2019 S11 Sendmail Guide

    30/130

    Verify the host-name conguration.

    Run the check-hostname script to verify that sendmail can identify the fully qualied hostname for this server.

    % /usr/sbin/check-hostnamehostname phoenix OK: fully qualified as phoenix.example.com

    If this script is not successful in identifying the fully qualied host name, you need to add thefully qualied host name as the rst alias for the host in /etc/hosts.

    Update the /etc/hosts le.

    Choose the step that is appropriate for you.

    a. (Optional) If you are using NIS, edit the /etc/hosts leonthesystemthatistobethenew

    mail host.

    Add the word mailhost and mailhost.domain after the IP address and system name of themail host system.

    IP-address mailhost mailhost mailhost.domain loghost

    IP-address Use the assigned IP address.

    mailhost Use the system name of the mail host system.

    domain Use the expanded domain name.

    The system is now designated as a mail host. The domain should be identical to the stringthat is given as the subdomain name in the output of the following command.

    % /usr/lib/sendmail -bt -d0

  • 8/12/2019 S11 Sendmail Guide

    31/130

    b. (Optional) If you are not using NIS, edit the /etc/hosts le on each system in the network.

    Create the following entry.

    IP-address mailhost mailhost mailhost.domain loghost

    Restart sendmail.

    # svcadm enable network/smtp:sendmail

    Test your mail conguration.

    See How to Test the Mail Conguration on page 55 for instructions.

    Note For further information about mail hosts, refer to Hardware Components on page 74in Chapter 3, Mail Services (Reference).

    HowtoSetUpaMailGatewayA mail gateway manages communication with networks outside your domain. The mailer onthe sending mail gateway can match the mailer on the receiving system.

    A good candidate for a mail gateway is a system that is attached to Ethernet and phone lines.Another good candidate is a system that is congured as a router to the Internet. You cancongure the mail host or another system as the mail gateway. You might choose to conguremore than one mail gateway for your domain. If you have UNIX-to-UNIX Copy Program(UUCP) connections, you should congure the system (or systems) with UUCP connections asthe mail gateway.

    Become an administrator on the mail gateway system.For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    Stop sendmail.

    # svcadm disable -t network/smtp:sendmail

    Verify the host-name conguration.

    Run the check-hostname script to verify that sendmail can identify the fully qualied hostname for this server.

    # /usr/sbin/check-hostnamehostname phoenix OK: fully qualified as phoenix.example.com

    If this script is not successful in identifying the fully qualied host name, you need to add thefully qualied host name as the rst alias for the host in /etc/hosts. If you need help with thisstep, refer to Step 4 ofHowto Set Up a Mail Host on page 29.

    5

    6

    1

    2

    3

    Chapter 2 Mail Services (Tasks) 31

    Setting Up MailServices

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28
  • 8/12/2019 S11 Sendmail Guide

    32/130

    Ensure that your name service has been started.

    a. (Optional) If you are running NIS, use this command.

    # ypwhich

    For more information, refer to the ypwhich(1) man page.

    b. (Optional) If you are running DNS, use this command.

    # nslookup hostname

    hostname Use your host name.

    For more information, refer to the nslookup(1M) man page.

    c. (Optional) If you are running LDAP, use this command.

    # ldaplist

    For more information, refer to the ldaplist(1) man page.

    Restart sendmail.

    # svcadm enable network/smtp:sendmail

    Test your mail conguration.

    See How to Test the Mail Conguration on page 55 for instructions.

    Note For more information about the mail gateway, refer to Hardware Components onpage 74 in Chapter 3, Mail Services (Reference).

    HowtoUseDNSWith sendmailThe DNS name service does not support aliases for individuals. This name service does supportaliases for hosts or domains that use Mail Exchanger (MX) records and CNAME records. You canspecify host names, domain names, or both names in the DNS database. For more informationabout sendmail and DNS, see Interactions ofsendmail With Name Services on page 93 inChapter 3, Mail Services (Reference), or see the Oracle Solaris Administration: Naming and

    Directory Services.

    Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    4

    5

    6

    1

    Managing sendmailServices in Oracle Solaris 11.1 October201232

    Changing the sendmail Conguration

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ypwhich-1http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ypwhich-1http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mnslookup-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mnslookup-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ldaplist-1http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ldaplist-1http://www.oracle.com/pls/topic/lookup?ctx=E23824&id=SYSADV5http://www.oracle.com/pls/topic/lookup?ctx=E23824&id=SYSADV5http://www.oracle.com/pls/topic/lookup?ctx=E23824&id=SYSADV5http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E23824&id=SYSADV5http://www.oracle.com/pls/topic/lookup?ctx=E23824&id=SYSADV5http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ldaplist-1http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mnslookup-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1ypwhich-1
  • 8/12/2019 S11 Sendmail Guide

    33/130

    Check for a mailhost and mailhost.domain entry.

    Use nslookup to ensure that an entry exists for mailhost and mailhost.domain in the DNSdatabase. For more information, refer to the nslookup(1M) man page.

    Changing the sendmail Configuration (Task Map)

    Task Description For Instructions

    Building a sendmail congurationle Use thisprocedureto modifyyour

    sendmail.cf le. An example of how toenable domain masquerading is included.

    How to Build a Newsendmail.cf File on

    page 34

    Setting u p a virtual h ost Steps t o congure s endmail s o that m ail i s

    accepted for more than one domain.

    Setting Up a Virtual Host on page 35

    Setting up automatic rebuilding of the

    sendmail conguration le

    Use this procedure to modify the sendmail

    service so that the sendmail.cf and

    submit.mc conguration les are

    automatically rebuilt after an upgrade.

    How to Automatically Rebuild a

    Conguration File on page 35

    Running sendmail intheopen mode. Use thisprocedureto modifythesendmail

    service properties to enable the open mode.

    How to Use sendmail in the Open Mode

    onpage 36

    Setting SMTP to use Transport Layer

    Security (TLS)

    Use this procedure to enable SMTP to have

    secure connections with TLS.

    Howto Set SMTPto Use TLSon page37

    Managing maildelivery with an alternate

    conguration

    Use this procedure to prevent mail delivery

    problems that can occur if the master

    daemon is disabled.

    How to Manage Mail Delivery by Using

    an Alternate Conguration of

    sendmail.cfonpage41

    Changing the sendmail ConfigurationHow to Build a Newsendmail.cf File on page 34 shows you how to build the congurationle. Although you can still use older versions ofsendmail.cf les, the best practice is to use thenew format.

    For more details, refer to the following.

    /etc/mail/cf/README provides a complete description of the conguration process.

    http://www.sendmail.org provides online information about sendmail conguration.

    Versions of the Conguration File on page 66 and sendmail Conguration File onpage 87, in Chapter 3, Mail Services (Reference), provide some guidance.

    Additional and Revised m4 Conguration Macros From Version 8.12 ofsendmail on

    page 111 is also helpful.

    2

    Chapter 2 Mail Services (Tasks) 33

    Changing the sendmail Conguration

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mnslookup-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mnslookup-1mhttp://www.sendmail.org/http://www.sendmail.org/http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mnslookup-1m
  • 8/12/2019 S11 Sendmail Guide

    34/130

    HowtoBuildaNew sendmail.cf File

    The following procedure shows you how to build a new conguration le.

    Note /usr/lib/mail/cf/main-v7sun.mc isnow/etc/mail/cf/cf/sendmail.mc.

    Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle

    Solaris 11.1 Administration: Security Services.

    Stop sendmail.

    # svcadm disable -t network/smtp:sendmail

    Make a copy of the conguration les that you are changing.

    # cd /etc/mail/cf/cf

    # cp sendmail.mc myhost.mc

    myhost Select a new name for your .mc le.

    Edit the new conguration les (for example, myhost.mc), as necessary.

    For example, add the following command line to enable domain masquerading.

    # cat myhost.mc..MASQUERADE_AS(host.domain)

    host.domain Use the desired host name and domain name.

    In this example, MASQUERADE_AS causes sent mail to be labeled as originating from host.domain,rather than $j.

    Build the conguration le by using m4.

    # make myhost.cf

    Test the new conguration le by using the -C option to specify the new le.

    # /usr/lib/sendmail -C myhost.cf -v testaddr

  • 8/12/2019 S11 Sendmail Guide

    35/130

    Restartthe sendmail service.

    # svcadm enable network/smtp:sendmail

    Setting Up a Virtual Host

    If you need to assign more than one IP address to a host, see this Web site:http://www.sendmail.org/tips/virtualHosting. This site provides complete instructionsabout how to use sendmail to set up a virtual host. However, in the Sendmail Congurationsection, do not perform step 3b, as shown in the following.

    # cd sendmail-VERSION/cf/cf# ./Build mailserver.cf# cp mailserver.cf /etc/mail/sendmail.cf

    Instead, for the Oracle Solaris operating system, perform the following steps.

    # cd /etc/mail/cf/cf# make mailserver.cf# cp mailserver.cf /etc/mail/sendmail.cf

    mailserver Use the name of the .cf le.

    Changing the sendmail Conguration on page 33 outlines the same three steps as part of thebuild process.

    After you have generated your /etc/mail/sendmail.cf le, you can continue with the nextsteps to create a virtual user table.

    How to Automatically Rebuild a Configuration FileIf you have built your own copy ofsendmail.cf or submit.cf, the conguration le is notreplaced during the upgrade process. The following procedure shows how to congure thesendmail service properties so that the sendmail.cf le is automatically rebuilt for you. Forinstructions on how to automatically build the submit.cf conguration le, see Example 21.You may combine these procedures if you need to build both les.

    Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    Set the sendmail properties.

    # svccfg -s sendmailsvc:/network/smtp:sendmail> setprop config/path_to_sendmail_mc=/etc/mail/cf/cf/myhost.mcsvc:/network/smtp:sendmail> quit

    8

    1

    2

    Chapter 2 Mail Services (Tasks) 35

    http://www.sendmail.org/tips/virtualHostinghttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.sendmail.org/tips/virtualHosting
  • 8/12/2019 S11 Sendmail Guide

    36/130

    Changing the sendmail Conguration

  • 8/12/2019 S11 Sendmail Guide

    37/130

    HowtoSetSMTPtoUseTLSSMTP can use Transport Layer Security (TLS) in version 8.13 ofsendmail. This service to

    SMTP servers and clients provides private, authenticated communications over the Internet, aswell as protection from eavesdroppers and attackers. Note that this service is not enabled bydefault.

    The following procedure uses sample data to show you how to set up the certicates that enablesendmail to use TLS. For more information, see Support for Running SMTP With TLS inVersion 8.13 ofsendmailonpage97.

    Become an administrator.For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    Stop sendmail.

    # svcadm disable -t network/smtp:sendmail

    Set up the certicates that enable sendmail to use TLS.

    a. Complete the following:

    # 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. Use your preferred text editor to change the dir value in the openssl.cnf le from

    /etc/openssl to /etc/mail/certs/CA.

    c. Usethe openssl command-line tool to implementTLS.

    Note that the following command line generates interactive text.

    # openssl req -new -x509 -keyout private/cakey.pem -out cacert.pem -days 365 \-config openssl.cnfGenerating a 1024 bit RSA private key.....................................++++++.....................................++++++writing new private key to private/cakey.pemEnter PEM pass phrase:Verifying - Enter PEM pass phrase:-----You are about to be asked to enter information that will be incorporatedinto 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,

    1

    2

    3

    Chapter 2 Mail Services (Tasks) 37

    Changing the sendmail Conguration

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28
  • 8/12/2019 S11 Sendmail Guide

    38/130

    If you enter ., the field will be left blank.-----Country Name (2 letter code) []:USState or Province Name (full name) []:California

    Locality Name (eg, city) []:Menlo ParkOrganization Name (eg, company) [Unconfigured OpenSSL Installation]:OracleOrganizational Unit Name (eg, section) []:SolarisCommon Name (eg, YOUR name) []:somehost.somedomain.example.comEmail Address []:[email protected]

    req This command creates and processes certicate requests.

    -new This req option generates a new certicate request.

    -x509 This req option creates a self-signed certicate.

    -keyout private/cakey.pem This req option enables you to assignprivate/cakey.pem as the le name for your newlycreated private key.

    -out cacert.pem This req option enables you to assign cacert.pem as youroutput le.

    -days 365 This req option enables you to certify the certicate for

    365 days. The default value is 30.-config openssl.cnf This req option enables you to specifyopenssl.cnf as

    the conguration le.

    Note that this command requires that you provide the following:

    Country Name, such asUS.

    State or Province Name, such as California.

    Locality Name, such as Menlo Park. Organization Name, such asOracle.

    Organizational Unit Name, such as Solaris.

    Common Name, which is the machine's fully qualied host name. For more information,see the check-hostname(1M) man page.

    Email Address, such [email protected].

    (Optional) If you need a new secureconnection, make a newcerticate and sign the new

    certicate with the certicate authority.

    a. Make a new certicate.

    # cd /etc/mail/certs/CA# openssl req -nodes -new -x509 -keyout newreq.pem -out newreq.pem -days 365 \-config openssl.cnfGenerating a 1024 bit RSA private key

    ..............++++++

    4

    Managing sendmailServices in Oracle Solaris 11.1 October201238

    Changing the sendmail Conguration

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mcheck-hostname-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mcheck-hostname-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mcheck-hostname-1m
  • 8/12/2019 S11 Sendmail Guide

    39/130

    ..............++++++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 blankFor some fields there will be a default value,If you enter ., the field will be left blank.-----Country Name (2 letter code) []:USState or Province Name (full name) []:CaliforniaLocality Name (eg, city) []:Menlo ParkOrganization Name (eg, company) [Unconfigured OpenSSL Installation]:OracleOrganizational Unit Name (eg, section) []:Solaris

    Common Name (eg, YOUR name) []:somehost.somedomain.example.comEmail Address []:[email protected]

    This command requires that you provide the same information that you provided in step 3c.

    Note that in this example, the certicate and private key are in the le newreq.pem.

    b. Sign the new certicate with the certicate authority.

    # cd /etc/mail/certs/CA# openssl x509 -x509toreq -in newreq.pem -signkey newreq.pem -out tmp.pemGetting request Private KeyGenerating certificate request# openssl ca -config openssl.cnf -policy policy_anything -out newcert.pem -infiles tmp.pemUsing configuration from openssl.cnfEnter pass phrase for /etc/mail/certs/CA/private/cakey.pem:Check that the request matches the signatureSignature okCertificate Details:

    Serial Number: 1 (0x1)Validity

    Not Before: Jun 23 18:44:38 2005 GMTNot After : Jun 23 18:44:38 2006 GMT

    Subject:countryName = USstateOrProvinceName = CalifornialocalityName = Menlo ParkorganizationName = OracleorganizationalUnitName = SolariscommonName = somehost.somedomain.example.comemailAddress = [email protected]

    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:68DirName:/C=US/ST=California/L=Menlo Park/O=Oracle/OU=Solaris/\[email protected]/[email protected]

    serial:00

    Chapter 2 Mail Services (Tasks) 39

    Changing the sendmail Conguration

  • 8/12/2019 S11 Sendmail Guide

    40/130

    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]yWrite out database with 1 new entriesData Base Updated# rm -f tmp.pem

    In this example the le newreq.pem contains the unsigned certicate and private key. Thele newcert.pem contains the signed certicate.

    x509 utility Displays certicate information, converts certicates to various forms,and signs certicate requests

    ca application Used to sign certicate requests in a variety of forms and to generateCRLs (certicate revocation lists)

    Enable sendmail to use the certicates by adding the following lines to your .mc le.

    define(confCACERT_PATH, /etc/mail/certs)dnldefine(confCACERT, /etc/mail/certs/CAcert.pem)dnldefine(confSERVER_CERT, /etc/mail/certs/MYcert.pem)dnldefine(confSERVER_KEY, /etc/mail/certs/MYkey.pem)dnldefine(confCLIENT_CERT, /etc/mail/certs/MYcert.pem)dnldefine(confCLIENT_KEY, /etc/mail/certs/MYkey.pem)dnl

    For more information, see Conguration File Options for Running SMTP With TLS onpage 98.

    Rebuild and install your sendmail.cf leinyour /etc/mail directory.

    For detailed instructions, see Changing the sendmail Conguration on page 33.

    Create symbolic links from the les you created with openssl to the les you dened in your .mc

    le.

    # 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

    For added security, deny read permissionto group and others for MYkey.pem.

    # chmod go-r MYkey.pem

    Use a symboliclink to install CA certsin the directory assigned to confCACERT_PATH.

    # C=CAcert.pem# ln -s $C openssl x509 -noout -hash < $C.0

    5

    6

    7

    8

    9

    Managing sendmailServices in Oracle Solaris 11.1 October201240

  • 8/12/2019 S11 Sendmail Guide

    41/130

    more information about the daemon and client queue runner and to understand why you

    Administering MailAlias Files (Task Map)

  • 8/12/2019 S11 Sendmail Guide

    42/130

    more information about the daemon and client queue runner and to understand why youmight have to use this alternate conguration, refer to submit.cf Conguration File FromVersion 8.12 ofsendmail on page 106.

    This procedure ensures that your daemon runs only to accept connections from the local host.

    Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    Stop sendmail clientservice.

    # svcadm disable -t sendmail-client

    Make a copy of the conguration lethat you are changing.

    # cd /etc/mail/cf/cf# cp submit.mc submit-myhost.mc

    myhost Select a new name for your .mc le.

    Edit the new conguration le (for example, submit-myhost.mc)

    Change the listening host IP address to the msp denition.

    # grep msp submit-myhost.mcFEATURE(msp, [#.#.#.#])dnl

    Build the conguration le by using m4.

    # make submit-myhost.cf

    Install the new conguration le after making a copy of the original.

    # cp /etc/mail/submit.cf /etc/mail/submit.cf.save# cp submit-myhost.cf /etc/mail/submit.cf

    Restartthe sendmail clientservice.

    # svcadm enable sendmail-client

    Administering Mail Alias Files (Task Map)The following table describes the procedures for administering mail alias les. For moreinformation about this topic, refer to Mail Alias Files on page 88 in Chapter 3, Mail Services(Reference).

    1

    2

    3

    4

    5

    6

    7

    Managing sendmailServices in Oracle Solaris 11.1 October201242

    Task Description For Instructions

    AdministeringMail AliasFiles

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28
  • 8/12/2019 S11 Sendmail Guide

    43/130

    Task Description For Instructions

    Setting up an NIS mail.aliases map If yournameservice isNIS,followthese

    instructions to facilitate aliasing with a

    mail.aliases map.

    Howto Set Up anNIS mail.aliases

    Mapon page43

    Setting up a local mail alias le If you are not using a name service (such as

    NIS), follow these instructions to facilitate

    aliasing with the /etc/mail/aliases le.

    Howto Set Up a Local MailAliasFile on

    page 44

    Creating a keyed map le Use these steps to facilitate aliasing with a

    keyed map le.

    How to Create a Keyed Map File on

    page 46

    Setting up the postmaster alias Use the procedures in t his section t o

    manage the postmaster alias. You musthave this alias.

    Managing the postmaster Alias on

    page 46

    Administering Mail Alias FilesMail aliases must be unique within the domain. This section provides the procedures foradministering mail alias les.

    In addition, you can create database les for the local mail host by using makemap. Refer to themakemap(1M) man page. The use of these database les does not provide all of the advantages ofusing a name service such as NIS. However, you should be able to retrieve the data from theselocal database les faster because no network lookups are involved. For more information, referto Interactions ofsendmail With Name Services on page 93 and Mail Alias Files onpage 88 in Chapter 3, Mail Services (Reference).

    How to Set Up an NIS mail.aliases MapUse the following procedure to facilitate aliasing with an NIS mail.aliases map.

    Compile a list of each of your mail clients, the locations of their mailboxes, and the names of the

    mail server systems.

    Become an administrator on the NIS masterserver.

    For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    Edit the /etc/mail/aliases le, and make the following entries.

    a. Add an entryfor each mail client.

    # cat /etc/mail/aliases..

    alias:expanded-alias

    1

    2

    3

    Chapter 2 Mail Services (Tasks) 43

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mmakemap-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mmakemap-1mhttp://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=REFMAN1Mmakemap-1m
  • 8/12/2019 S11 Sendmail Guide

    44/130

  • 8/12/2019 S11 Sendmail Guide

    45/130

    How to Create a Keyed Map File

    Administering MailAlias Files

  • 8/12/2019 S11 Sendmail Guide

    46/130

    How to Create a Keyed Map FileTo create a keyed map le, follow these instructions.

    Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    Create an input le.

    Entries can have the following syntax.

    [email protected] [email protected]@olddomain.com error:nouser No such user [email protected] %[email protected]

    [email protected] Use the user name that was previously assigned with thedomain that is newly assigned.

    [email protected] Use the address that is newly assigned.

    [email protected] Use the user name that was previously assigned with thedomain that was previously assigned.

    olddomain.com Use the domain that was previously assigned.

    newdomain.com Use the domain that is newly assigned.

    The rst entry redirects mail to a new alias. The next entry creates a message when an incorrectalias is used. The last entry redirects all incoming mail from olddomain to newdomain.

    Create the database le.

    # /usr/sbin/makemap maptype newmap < newmap

    maptype Select a database type, such as dbm, btree, or hash.

    newmap Use the name of the input le and the rst part of the nameof the database le. Ifthe dbm database type is selected, then the database les are created by using a .paganda .dir suffix. For the other two database types, the le name is followed by.db.

    Managing the postmaster Alias

    Every system must be able to send mail to a postmaster mailbox. You can create an NIS aliasfor postmaster, or you can create the alias in each local /etc/mail/aliases le. Refer to theseprocedures.

    How to Create a postmaster Alias in Each Local /etc/mail/aliases File on page 47

    How to Create a Separate Mailbox for postmasteronpage47

    1

    2

    3

    Managing sendmailServices in Oracle Solaris 11.1 October201246

    How to Add the postmaster Mailbox to the Aliases in the /etc/mail/aliases File on48

    AdministeringMail AliasFiles

    http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SYSADV6rbactask-28
  • 8/12/2019 S11 Sendmail Guide

    47/130

    page 48

    How to Create a postmaster Alias in Each Local /etc/mail/aliases FileIf you are creating the postmaster alias in each local /etc/mail/aliases le, follow theseinstructions.

    Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    View the /etc/mail/aliases entry.

    # 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 systems# mail problems.Postmaster: root

    Edit each system's /etc/mail/aliases le.

    Change root to the mail address of the person who is designated as the postmaster.Postmaster: mail-address

    mail-address Use the assigned address for the person who is designated as the postmaster.

    (Optional) Create a separate mailbox for the postmaster.

    You can create a separate mailbox for the postmaster to keep postmaster mail separate frompersonal mail. If you create a separate mailbox, use the mailbox address instead of the

    postmaster's personal mail address when you edit the /etc/mail/aliases les. For details,refer to How to Create a Separate Mailbox for postmasteronpage47.

    How to Create a Separate Mailbox for postmasterIf you are creating a separate mailbox for postmaster, follow these instructions.

    Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in OracleSolaris 11.1 Administration: Security Services.

    Create a user account for the person who is designated as postmaster. Put anasterisk (*)inthe

    password eld.

    For details about adding a user account, refer to Setting Up and Managing User Accounts byUsing the CLI (Task Map) inManaging User Accounts and User Environments