Configuring sendmail :: Chapter 19: Setting Up a Mail Server :: Part IV: Red Hat Linux Network and Server Setup :: red hat linux bible. fedora and enterprise edition :: Linux systems :: https://thefartiste.com

The file /etc/mail/sendmail.cf contains the shape information and optional values used to direct the behavior of the sendmail daemon. The entire file is over 1,700 lines in length, making it rather difficult to deal with. The sendmail.mc file was created as a way to simplify the creation of the sendmail.cf file. sol, the steps I recommend for configuring sendmail are as follows : Because of the way sendmail in configured in Red Hat Linux, you should not directly modify the sendmail.cf file. The sendmail.cf file is automatically regenerated when sendmail restarts if sendmail.mc changes. As a result, any modifications made directly to sendmail.cf will be lost. The m4 macro you use in the sendmail.mc file are different from the resulting settings in the sendmail.cf file. To find out what macro to use for a determine you find in the sendmail.cf file, refer to the /usr/share/doc/sendmail/README.cf file. Review your sendmail.cf shape. If you want to make changes, modify the sendmail.mc file and regenerate sendmail.cf.

Generate the sendmail.cf file from the edit sendmail.mc file. This is done using the m4 processor. Edit the /etc/sendmail.mc file. Most of what you need to do to configure sendmail can be done by editing this file. The trace sections provide details for this process. After you have made the changes you want to the sendmail.mc file, you can regenerate the sendmail.cf file as described in the next part. The LOCAL_DOMAIN option here causes the name localhost.localdomain to be accepted as a name for your local calculator. The end lines in your sendmail.mc file define the mailers to use on your server. The /usr/share/sendmail-cf/mailer directory contains definitions for smtp, procmail, and other mailers. The accept_unresolvable_domains option is on, causing you to accept mail from host computers that do n’t have solvable knowledge domain names. If you have node computers ( such as dial-up computers ) that need to use your mail waiter, leave this choice on. Turning it off, however, can help eliminate spam. As it stands, the DAEMON_OPTIONS line allows only incoming mail created by the local anesthetic host to be accepted. Be certain to comment this credit line out if you want to allow incoming mail from the Internet or other network interface ( such as the local LAN ). The local_procmail option sets the control used to deliver local anesthetic mail ( procmail ), equally well as options to that command ( including the $ h hostname and $ u user list ). The access_db choice sets the localization of the access database, which identifies which hosts are allowed to relay mail through the waiter. The blacklist_recipients choice turns on the ability of the server to block incoming mail for selected users, hosts, or addresses. ( The access_db and blacklist_recipients features are useful for blocking spam. ) The FEATURE macro is used to set some special sendmail features. The smrsh feature defines /usr/sbin/smrsh as the simpleton blast used by sendmail to receive commands. The mailertable and virtusertable options set the locations of the mailertable and virtusertable databases. The redirect option allows you to reject mail for users who have moved and provide fresh addresses. The always_add_domain option causes the local world name to be added to the host name on all delivered mail. The use_cw_file and use_ct_file options tell sendmail to use the file /etc/mail/local-host-names for alternate host names for this mail waiter and /etc/mail/trusted-users for trusted exploiter names, respectively. ( A trusted user can send mail as another exploiter without resulting in a admonitory message. ) The comment lines above actually show the nonpayment values set for certain timeout conditions. You can remove comments and change these values if you like. The confTO_QUEUEWARN sets how retentive after pitch of a message has been deferred to send a warn message to the transmitter. Four hours ( 4h ) is the default. The confTO_QUEUERETURN option sets how long before an undeliverable message is returned. The confQUEUE_LA and confREFUSE_LA set the arrangement load modal levels at which mail received is queued or refused, respectively. The confTO_IDENT option sets the timeout when waiting for a reaction to an IDENT question to be received ( by nonpayment it is 0, which means no timeout ). The group of lines barely shown ( all begin with dnl, so they are commented out ) can be uncommented ( remove the initial dnl ) to provide certain features. The confAUTH_OPTIONS line sets options used with SMTP authentication. This example ( with A and phosphorus options ) allows attested users with plain textbook logins to relay mail. The TRUST_AUTH_MECH line would cause sendmail to allow authentication mechanisms other than plain passwords. The next four lines above should be uncommented to enable certificates ( with the last trace above put if the cardinal file needs to be clear by applications other than sendmail ). The UUCP_MAILER_MAX line sets the maximum size ( in bytes ) for messages received by the UUCP mailer. The confUSERDB_SPEC telephone line sets the location of the exploiter database ( where you can override the default mail server for specific users ). The confPRIVACY_FLAGS note causes sendmail to insist on certain mail protocols. For exemplar, authwarnings causes X-Authentication-Warning headers to be used and noted in log files. The novrfy and noexpn settings prevent those services from being requested. The restrictqrun option prevents the -q option to sendmail. The next three lines ( PROCMAIL_MAILER_PATH, ALIAS_FILE, and STATUS_FILE ) set locations for the program that distributes incoming mail ( procmail, by default ), the mail aliases database, and the mail statistics file, respectively. With confTRY_NULL_MX_LIST on-key, if a pick up server is the best mail switch over ( MX ) for a host, try connecting to that host directly. If confDONT_PROBE_INTERFACES is true, the sendmail devil will not insert local anesthetic network interfaces into the list of know equivalent addresses. If you remove the dnl, the confAUTO_REBUILD lineage will tell sendmail to mechanically rebuild the aliases database, if necessary. The confTO_CONNECT agate line sets the time the sendmail will wait for an initial connection to complete to one minute ( 1m ). alternatively of running as the root drug user, the daemon runs as the mail user ( UID 8 ) and mail group ( GID 12 ), based on the confDEF_USER_ID argumentation set previously. This is a good policy, since it prevents person who might compromise your mail server from gaining solution access to your machine. The confTRUSTED_USER line adds smmsp to the list of users that are trusted by sendmail. early trusted users are root, uucp, and daemon. ( The smmsp exploiter is assigned possession to some sendmail spool directories and mail database files. ) By default, the sendmail devil tries to send your outgoing e-mail directly to the mail server to which they are addressed. If you want all e-mail to be relayed through a finical mail waiter alternatively, you can remove the comment ( dnl, which stands for “ edit to new line ” ) from the SMART_HOST telephone line above. then, change smtp.your.provider to the in full certified sphere name of the mail waiter you want to use. The first few lines of the sendmail.mc charge do some housekeep. The divert line removes extra output when the shape file is generated. The admit note causes principle sets needed by sendmail to be included. The VERSIONID line identifies the shape file as being for Red Hat ( though this arrange is not checked, so it could be anything you like ). The OSTYPE, however, must be set to linux to get the proper localization of files needed by sendmail. Lines that begin with dnl ( delete to new line ) followed by gossip characters ( # # # ) in the sendmail.mc file are gossip lines. In most cases, I have left them out in the examples shown. The adopt code samples are from the /etc/mail/sendmail.mc file that accompanies Red Hat ‘s version of sendmail. rather of running m4, you can restart the sendmail service to have m4 run automatically. Details on the configuration options available through the m4 macro preprocessor can be found at www.sendmail.org/m4/tweaking_config.html. The rest of this section describes the contents of the sendmail.cf file that are created from sendmail.mc. once you have tuned the sendmail.mc file to your wish, you must process it into a sendmail.cf file. To generate the sendmail.cf file from sendmail.mc, run the follow as root : Any chain mail sent to jefft on the local machine would result in an informational message being returned to the original transmitter, indicating the changed address. The original mail message will not be forwarded to the address listed in the preceding jefft case. The DZ8.12.8 cable sets the macro Z, which contains the entire version information for the sendmail devil. The contents of the mailertable, virtusertable, and access files are all incorporated into their respective .db files when the sendmail service starts. After changing any of those files, type /etc/init.d/sendmail restart to have changes take effect. The first cable in the preceding obstruct discards ( without no error messages ) all chain mail from ads @ freestuff.net. The second rejects all mail from the junkmail.com domain, returning a general delivery status message to the transmitter. The third argumentation overrides the previous plant by allowing mail from coupons.junkmail.com, and the one-fourth line returns the pin down error code to the annoying spam.junkmail.com world. similarly, the Access list database is created from /etc/mail/access. It can be used to selectively accept, reject, relay, or discard any message based on the address, host diagnose, domain name, or IP address contained within the header : The first line redirects mail intended for videotech @ myotherbox.org to the local user report hajji. The second redirects mail for sales @ verysmallcompany.com to the outside drug user george @ wehavenomoney.com. The virtusertable file is frequently used to redirect mail for particular users in multiple domains. hera are examples of mappings that could be in the virtusertable charge : The files mailertable, virtusertable, and access ( in /etc/mail ) can be set up to forward or discard e-mail based on addresses. The mailertable file lets you forward e-mail for a particular domain to a selected server. For example, this mailertable submission forwards handsonhistory.com mail to mx1.linuxtoys.net : The CPREDIRECT line adds the text REDIRECT to the course P. This is used in conjunction with the redirect feature ( enabled in the m4 configuration files ), which allows aliases to be created for accounts that are no longer active. For example, if this is in /etc/aliases : The Virtual drug user table database ( /etc/mail/virtusertable.db ) is created from the hashed output signal of the /etc/mail/virtusertable text file. The Access list ( /etc/mail/access.db ) database, created from the /etc/mail/access charge, lets you discard and reject electronic mail from certain users to prevent spamming. See the sidebar “ Forwarding E-mail and Stopping Spam, ” which describes how to set up the virtual drug user and access tilt databases. The previous Kmailertable, Kvirtuser, and Kacess lines define key database files. You can route mail for finical addresses to particular servers by adding definitions to the Mailer table database ( /etc/mail/mailertable which creates /etc/mail/mailertable.db file ). The preceding classify E line ( CE root ) indicates that chain mail from the exploiter solution should always have the allow broad host identify and world name, even if other directives indicate that the host list should be masquerading as some early list. Besides class E, class L could be used to list those drug user names that should receive mail on the local anesthetic host, evening if other directives indicate that all mail should be relayed elsewhere. The class M could be used to indicate which domains should have their host names masqueraded ( as set in the following M macro ). The class N could be used to indicate host names that should not be masqueraded. The Kdequote note declares the dequote database of class dequote. This is used to remove citation marks from addresses within the rewriting rules. The following line relates to the way user names and domain names are exposed to the outside global : The preceding cable declares file class R, which is a number of hosts to which mail can relayed, stored in the file /etc/mail/relay-domains. The future line has to do with dequoting : adjacent, the FR-o line identifies a file that can be configured to allow mail relay. The early lines specify class macro that become important within the rewrite rules. The CP. and C.. lines define the classes P and., each of which consists of lone a menstruation (. ). The CO @ % ! telephone line defines the course O, which lists three characters that are disable within drug user names ( @, %, and ! ). The C [ [ occupation defines the class [, which consists of a leave bracket. The preceding DS line ( set to nothing ) indicates that no fresh relay host is defined. Although it is more normally used with UUCP as a transport mechanism, smart relay hosts can besides be utilitarian if the machine does n’t have a authentic association to the stallion network ( possibly it ‘s entirely on a local network ). The relay accepts mail from this machine and handles delivering the mail to the appropriate recipients. If you had set the confDOMAIN_NAME in your sendmail.mc charge, the precede line would be uncommented and your domain list would replace Foo.COM. With this line commented, however, sendmail will try to determine your calculator ‘s knowledge domain name on its own. It is recommended that you let sendmail determine the canonic name. The future lineage configures smart relay and early options : The Cwlocalhost occupation defines the class macro tungsten, which contains a list of all possible server names given to the machine. This includes any DNS aliases, all references in /etc/hosts, and possibly even faulty names used by individuals with accounts on that machine ( to avoid having those messages bounced ). Because this could become quite an extensive list on some hosts, the Fw/etc/mail/local-host-names line defines the file classify macro watt, which enables these host names to be stored in a separate file, /etc/mail/local-host-name in this subject. The next entries in the sendmail.cf file appear under the local information heading. They reflect shape information that is specific to your local host computer. here are the first base settings in that part : With the LDAPDefaultSpec option, you can add default LDAP maps that include LDAP-specific settings. By default, none are set. Add a conf LDAP_DEFAULT_SPEC telephone line to sendmail.mc to identify maps by horde ( -h host ), interface ( -p port ) or domain name ( -d bindDN ). This version of sendmail is, by nonpayment, reasonably paranoid, judging from the preceding gloss lines. By leaving DontBlameSendmail=safe commented out, sendmail wo n’t accept forward files, include files, incoming mailboxes, shape files, class files, or hashed map files that are group- or world-writable, or located in a directory that is group- or world-writable. ( Set confDONT_BLAME_SENDMAIL to safe in the sendmail.mc file to override file base hit checks. ) The following lineage relates to LDAP maps. The preceding line identifies this shape file as corresponding with the open-source Berkeley distribution of sendmail V10. The following wrinkle refers to a certain security feature : The following arrange from the sendmail.cf file indicates the version and seller associated with the configuration file. Note the admonition that you should n’t edit the sendmail.cf file directly. In the rest of this section, the comments show which component m4 macro files ( from subdirectories of the /usr/share/sendmail-cf directory ) were used to create this sendmail.cf file. The foremost depart of the sendmail.cf charge contains a listing of component files used to create the sendmail.cf charge. It besides contains information about the configuration file ‘s format and adaptation. The follow is an exemplar of the begin of the sendmail.cf file : The sendmail.cf file contains the definitions that drive the behavior of your sendmail mail server. The sendmail.mc charge used to generate sendmail.cf does n’t explicitly define every arrange that ends up in the sendmail.cf file. consequently, understanding the contents of your sendmail.cf charge can help you go back and make corrections to sendmail.mc .

sendmail options

The sendmail.cf file contains a hanker list of options that you can set for sendmail on your Red Hat Linux system. Option definitions start after the Options block. hera are examples :

O SevenBitInput=False
# O EightBitMode=pass8

The SevenBitInput option indicates that sendmail should not clear the most significant piece from each byte of all chain mail messages. The EightBitMode option dictates how sendmail should handle message data that is not explicitly labeled as 8-bit. The pass8 option allows any 8-bit data to be delivered unaltered ; mimefy converts any unspecified data to a MIME-encoded type ; hard-and-fast rejects any unlabeled 8-bit data. note that this option has no effect on data that is specified as 8-bit. The next lines relate to alias files :

O AliasWait=10
O AliasFile=/etc/aliases

Before rebuilding the aliases database, sendmail performs several checks to make certain that no other processes are attempting to do the like. The AliasWait option specifies the phone number of minutes that sendmail alternates between waiting and performing its checks. The AliasFile option specifies the location of the plain-text file containing mail aliases. The next lines relate to the way harrow space is allocated for sendmail :

O MinFreeBlocks=100
#O MaxMessageSize=1000000

The MinFreeBlocks choice specifies that a message will be rejected if the credence of that message would cause there to be fewer than 100 unblock blocks ( 100K ) available on the file system where messages are stored. The MaxMessageSize, if uncommented, can impose a limit on the maximal size of an entrance electronic mail message ( 1MB in the precede line ). By default, there is no restriction on the size of a message. The adjacent tune substitutes characters for space space :

O BlankSub=.

The BlankSub option substitutes the specify character ( a. here ) in place of a space distance ( which is an illegal character ) in an electronic mail address. The future cable avoids expensive mailers :

O HoldExpensive=False

If an MDA definition ( explained later in this incision ) includes the option F=e, the mailer is classified as expensive, which plainly indicates that delivering that mail may involve a slow connection or other processing check. The HoldExpensive choice allows messages handled by an expensive MDA to be queued rather than processed immediately. The preceding line disables this choice. The future trace relates to checkpoint queues :

#O CheckpointInterval=10

When delivering messages to many addresses ( as with mailing lists ), sendmail at times needs to record which recipients have already received the message. The CheckpointInterval option sets the total of recipient role addresses processed between updates of the qf file. The preceding line is commented out, but the nonpayment value is still 10. The adjacent production line relates to rescue mode :

O DeliveryMode=background

The four possible DeliveryMode values are as follows :

  • background — Sendmail forks ( splits off ) a copy of itself and asynchronously processes the message. The default option manner is background .
  • deferred — The message is queued and all serve, including DNS lookups and database accesses, is deferred until the queue is run .
  • interactive — The queue is processed synchronously, in the foreground .
  • queueonly — much like submit, but host names are resolved and databases are queried immediately .

The next lines relate to error message headers and error modes :

#O ErrorHeader=/etc/mail/error-header
#O ErrorMode=print

The ErrorHeader option allows the text of a specified file to be included in all delivery condition messages returned to the sender, along with any error messages from the xf file. The ErrorMode choice provides five potential methods of displaying erroneousness messages to users on the local machine who encounter problems while attempting to send mail :

  • e — Mail an error message to the transmitter, but terminate successfully .
  • m — Mail an erroneousness message, and exit with an error code .
  • p — Print error to user ‘s terminal and save the message in ~/dead.letter. ( default )
  • q — Quietly ignore all delivery errors .
  • w — Write the error message to the exploiter ‘s terminal .

The adjacent line relates to the From lines in electronic mail messages :

#O SaveFromLine=False

By default, the SaveFromLine option is disabled ( False ). The resultant role is that lines within mail messages that begin with the textbook “ From ” ( a special token that differentiates the end of one message from the headers of the adjacent ) will be prefaced by a > in the deliver message. The following tune relates to permissions of impermanent files :

O TempFileMode=0600

The TempFileMode option sets file permissions of temp files to be clear only by the file ‘s owner. other modes are highly discouraged. The future line relates to the GECOS field :

#O MatchGECOS=False

The MatchGECOS choice lets sendmail deliver chain mail to a commute form of a exploiter ‘s full name, as specified in the GECOS field of the /etc/passwd file. For model, if the full name of exploiter wharris ( according to the GECOS field ) is Wayne Harris, that drug user could receive mail as wharris @ mybox.com, Wayne_Harris @ mybox.com, or Wayne.Harris @ mybox.com. This option is not recommended, because it could lead to ambiguities, and users could change their GECOS fields in a means that could subvert sendmail ‘s usual manner of speaking mechanism .
The future note relates to hop counts :

#O MaxHopCount=25

The MaxHopCount option specifies the largest number of hops ( a infection of the message from one machine to another ) before a message is returned to the sender as undeliverable. The default prize is 25. The next line relates to the sendmail aid file :

O HelpFile=/etc/mail/helpfile

The HelpFile option lists the name of the file containing the on-line help text. To view this data, execute the control telnet localhost 25 and character help. Help is besides available for most SMTP commands using the aid command via avail dominate appoint. The following line relates to dots as terminators :

#O IgnoreDots=False

The IgnoreDots choice determines the behavior of sendmail when presented with a message that contains a individual period on a line. With the option nonexistent, commented, or False, the individual dot is treated as the end of the message ( the behavior specified in RFC 821 ). If the option is True, the department of transportation assumes no special significance. The adjacent occupation relates to resolver options :

#O ResolverOptions=+AAONLY

The ResolverOptions choice can tune the behavior of DNS lookups. Descriptions of valid flags are in the resolver man foliate ( type man resolver ). The following line relates to MIME errors :

O SendMimeErrors=True

The SendMimeErrors option defines whether pitch condition presentment messages should be MIME-encoded or left as homely textbook. The adjacent production line relates to search paths used for forwarding electronic mail messages :

O ForwardPath=$z/.forward.$w:$z/.forward

The ForwardPath option specifies the search path for an individual exploiter ‘s .forward file. In the predate channel, $ z represents the exploiter ‘s home directory, and $ w indicates the local machine ‘s horde name. For model, if /home/kzabon were the home directory for the user kzabon on the local machine aluminum, sendmail would first look for the file /home/kzabon/.forward.al, followed by /home/kzabon/.forward. If neither file existed, the chain mail would be delivered to the incoming postbox file /var/spool/mail/kzabon. The following lines relate to caching on open connections :

O ConnectionCacheSize=2
O ConnectionCacheTimeout=5m

rather than open a joining to a host, send a message, close the connection, and then open another connection to the lapp host, connection hoard allows sendmail to send multiple mail messages to the lapp machine over one joining. This ConnectionCacheSize option can reduce the overhead of creating and destroying connections. The default value of 2 says up to two coincident connections are allowed. The ConnectionCacheTimeout measure limits the time that a connection can be open. The default option rate is 5m ( five minutes ). The adjacent lines relate to the host status directory and train of thought deliveries :

#O HostStatusDirectory=.hoststat
#O SingleThreadDelivery=False

The HostStatusDirectory choice can establish a directory ( proportional to the line up directory /var/spool/mqueue if a full way name is n’t specified ) that stores status data for all machines with which sendmail has established a connection. This option is not set by default, because its implementation consumes resources but may not provide a solid gain .
The SingleThreadDelivery option ensures that there is always a utmost of one connection to any given machine. This, excessively, may not be desirable. not entirely does it require the HostStatusDirectory choice, it may besides prevent any outgoing messages to a horde if the local machine is presently processing a high volume of mail from that same machine. The next cable relates to the Errors-To header :

O UseErrorsTo=False

The UseErrorsTo option allows sendmail to utilize or ignore the “ Errors-To : ” header argumentation. If it is set to True, any delivery errors are reported to the address specified in the header line. differently, this line is ignored. The choice is set to False by default option because this behavior violates RFC 1123. The following line relates to the log floor :

O LogLevel=9

The LogLevel option sets the precedence and severity of logging messages sent to the syslog facility. Values range from 0 ( only hard errors are reported ) to 98 ( maximal debugging information is logged, along with all significant messages ). Unless you need to view tons of debugging information while tracking down a chain mail pitch problem, the default option value of 9 is credibly o. The next line defines how messages are sent to the message transmitter :

#O MeToo=True

The MeToo option selects sendmail ‘s behavior when the sender of a message is besides on the mailing list ‘s distribution tilt. Unless a measure of True is specified, the transmitter does not receive the message ( based on the premise that if the sender wrote the message, the sender does n’t need to see it again ). The future agate line has to do with evaluating addresses :

O CheckAliases=False

If the value is set to True, the CheckAliases option evaluates addresses on the forget side of the colon and guarantees a valid pitch agent for addresses on the right side. The default value is False. The next wrinkle relates to old-style headers :

O OldStyleHeaders=True

Lists of recipients were originally delimited by spaces. More recently, commas have been used because recipient names frequently contain spaces. When set to True, the OldStyleHeaders choice allows comma-delimited lists, but unquoted spaces are converted to commas. If the choice is set to False ( the default ), uncommented spaces are converted to the character specified by the BlankSub choice. The adjacent lines relate to SMTP daemon options :

O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
#0 ClientPortOptions=Family=inet, Address=0.0.0.0

The DaemonPortOptions choice can be used to restrict the port count and network on which sendmail will listen for incoming connections, the number of coincident incoming connections, and the size of the TCP/IP send and receive buffers .

Note? By default option, the DaemonPortOption=Port=smtp tune shown above restricts access to the smtp port ( port 25 ) and merely to the local host ( Addr=127.0.0.1 ) for mail transfer ( Name=MTA ). If you had commented out the DAEMON_PORTS option in the sendmail.mc file ( as described earlier ) to accept mail from hosts other than the local master of ceremonies, the entry in sendmail.cf will appear as follows :

DaemonPortsOptions=Name=MTA

The ClientPortOptions option is the same as DaemonPortOptions, except that it works for outgoing connections quite than incoming connections. By default, outgoing is not restricted to the local host since the line is commented out. The next line relates to privacy :

O PrivacyOptions=authwarnings,novrfy,noexpn,restrictqrun

The PrivacyOptions choice can require that incoming connections strictly adhere to correct SMTP demeanor, disable the EXPN ( noxepn ) or VRFY ( novrfy ) functions, disable return receipts, and restrict the users who may run the mailq and sendmail -q commands ( restrictqrun ). The mailq dominate shows all entries in the queue, while the sendmail -q command synchronously processes the queue. The PrivacyOptions option besides utilizes the “ X-Authentication-Warning : ” header line. The next line relates to copies of error messages :

#O PostMasterCopy=Postmaster

The PostMasterCopy choice can specify an cover ( or respective ) that should receive copies of any pitch status notifications that are sent to message senders. The default is to send no copies. The adjacent lines relate to the mail queue :

#O QueueFactor=600000
#O QueueSortOrder=priority
#O MinQueueAge=30m
#O MaxQueueRunSize=10000
O QueueDirectory=/var/spool/mqueue

A kind of queue options are available to tune queues and the runners that handle them. The latest sendmail ( version 8.12.9-7 ) besides includes a concept of line up groups. For servers that deliver a high bulk of mail, setting up line up groups allows you to set up branch directories of outgoing electronic mail. separate line up runners can then be used to handle each queue .

Note? By splitting outgoing e-mail across directories on different intemperate disks, you can reduce bottlenecks that occur on servers that deliver a lot of mail ( such as those that handle large mail lists ). For low-volume mail servers, the default /var/spool/mqueue directory is fine. For more information on queue groups, see the Sendmail Installation and Operation Guide at hypertext transfer protocol : //www.sendmail.org/~ca/email/doc8.12/op .

The QueueFactor option uses the stream system load average to implement a cutoff value where outbound messages are queued rather than immediately sent. The QueueSortOrder option, which can select the method acting used to determine the queue precedence, can be set to host ( the messages in the queue are sorted based on the receive host and the priority ), precedence ( the traditional precedence scale ), and time ( based on order of submission ). MinQueueAge sets the least amount of time a fail message transportation waits in the buffer zone before transmission is retried .
The MaxQueueRunSize choice indicates the maximal number of line up messages that can be processed during one footrace of the line up. The preceding telephone line sets the limit at 10,000 messages. The QueueDirectory option specifies the localization of queued outbound messages ( /var/ spool/mqueue, by default ). The filename prefix deliver in this directory are described in mesa 19-1 earlier in this chapter. The future lines relate to timeout values used by sendmail :

O Timeout.connect=1m
O Timeout.ident=0
O Timeout.queuereturn=5d
O Timeout.queuewarn=4h

several options relating to timeouts while waiting for events can be specified, as shown in the precede lines. ( many more that are commented out are not shown. ) These values limit the total of time sendmail spends waiting for an event to occur or complete. The actual clock time values can be specified in seconds, minutes, hours, or days ( with each specified as an integer followed by south, megabyte, hydrogen, or vitamin d, respectively ). An explanation for each is given in table 19-3. Each timeout option is in the shape Timeout. event, where event is replaced by the timeout events listed in the table .

Table 19-3:

Timeout Events

Timeout Events Waiting for. . .
aconnect the successful pitch of electronic mail to a recipient
auth the answer to an SMTP AUTH request
command the adjacent command
connect the credence of a connection
control the whole socket transaction to finish
datablock the read of the DATA block to complete
datafinal citation of the final dot or End-Of-File marker
datainit citation of the DATA instruction
fileopen an NFS file unfold command to complete
helo a HELO or EHLO
hoststatus the results of a master of ceremonies condition check
iconnect the initial connect ( 2 ) system call to complete
ident the results of an recognition protocol reaction
initial the initial greet message
lhlo a reply to an LMTP lHLO command
mail recognition of the MAIL command
misc acknowledgment of other SMTP commands
queuereturn ( any priority ) the message delivery to complete ( a leap message will be delivered )
queuewarn ( any precedence ) the message delivery to complete ( a admonition message will be delivered )
leave office recognition of the QUIT instruction
rcpt acknowledgment of the RCPT dominate
resolver.retrans ( default option first, and convention ) the time after resolver question failure before retransmitting
resolver.retry ( default option, first base, and normal ) the number of times to retry a resolver question before failing
rset recognition of the RSET command
starttls a answer to an SMTP START-TLS dominate and TLS handshake

The next production line relates to pruning routes :

#O DontPruneRoutes=False

With the DontPruneRoutes option, an address can be specified as a “ road address ” where an explicit path through a sequence of hosts is indicated. If the choice is set to True, this route is followed. otherwise, the path is pruned. The adjacent line relates to where messages are stored as they are being delivered :

O SuperSafe=True

If the SuperSafe option is False, sendmail reads a message into memory before delivering it. If the machine were to crash at this point, the message would be lost. When the SuperSafe option is set to True, the message always exists on the file system until delivery is completed. No good reason exists for this option to be set to False. The next line relates to the condition file :

O StatusFile=/etc/mail/statistics

The StatusFile choice specifies a file where mail rescue statistics are stored. The file is parsed by the mailstats course of study to display : the number of messages sent and the size of those messages ( in kilobytes ) ; the number of messages received and the size of those messages ( besides in kilobytes ) ; the count of messages rejected ; and the count of messages discarded. The first column and the last column indicate the MDA. The last rowing displays totals for each column. The following is a sample of end product from the mailstats command :

Statistics from Sun Aug 17 13:05:24 2003
    M  msgsfr  bytes_from   msgsto    bytes_to  msgsrej msgsdis Mailer
    4      414       3845K       23        894K        0       0  smtp
    8       10         19K        8         13K        0       0  local
   =============================================================
    T      424       3864K       31        907K        0       0

The next line relates to how time zones are handled :

#O TimeZoneSpec=

The TimeZoneSpec option lets you explicitly choose the local meter partition, overriding the rate in the TZ environment if it exists. The following line relates to the UID and GID used by sendmail :

O DefaultUser=8:12

The DefaultUser option specifies the UID and GID of the default exploiter to which sendmail switches when delivering chain mail. In this sheath, it is set to mail : chain mail ( UID 8 and GID 12 ). The future lineage relates to the localization of the drug user database file :

O UserDatabaseSpec=/etc/mail/userdb.db

The UserDatabaseSpec option lets you choose another database to redirect incoming messages and rewrite header fields of outgoing messages. The future lines can create disengagement connections :

#O FallbackMXhost=fall.back.host.net
O TryNullMXList=true

The FallbackMXhost choice can be used by sites that do n’t have a dependable connection to the Internet, where it would be preferable to relay the messages to another server with a better connection rather than queue the mail on the local machine .
If the master of ceremonies sending a message is besides an MX ( mail exchanger ) host for the receive host, all hosts with a higher MX preference are deemed invalid. If this results in no available mail exchangers, the message is returned to the transmitter if the TryNullMXList option is set to False. If the choice is set to True, sendmail tries to send mail directly to the receiving host before returning the message as undelivered. The adjacent lines relate to responses to high load averages :

#O QueueLA=8
#O RefuseLA=12

The QueueLA option specifies organization load average after which chain mail is not delivered at once but queued to process late. The RefuseLA option sets the point at which incoming mail is no long accepted. The next lines can set child processes and new connections :

#O MaxDaemonChildren=0
#O ConnectionRateThrottle=0

Sendmail forks a copy of itself to handle each incoming message and to process the queue. The MaxDaemonChildren option restricts the number of children of the master sendmail process that can exist simultaneously. Though this sounds like a effective idea, it besides makes it easier for person to implement a Denial-of-Service attack on your machine by keeping all available child processes occupied .
A better idea ( if you must limit incoming connections ) is to use the ConnectionRateThrottle option. Rather than deny connections beyond a certain threshold, the ConnectionRateThrottle option slows down acceptance of messages. Using a measure of three as an example, if eight connections arrive at once, three are handled immediately ; three more are processed after a one-second delay ; and the remaining two are handled after a two-second delay. The adjacent line relates to processes for line up jobs :

#O ForkEachJob=False

The ForkEachJob option instructs sendmail to fork a copy of itself to handle each individual message in the line up. This may be utilitarian for machines with express amounts of memory but should by and large not be used ( or set to False ). The adjacent lines are related to message precedence :

#O RecipientFactor=30000
#O ClassFactor=1800
#O RetryFactor=90000

The ClassFactor and RecipientFactor options change the orderliness in which queued messages are sent, based on priority class or issue of recipients. The RetryFactor option can be used to alter the precedence of a message in the queue that has already been processed but could n’t be delivered. The following line relates to the character set :

#O DefaultCharSet=iso-8859-1

The DefaultCharSet option defines the MIME type used when converting 8-bit messages into 7-bit messages. The future pipeline defines the placement of the service.switch file :

#O ServiceSwitchFile=/etc/mail/service.switch

Because the /etc/nsswitch.conf file already dictates the order for resolving versatile database requests, the ServiceSwitchFile choice is ignored, tied if defined. It is best to leave it commented out. The following line lets you redefine the placement of the /etc/hosts file :

#O HostsFile=/etc/hosts

The HostsFile option specifies the way to the file containing locally customized IP address-to-host name translations. The default value is /etc/hosts. The adjacent argumentation relates to dial-up delays when the connection fails :

#O DialDelay=10s

When a dial-up connection to the Internet needs to be established, the time required to secure the connection can vary greatly. The DialDelay option allows a number of seconds or minutes to be specified, which represents the come of clock sendmail sleeps if its initial connection try fails. The future line lets you define what to do if there is no recipient role in the message :

#O NoRecipientAction=add-to-undisclosed

The NoRecipientAction choice instructs sendmail what to do if a message has no recipients specified in the header lines. The valid parameters include add-apparently-to ( adds an “ Apparently-To : ” header ), add-bcc ( adds an vacate “ Bcc : ” header tune to comply with RFC 821 ), add-to ( adds a “ To : ” header with recipients from the message “ envelope ” ), add-to-undisclosed ( adds a

reference : https://thefartiste.com
Category : Tech

About admin

I am the owner of the website thefartiste.com, my purpose is to bring all the most useful information to users.

Check Also

articlewriting1

Manage participants in a zoom meeting webinar

Call the people who attend the meet as follows Alternate host host Who scheduled the …

Leave a Reply

Your email address will not be published.