Article title: Linux Network Administrator Manual (14 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Chapter 4 configure and run smail
This chapter will give you a quick start to setting up smail and an overview of its functions. Although the smail behavior is very
To a large extent, it is compatible with sendmail, but their configuration files are completely different.
The main configuration file is/usr/lib/smail/config. You must edit this file to reflect the specific
Value. If you are just a UUCP end site (leaf site), you need to change it very little. Configuration path
Other files selected and transferred options can also be used. these files will also be discussed in summary.
By default, smail will immediately process and distribute all incoming mails. If you have a large volume of traffic, you can first let s
Mail collects information to so-called queues and processes them only at a certain interval.
When processing emails over TCP/IP networks, smail will run frequently in subsequent mode (daemon mode ):
When the pilot is started, it is called from rc. inet2 and put itself in the background to wait for the SMTP port (usually port 25)
. This is useful when you may encounter a large amount of information traffic, because smail does not target
Each inbound connection runs immediately. Another method is to allow inetd to manage the SMTP port, and every time this port has
It calls smail during connection.
Smail has many logos to control its own behavior. it is not very helpful for you to discuss them in detail here. Fortunately
, Smail supports some standard operation modes. These modes are enabled when you call smail using a specific command name,
Such as rmail and smtpd. Generally, these aliases are symbolic connections to the smail execution file. Discussing smail's various
We will encounter most of these features.
In all environments, you should have two connections to smail; they are/usr/bin/rmail and/usr/sbin/sendmai
L. [1] when you use a user agent (such as elm) to write and send an email, the message will be lost.
Send to rmail for delivery, and the recipient list should be provided on the command line. For emails received through UUCP
. However, some versions of elm call/usr/sbin/sendmail instead of rmail, so you need them
Both. For example, if you put smail in/usr/local/bin, type the following two lines at the shell prompt:
# Ln? S/usr/local/bin/smail/usr/bin/rmail
# Ln? S/usr/local/bin/smail/usr/sbin/sendmail
For more details about configuring smail, see smail (1) and smail (5 ). If it does not have a package
Included in your favorite Linux release version, you can get it from the smail source program.
14.1 UUCP settings
To use smail in a UUCP-only environment, the basic installation process is very simple. First, you must be sure that you have
The two symbols mentioned above are used to connect rmail and sendmail. If you want to receive SMTP batches from other sites
To process information, you also need to set rsmtp as a connection to smail.
In the smail release of Vince Skahan, you will find a sample configuration file. It is named config. sample.
Both exist in/usr/lib/smail. You must copy it to config and edit it to apply to your site.
Assume that your site name is pai.twobirds.com and is registered with swim in UCP ING. Your sensitive host is
Ulysses. At this time, your config file should look like this:
#
# Our domain names
Visible_domain = two. birds: uucp
# Our name on outgoing mails
Visible_name = pai.twobirds.com
#
# Use this as uucp-name as well
Uucp_name = pai.twobirds.com
#
# Our smarthost
Smart_host = ulysses
The first statement tells smail about the domain to which your site belongs. Insert their names here and separate them with colons. If you
The site name has been registered in UUCP ing, you should also add UCP. When processing an email message, smail uses
Hostname (2) system call to determine the name of your host and compare the recipient's address with the host name
, And add all the names in the list in sequence. If the address matches any of these names or informal host names
When matching, the receiver is considered local, and smail will try to deliver the message to
User or alias. Otherwise, the receiver is considered remote and attempts to ship the data to the target host.
Visible_name should contain a single, wholly owned domain name for your site on the outbound mail. When on all outbound emails
This name is used when the sender address is generated. You must be sure that an smail is used to identify the primary account as the primary account.
Host name (that is, the host name listed in one of the domains in the visible_domain attribute ). Otherwise
Your site is displayed.
The last statement sets the path used for sensitive host routing (described in Section 13.4 ). For this sample
Set, smail will forward all emails sent to the remote address to the sensitive host. Because the message will be delivered through UUCP
You must specify a system that your UUCP software recognizes. See section 12th to make the site known as UUCP.
There is another option used in the above file that we haven't explained yet; this is uucp_name. The
The reason is: by default, smail uses the value returned by hostname (2) to UUCP, for example
The return path. If your host name has not been registered in the UUCP ING plan Group, you should tell smail to use your
To replace. [2] This can be done by adding the uucp_name option to the config file.
There is also a file named paths. sample in/usr/lib/smail. It is an example of the paths file. However,
It is not because you have email connections to more than one site, otherwise you do not need it. If you do have multiple email connections,
You need to write a file yourself or generate a file from Usenet ING. The paths file will be discussed later in this Chapter
.
14.2 configure LAN
If you are running a site and two or more hosts form a LAN, you must specify a host.
To process the connection between your UCP and the external world. Between hosts on your LAN, you may use SMTP on TCP/IP.
Exchange email. Suppose we are now back to the virtual brewery again, and vstout is set as the UUCP gateway.
In a networked environment, it is best to place all users' mailboxes on a single file system.
Other hosts can be attached with NFS. This allows users to switch from one machine to another without the need to mail
(Or worse, check three or four machines every morning to see if there are any new emails ). So you also
The sender's address is not relevant to the email writing machine. The domain name is always used in the sender's address, not the host name
Is a very practical and useful method. For example, the Janet user treats the specified address as a janet@vbrew.com rather than ja
Net@vale.vbrew.com. Next we will explain how to let the server recognize the domain name as a valid name for your site
.
Another way to keep all the mailboxes on a central host is to use POP or IMAP. POP stands for Post Office
Post Office Protocol allows users to access their mailbox through a simple TCP/IP connection. IMAP
Interactive Mail Access Protocol, similar to POP, but more common. I
The customer and server programs of MAP and POP have been transplanted to Linux and can be migrated from/pub/L in sunsite.unc.edu.
Obtained under inux/system/Network.
14.2.1 compile a configuration file
The brewery configuration works as follows: all hosts except the mail server vstout itself use the sensitive host path
Select to send all outbound emails to the server. Vstout itself sends all outbound mails to transmit all the wines
The real sensitive host of the winery mail; this host is called moria.
Except for vstout, the standard config files of all other hosts look like this:
#
# Our domain:
Visible_domain = vbrew.com
#
# Whaat we name ourselves
Visible_name = vbrew.com
#
# Smart-host routing: via SMTP to vstout
Smart_path = vstout
Smart_transport = smtp
This is very similar to what we use for UUCP sites. The main difference is that SM is used to send emails to sensitive hosts.
TP. The visible_domain attribute enables smail to use a domain name instead of a local host name on all outbound mails.
On the UCP mail gateway vstout, the config file looks a little different:
#
# Our hostnames:
Hostnames = vbrew.com: vstout.vbrew.com: vstout
#
# What we name ourselevs
Visible_name = vbrew.com
#
# In the uucp world, we're known as vbrew.com
Uucp_name = vbrew.com
#
# Smart transport: via uucp to moria
Smart_path = moria
Smart_transport = uux
#
# We're authoritative for our domain
Auth_domains = vbrew.com
This config file uses a different scheme to tell smail what the local host is called. Instead of giving it a list of domains and
Let it use a system call to identify the host name, but clearly gives a list. The configuration above contains all
And free host name (fully qualified and the unqulified hostname), and domain name. This makes
Smail recognizes the janet@vbrew.com as a local address and delivers the message to janet.
The auth_domains variable names a domain. for this domain, vstout is considered authorized. That is, when smail receives
For any email sent to the address host.vbrew.com, if the host is not the name of any local machine
The email is rejected and returned to the sender. Without this entry, any such message will be
Sent to the sensitive host, and the sensitive host will return it to the vstout, until the message exceeds the limit
Large hops are discarded.
14.2.2 run smail
First, you need to decide whether to run smail as an independent daemon program or to manage the inetd.
SMTP port and smail is called only when some customers request an SMTP connection. Generally, on the email server
Prefer the background
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.