Linux Network Administrator Manual (15)

Source: Internet
Author: User
Article title: Linux Network Administrator Manual (15 ). 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 2 Sendmail + IDA
15.1 Sendmail + IDA overview
Someone once said that you have only edited a sendmail. cf file, and you are a real Unix system administrator. Some people say
If you try to edit it twice, you must be crazy?
Sendmail is an incredible and powerful program. For most people, it is also hard to learn. With
Any program with 792-page-long authoritative reference (Sendmail, published by O'Reilly and Associates) cannot
The argument can scare the majority of people away.
Sendmail + IDA is different. it deletes the need for editing the sendmail. cf file that is always concealed and allows administrators
You can use a simple and easy-to-understand tables support file to define site-related route selection and addressing configurations. Switch
Using sendmail + IDA can save you a lot of time and effort.
Compared with other email transmission proxies, using sendmail + IDA has almost nothing to do faster and simpler.
It is easy to complete the typical tasks required to run regular UCP or Internet sites. Configuration changes are usually very difficult.
Easy to build and maintain.
When writing this book, the current version of sendmail5.67b + IDA1.5 can be obtained from vixen. cso. uiu through anonymous FTP
C.edu. In Linux, it does not require any patches for compilation.
All configuration files required for compiling, installing, and running sendmail + IDA source programs in Linux are included in newspak
In -2.2.tar.gz, the compressed file can be obtained from/pub/Linux/system/Mai of sunsite.unc.edu through anonymous FTP.
L download.
15.2 configuration file-overview
The traditional sendmail is set through a system configuration file (typically/etc/sendmail. cf or/u
Sr/lib/sendmail. cf). This file is not similar to any programming language you have ever seen. Edit sendmail. c
F files to provide customized performance may be a mean of experience and skills.
Sendmail + IDA makes this painful by making all configuration options a table-driven method that is syntactically easy to understand.
Out of date. These options are run on many data files through Makefiles provided by the source code.
Line m4 (a macro handler) or dbm (a database handler.
The sendmail. cf file only defines the default performance of the system. In fact, all special custom operations are optional through many
Instead of directly editing the sendmail. cf file. 5.1 lists all sendmail tables
Grid.
Mailertable defines special performance for remote hosts or domains.
Uucpxtable forces UUCP mail to be delivered to a host in DNS format.
Pathtable defines the UUCP bang-paths of the remote host or domain.
Uucprelays short-circuit path alias path to the famous remote host.
Genericfrom converts an internal address to a common address visible in the external world.
Xaliases converts a normal address to a valid internal address or an internal address to a normal address.
Decnetxtable converts the RFC-822 address to an address in DECnet format.
5.1: files supported by sendmail.
15.3 sendmail. cf file
The sendmail. cf file for sendmail + IDA does not need to be edited directly, but is provided by a local system administrator.
4. it is generated in the configuration file. Next, we will call it sendmail. m4.
This file contains several definitions and other just links to a real work table. Generally, you only need to specify
Ming:
. The path name and file name used on the local system.
. The name of the site used for email.
. Which default email program (or sensitive host) is expected.
A large number of parameters can be defined to set up the performance of the local site or overwrite the compiled configuration items. Select
Items are determined in the ida/cf/OPTIONS file in the source code directory.
For the minimum configuration of the sendmail. m4 file (with all non-local mail forwarded to the directly connected sensitive host to the U
UCP or SMTP) if it is not a comment line, it can be as short as 10 or 15 lines.
15.3.1 example file of sendmail. m4
The sendmail. m4 file for vstout in the virtual brewery is shown below. Vstout uses SMTP to connect to the local network of the brewery
When there is a host dialog, all emails from all other destinations are sent to its Internet relay host moria through UCP.
  
15.3.2 typical parameters used for sendmail. m4
Several items in the sendmail. m4 file are always needed; others can be omitted if you are lucky to use the default value.
. The following sections detail each item in the sendmail. m4 example file.
Define the path item (Items that Define Paths)
Dnl # define (LIBDIR,/usr/local/lib/mail) dnl # where all support files go
LIBDIR defines a directory in which sendmail + IDA expects to find the configuration files,
Dnl # ------------------ sample sendmail. M4 FILE ------------------
Dnl # (the string 'dnl' is the m4 equivalent of commenting out a line)
Dnl # you generally don't want to override LIBDIR from the compiled in paths
Dnl # define (LIBDIR,/usr/local/lib/mail) dnl # where all support files go
Define (LOCAL_MAILER_DEF, mailers. linux) dnl # mailer for local delivery
Define (POSTMASTERBOUNCE) dnl # postmaster gets bounces
Define (pseudo domains, bitnet uucp) dnl # don't try DNS on these
Dnl #-------------------------------------------------------------
Dnl #
Define (pseudo donyms, vstout.vbrew.com vstout. UUCP vbrew.com)
Dnl # names we're known
Define (DEFAULT_HOST, vstout.vbrew.com) # our primary 'name' for mail
Define (UUCPNAME, vstout) dnl # our uucp name
Dnl #
Dnl #-------------------------------------------------------------
Define (UUCPNODES, | uuname | sort | uniq) dnl # our uucp neighbors
Define (BANGIMPLIESUUCP) dnl # make certain that uucp
Define (BANGONLYUUCP) dnl # make is treated correctly
Define (RELAY_HOST, moria) dnl # our smart relay host
Define (RELAY_MAILER, UUCP-A) dnl # we reach moria via uucp
Dnl #
Dnl #-------------------------------------------------------------------
Dnl #
Dnl # the various dbm lookup tables
Dnl #
Define (ALIASES, LIBDIR/aliases) dnl # system aliases
Define (DOMAINTABLE, LIBDIR/domaintable) dnl # domainize hosts
Define (PATHTABLE, LIBDIR/pathtable) dnl # paths database
Define (GENERICFROM, LIBDIR/generics) dnl # generic from addresses
Define (MAILERTABLE, LIBDIR/mailertable) dnl # mailers per host or domain
Define (UUCPXTABLE, LIBDIR/uucpxtable) dnl # paths to hosts we feed
Define (UUCPRELAYS, LIBDIR/uucprelays) dnl # short-circuit paths
Dnl #
Dnl #--------------------------------------------------------------------
Dnl #
Dnl # include the 'real' code that makes it all work
Dnl # (provided with the source code)
Dnl #
Include (Sendmail. mc) dnl # required entry !!!
Dnl #
Dnl # ------------- end of sample sendmail. M4 FILE -------
5.2: The sendmail. m4 example file for vstout.
Various dbm tables and special local definitions. In a typical execution program release, this is compiled into the sendmail
You do not need to explicitly set it in the sendmail. m4 file during execution.
In the above example, there is a leading dnl, which indicates that this row is basically a comment row as information.
To change the location of the supported files to a different place, remove the dnl comment from the above line and set the path
And re-install the sendmail. cf file.
Defining the Local Mailer)
Define (LOCAL_MAILER_DEF, mailers. linux) dnl # mailer for local delvery
Many operating systems provide programs for processing local mail deliveries. For many major Unix variants, typical programs
It has already been created in the sendmail execution program.
In Linux, you need to clearly define the appropriate local mail program, because the local mail program does not have to include
In the released version you have installed. This is done by specifying LOCAL_MAILER_DEF in The sendmail. m4 file.
  
For example, in order for the general deliver program [1] to provide this service, you should set LOCAL_MAILER_DEF to mail
Ers. linux.
Then, the following files should be installed in the directory specified by LIBDIR as mailers. linux. It explicitly uses appropriate
The parameter defines the deliver program in the internal Mlocal mail program, so that sendmail can correctly deliver the target
Local system emails. Unless you are a sendmail expert, you generally do not need to change the example below.
# --/Usr/local/lib/mail/mailers. linux?
# (Local mailers for use on Linux)
Mlocal, P =/usr/bin/deliver, F = SlsmFDMP, S = 10, R = 25/10, A = deliver $ u
Mprog, P =/bin/sh, F = lsDFMeuP, S = 10, R = 10, A = sh? C $ u
In the sendmail. mc file included in the Sendmail. cf file, there are also built-in default values for deliver. To specify
Instead of using the mailers. linux file, you must define the following in your sendmail. m4 file:
Dnl --- (in sendmail. m4 )---
Define (LOCAL_MAILER_DEF, DELIVER) dnl # mailer for local delivery
Unfortunately, Sendmail. mc assumes that the deliver is installed in/bin, and for Slackware1.1.1 (it installs it
In/usr/bin. In that case, you must use a link to disguise it or from the source code.
Re-build the deliver to make it reside in/bin.
Dealing with Bounced Mail)
Define (POSTM
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.