Linux server postfix service configuration

Source: Internet
Author: User
Tags imap dovecot mx record

Linux server postfix service configuration postfix (MTA) mail System role 1, MUA (mail User proxy) mail/mutt foxmail outlook web2, MTA (mail Transmission proxy) exchange notes sendmail postfix qmail 3. MDA (Mail Distribution agent) Mail Application Protocol 1. SMTP, Simple Mail transmission protocol, TCP port 25, encrypted port 465, and mail, it generally works on mail server 2, POP3, Post Office Protocol version 3rd, TCP port 110, encrypted port 995 receiving mail 3, IMAP4, Internet Message Access Protocol version 4th, TCP port 143, encrypted port 993) user01@sina.com.cn --- smtp ----> (sina) --- smtp ----- [google] {user02} ---- pop3/imap4 (received) mua mta mda [MX] MUA test mail sent: ben Machine sending: mail :( mail --> MTA (localhost: 25) --> root @ localhost -->/var/spool/mail/root) # echo "123" | mail-s "a test mail" root @ localhost # sendmail a @ localhosthello,. test mail from sendmail .. network Transmission: telnet localhost 25 -- access the local email server ehlo localhost -- advertise the email server mail from: root @ localhost -- Sender rcpt: a @ localhost -- recipient data -- Mail bodySubject: A Test Mail -- Topic fdafdafdsa fdafdfdsafdafdas -- Mail content. -- end the description of the Postfix Logical Structure: 1. The Oval icon indicates the postfix program. 2. The yellow square indicates the shipping directory of the postfix. 3. The blue square indicates that the postfix process calls the external file during the shipping process. Conclusion: 1. postfix adopts modular design and pipeline operations. 2. postfix can receive emails in two ways: one local (sendmail) and the other network (smtp). 3. There are three outlets: local, smtp, pipe install postfix1. If sendmail exists, stop the old MTA # service sendmail stop # chkconfig sendmail off 2. install postfix # yum-y install postfix # rpm-ql postfix/etc/pam. d/smtp. postfix -- pam verification settings. By default, postfix uses system verification/etc/postfix -- to store the configuration file/etc/postfix/access -- smtp access Control/etc/postfix/main. cf -- master configuration file. postfix: All the configurations are in this/etc/postfix/master. cf -- core configuration file for email program scheduling/ Sbin/-- postfix administrator command (root)/usr/libexec/postfix -- commands that all users can call/var/spool/postfix -- mail delivery switch directory/etc/rc. d/init. d/postfix -- start the script instance: postfix (MTA smtp) + dovecot (pop3/imap) + squirrelmail (webmail) + apache + php + bind confirmed DNS configuration (MX record) /Host Name, pointing the preferred DNS of the email server to the correct DNS server # nslookup> set type = mx> baidu. comServer: 192.168.0.39Address: 192.168.0.39 #53 baidu.com mail exchanger = 5 mail.baidu.com. configure the Host Name: # hostname mail.baidu.com # v Im/etc/sysconfig/networkHOSTNAME = mail.baidu.com # vim/etc/hosts192.168.0.16 mail.baidu.com baidu.com mail # postconf-nalias_database = hash:/etc/aliasesalias_maps = hash: /etc/aliasescommand_directory =/usr/sbinconfig_directory =/etc/postfixdaemon_directory =/usr/libexec/postfixdebug_peer_level = 2home_mailbox = Maildir/-- storage format of the mailbox, mailbox only has one file storage email html_directory = noinet_interfaces = allmail_o Wner = postfixmailq_path =/usr/bin/mailq. postfixmanpage_directory =/usr/share/manmydestination = $ mydomain, localhostmydomain = baidu. commyhostname = mail. baidu. commynetworks = 192.168.0.0/24 myorigin = $ mydomainnewaliases_path =/usr/bin/newaliases. postfixqueue_directory =/var/spool/postfixreadme_directory =/usr/share/doc/postfix-2.3.3/README_FILESsample_directory =/usr/share/doc/postfix-2.3. 3/samplessendmail_path =/usr/sbin/sendmail. postfixsetgid_group = postdropunknown_local_recipient_reject_code = 550 # service postfix restart # chkconfig postfix on # netstat-tnlp | grep: 25 -- postfix use the smtp protocol to use dovecot for 110/143 reception # yum-y install dovecot # vim/etc/dovecot/conf. d/10-auth.conf -- enable dovecot to support disable_plaintext_auth = no (error-ERR Plaintext authentication disallowed on non-secure (SSL /TLS) connections .) # service dovecot start # chkconfig dovecot onnetstat-tlp | grep dovetcp 0 0 *: imaps *: * LISTEN 21275/dovecot tcp 0 0 *: pop3s *: * LISTEN 21275/dovecot tcp 0 0 *: pop3 *: * LISTEN 21275/dovecot tcp 0 0 *: imap *: * LISTEN 21275/dovecot # telnet localhost 110 Trying 127.0.0.1... connected to localhost. localdomain (127.0.0.1 ). escape character is '^]'. + OK Dovecot ready. user mail_a -- use mai Rochelle a logon + OKpass 123 -- password + OK Logged in. list -- list new emails + OK 1 messages: 1 499. retr 1 -- read the email numbered 1. 2. Use outlook or foxmail graphics client to receive emails. ++ test: send echo "hello a" | mail-s "a test mail from local" a@baidu.com: 1) $ HOME/Maildir 2) Locally) telnet localhost 110 user a pass 1 network to send [root @ mail new] # telnet localhost 25 Trying: 1... telnet: connect to address: 1: Connection refusedTrying 12 7.0.0.1... connected to localhost. escape character is '^]'. 220 mail.baidu.com ESMTP Postfixehlo localhost250-mail.baidu.com250-PIPELINING250-SIZE mongodsnmail from: a@baidu.com250 2.1.0 Okrcpt to: B @baidu.com250 2.1.5 Okdata354 End data with <CR> <LF>. <CR> <LF> subject: a test mailhi B !..... 250 2.0.0 OK: queued as 513CD609B4quit221 2.0.0 ByeConnection closed by foreign host. receive mail 1) $ HOME/Maildir 2) telnet localhost 110 user a pass 1 [root @ mail new] # telnet localhost 110 Trying: 1... connected to localhost. escape character is '^]'. + OK Dovecot ready. user B + OKpass 1 + OK Logged in. list + OK 1 messages: 1 432. retr 1 + OK 432 octetsReturn-Path: <a@baidu.com> X-Original-To: B @baidu.comDelivered-To: B @ Baidu. comReceived: from localhost (localhost [127.0.0.1]) by mail.baidu.com (Postfix) with ESMTP id 513CD609B4for <B @baidu.com>; Thu, 13 Jun 2013 14:16:05 + 0800 (CST) subject: a test mailMessage-Id: <20130613061622.513CD609B4@mail.baidu.com> Date: Thu, 13 Jun 2013 14:16:05 + 0800 (CST) From: a@baidu.comTo: undisclosed-recipients:; hi B !....

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.