Configure mailserver in linux

Source: Internet
Author: User
Tags imap dovecot
Configure mailserver in linux 1. configure yum installation tool ① enter the yum Directory [root @ bj ~] # Cd/etc/yum. repos. d ② configure yum. repo [root@bjyum.repos.d] # cprhel-debuginfo.repoyum.repo convert yum. modify repo to the following content: [root @ bj linux configure mail server 1. configure yum installation tool ① enter the yum Directory [root @ bj ~] # Cd/etc/yum. repos. d ② configure yum. repo [root @ bj yum. repos. d] # cprhel-debuginfo.repo yum. repo convert yum. modify the repo to [root @ bj yum. repos. d] # cat yum. repo [Base] name = Red Hat Enterprise Linux baseurl = file:///media/Server Enabled = 1 gpgcheck = 0 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ③ Mount the disc to the/media Directory [root @ bj ~] # Mount/dev/cdrom/media/2. install sendmail and dovecot [root @ bj ~] through yum # Yum install-y sendmail * ---- sendmail is responsible for sending emails (smtp protocol, port 25) [root @ bj ~] # Yum install-y dovecot * ---- dovecot is responsible for receiving emails (pop3 protocol, port 110, imap protocol, port 143) 3. configure sendmail ① cd/etc/mail m4 sendmail. cf> sendmail. mc ② vi sendmail. mc ---- query 127.0.0.1 and change it to 0.0.0.0 (sendmail is only responsible for sending local emails by default, and 0.0.0.0 will listen to emails from any address) ③ start sendmail service 1. modify/etc/hosts 192.168.6.130 bj.siqian.com (set the host name to the host name. domain name method, otherwise the email cannot be received) 2. modify/etc/sysconfig/network hostname = bj.siqian.com 3, then run hostname bj.siqian.com 4, start sendmail ser Vice sendmail start 5. View smtp [root @ bj ~] # Netstat-an | grep: 25 tcp 0 0 0.0.0.0: 25 0.0.0.0: * LISTEN ④ configure mail receipt [root @ bj ~] # Vi/etc/dovecot. conf: # protocols = imap pop3 lmtp ---- uncomment and change to protocols = imap pop3 lmtp ⑤ start dovecot service dovecotstart ----- view pop3, imap [root @ bj ~] # Netstat-an | grep: 110 tcp 0 0 ::: 110 ::: * LISTEN 4. send and receive emails ① write emails and send emails [root @ bj ~] # Mail-s "oracle" oracle test mail for oracle !!! Cc: The root Cc function is the shortcut key ctl + d ② to receive emails [root @ bj ~] # Mail Mail version 8.1 6/6/93. Type? For help. "/var/spool/mail/root": 5 messages 5 new> N 1 logwatch@localhost.l Thu Feb 2119:21 43/1563 "Logwatch for node1 (Linux) "N 2logwatch@localhost.l Fri Feb 2213:08 93/2804" Logwatch for node1 (Linux) "N 3logwatch@bj.siqian.com Mon Jul 1515: 08 95/2901" Logwatch for bj (Linux) "N 4logwatch@bj.siqian.com Mon Jul 1515: 32 54/1936 "Logwatch for bj.siqian.com (Linux)" N 5root@bj.siqian.com Mon Jul 1516: 21 17/557 "oracle" & 5 Message 5: From root@bj.siqian.com Mon Jul 15 16:21:14 2013 Date: Mon, 15 Jul 2013 16:21:14 + 0800 From: root To: oracle@bj.siqian.com Subject: oracle Cc: root@bj.siqian.com test mail for oracle !!! Change the oracle user to view the email [root @ bj mqueue] # su-oracle [oracle @ bj ~] $ Mail Mail version 8.1 6/6/93. Type? For help. "/var/spool/mail/oracle": 1 message 1 new> N 1 root@bj.siqian.com Mon Jul15 16:21:14 17/557 "oracle" & 1 Message 1: From root@bj.siqian.com Mon Jul 15 2013 Date: mon, 15 Jul 2013 16:21:14 + 0800 From: root To: oracle@bj.siqian.com Subject: oracle Cc: root@bj.siqian.com test mail for oracle !!!
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.