Linuxserverpostfix service configuration

Source: Internet
Author: User
Tags imap dovecot mx record
Linuxserverpostfix service configuration postfix (MTA) mail System Role 1, MUA (mail User proxy) mail/muttfoxmailoutlookweb2, MTA (mail transmission proxy) exchangenotessendmailpostfixqmail3, MDA (mail distribution generation... 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 of version 3rd, TCP port 110, encrypted port 995 receiving mail 3, IMAP4, and Internet Message Access of version 4th Protocol, TCP port 143, encrypted port 993) user01@sina.com.cn --- smtp ----> (sina) --- smtp ----- [google] {user02} ---- pop3/imap4 (accept) mua mta mda [MX] MUA test mail: Sent by the local machine: mail :( mail --> MTA (localhost: 25) --> root @ localhost -->/var/spool/mail/root) # echo "123" | mail-s "a test mail" root @ localhost # sendmail a @ localhosthello, a. 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 to: a @ localhost -- recipient data -- email bodySubject: A Test Mail -- topic fdafdafdsa fdafdfdsafdafdas -- content of the email. -- describe the logical structure of the Postfix: 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 external files 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 can be called by all users/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 host name: # hostname hosts # vim/etc/sysconfig/networkHOSTNAME = hosts # 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_owner = 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/users =/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 mail_a to log on + 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 127.0.0.1... connected to localhost. escape character is '^]'. 220 mail.baidu.com ESMTP Postfixehlo localhost250-mail.baidu.com250-PIPELINING250-SIZE 1024213250-vrfy250-etrn250-enhancedstatuscodes250-8bitmime250 DSNmail from: a@baidu.com250 2.1.0 Okrcpt to: B @baidu.com250 2.1.5 Okdata354 End data . 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: 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 ; 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 !....

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.