linux sendmail Mail Server Setup (Fedora 8)2009-01-22 17:27 3316 People read Comments (2) favorite reports Mail server linuxprotocolscaching Test login
Recently has been learning Linux, my blog in the previous period of time have written to set up the DNS detailed steps, this section mainly on the establishment of mail server, we all know that the Rack mail server first to rack the DNS service, if you want to know how to set up a DNS service, you can participate in my previous written articles. Look at this mail suit this will even inertia, rack mail Service I also refer to a large number of articles on the Internet, here thank the predecessors. Due to the different Linux versions, some file directories and service launches are sometimes different, so it is difficult to find a complete document on the Web, I mainly use Linux Red hat Fedora 8 as an example. Set up SendMail mail server for everyone to study together.
Step One, install the Snedmail service to see if you have installed SendMail.
#rpm-qa|grep Bind
#rpm-qa|grep caching*
If it is not installed, please install it on your own, usually on Linux system installation CD.
Step Two, in the original set up DNS interpretation file plus MX record, file path is:/var/named/chroot/var/named/kenson.com.zone (as shown)
Detecting MX Records:
#nslookup
>set Q=MX
>linux.kenson.com
The output is as follows:
The results shown above are not a problem with DNS.
step three, modify the /etc/mail/sendmail.mc file.
#vi/ETC/MAIL/SENDMAIL.MC
Find the next and two lines:
DNL Trust_auth_mech (' EXTERNAL digest-md5 cram-md5 LOGIN PLAIN ') dnl
DNL define (' confauth_mechanisms ', ' EXTERNAL GSSAPI digest-md5 cram-md5 LOGIN PLAIN ') dnl
#刪掉上面兩行前面的 DNL
#注意: Do not leave spaces in front of trust_auth_meth and define
DNL daemon_options (' port=smtp,addr=127.0.0.1, Name=mta ') dnl
#前面加上 DNL, start this line (DNL = do not load)
#或改成下面這樣也可以
Daemon_options (' port=smtp,addr=0.0.0.0, Name=mta ') dnl
#修改端口, find the following line.
Dnldaemon_options (' Port=submission,name=msa,m=ea ') dnl
Remove the comment from the beginning of the line and modify the content to port=25:
After modification, the following:
Daemon_options (' Port=25,name=msa ') dnl
Run the M4 program and regenerate the sendmail.cf file:
#m4/ETC/MAIL/SEDNMAIL.MC >/ETC/MAIL/SENDMAIL.CF
step Four, change the Access database file access.db
1) Open the Edit Access file and add a behavior: keson.com RELAY
#vi/etc/mail/access
Save exit, make database update
#makemap Hash/etc/mail/access.db </etc/mail/access
Start Test port
#telnet localhost 25
Then enter: Ehlo localhost as shown
Step five, modify the/etc/dovecot.conf POP3 service file
#vi/etc/dovecot.conf
Change #protocols=imap IMAPS POP3 pop3s this line into
Remove the " #" comment symbol
PROTOCOLS=POP3
This line configures the functionality of the POP3 service
Step six, mail test. Restart all services (to ensure that the service is up)
#service named restart (DNS boot)
#service dovecot Restart (POP3 service start)
#service sendmail Restart (mail service startup)
Send a message with mail to test for success
#mail [email protected]
Enter the message title, subject, and press the "Ctrl+d" key to end the send.
Check the mail log and the user's mailbox for receiving mail (user mail is in "/var/spool/mail/[linux User name]" file)
The Mail log is in the "/var/log/maillog" file, you can check it yourself, of course, you may use Windows OE to test the mail, but remember that when the OE set up the user account, the Linux account name is your e-mail address for example: the root user's email address is [ Email protected] , Root's account is also [email protected] , not root.
Also pay attention to the place is to send and receive e-mail problems, pay attention to check your log, analysis of specific issues.
Mail runs on port 53 to see if your Linux system firewall is open for this port (file "/etc/sysconfig/iptables") remember to open this port.
It's over here and I hope it will be helpful to everyone.