Server | Mail server This article assumes that the user wants to set up an e-mail server in the campus network environment to provide mail service for the users of the unit. The server has a legitimate IP address 202.99.11.200 and a valid domain name mail.linuxaid.com.cn, and the MX record for DNS also points to the domain name (note: Here The example domain name and IP address are fake domain names and addresses). To meet domain name requirements, DNS domain data files should contain the following:
In MX ten Mail
Mail in A 202.99.11.200
The test environment is: redhat6.2, sendmail.8.11.4, qpopper4.0.3.
Third, software download SendMail is currently the most widely used an e-mail server. Currently its latest stable version is 8.11.4. After downloading the compressed package in the tar.gz format, store it in the/USR/SRC directory.
Unpack the package:
[Root@email src]# tar xvfz sendmail.8.11.4.tar.gz
[Root@email src]# CD sendmail-8.11.4
Compile Installation:
[Root@email sendmail-8.11.4]# CD SendMail
[Root@email sendmail]# SH Build
Build configuration file:
[Root@email SendMail] #cd/usr/src/sendmail-8.11.4/cf/cf/
Generally this directory should have CONFIG.MC files, if not then create a new file CONFIG.MC, the content is:
Divert (-1)
DNL this are the macro config file used to generate THE/ETC/SENDMAIL.CF
DNL file. If You are modify Thei file you'll have to regenerate the
DNL/ETC/SENDMAIL.CF by running this macro config through the M4
DNL Preprocessor:
DNL M4/ETC/SENDMAIL.MC >/ETC/SENDMAIL.CF
DNL you'll need to have the SENDMAIL-CF package installed for this to work.
Include ('/USR/SRC/SENDMAIL-8.11.4/CF ')
Define (' confdef_user_id ', ' 8:12 ')
OSType (' Linux ')
Undefine (' Uucp_relay ')
Undefine (' Bitnet_relay ')
Define (' Confauto_rebuild ')
Define (' Confto_connect ', ' 1m ')
Define (' Conftry_null_mx_list ', true)
Define (' Confdont_probe_interfaces ', true)
Define (' Procmail_mailer_path ', '/usr/bin/procmail ')
FEATURE (' Smrsh ', '/usr/sbin/smrsh ')
FEATURE (' mailertable ', ' hash-o/etc/mail/mailertable ')
FEATURE (' virtusertable ', ' hash-o/etc/mail/virtusertable ')
FEATURE (redirect)
FEATURE (Always_add_domain)
FEATURE (Use_cw_file)
FEATURE (Local_procmail)
MAILER (SMTP)
MAILER (Procmail)
FEATURE (' access_db ')
FEATURE (' blacklist_recipients ')
DNL We strongly recommend to comment this one out if you want to protect
Dnl yourself from spam. However, the laptop and users on computers
DNL not hav 24x7 DNS does need this.
FEATURE (' Accept_unresolvable_domains ')
DNL FEATURE (' relay_based_on_mx ')