CentOS Simple to build SMTP service

Source: Internet
Author: User
Tags aliases base64 md5 digest

This tutorial does not use MySQL to store user names and passwords, only as SMTP services,


Need to install DNS, see click Open link http://blog.csdn.net/zhidao_wenge/article/details/69982350


First, install the software:

Yum install Postfix

Yum Install cyrus*

Do not remove the following two will be the error (because do not use MySQL)

Rmp-e Cyrussaslldap

Rmp-e Cyrussaslsql


Second, edit the configuration file

Editor:/ETC/POSTFIX/MAIN.CF (for more information click Open Link, click Open link)

Queue_directory =/var/spool/postfix Command_directory =/usr/sbin daemon_directory =/usr/libexec/postfix Data_
Directory =/var/lib/postfix Mail_owner = postfix Myhostname = test01v.jira.net MyDomain = jira.com Myorigin = $mydomain Inet_interfaces = All Local_recipient_maps = Unknown_local_recipient_reject_code = Mynetworks = 10.0.0.0/24 alias_m APS = hash:/etc/aliases Alias_database = hash:/etc/aliases Home_mailbox = Maildir/smtpd_banner = $myhostname ESMTP unkn ow debug_peer_level = 2 Debugger_command = path=/bin:/usr/bin:/usr/local/bin:/usr/x11r6/bin ddd $daemon _directory/$ Process_name $process _id & sleep 5 Sendmail_path =/usr/sbin/sendmail.postfix Newaliases_path =/usr/bin/newaliases. Postfix Mailq_path =/usr/bin/mailq.postfix Setgid_group = Postdrop Html_directory = no manpage_directory =/usr/share /man sample_directory =/usr/share/doc/postfix-2.6.6/samples readme_directory =/usr/share/doc/postfix-2.6.6/readme_ FILES #增加以下 smtpd_sasl_auth_enable = yes Smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous smtpd_recipient_restrictions = Permit _mynetworks,permit_sasl_authenticated, Reject_unauth_destination


Editor: vim/etc/sasl2/smtpd.conf (for more information click to open link)

Pwcheck_method:auxprop
auxprop_plugin:sasldb
mech_list:plain login cram-md5 digest-md5
log_level:3

Editor: Vim/etc/sysconfig/saslauthd

SOCKETDIR=/VAR/RUN/SASLAUTHD
#MECH =pam
flags=sasldb


third, modify permissions and start

chmod 755/ETC/SASLDB2


Service Postfix Restart

Service SASLAUTHD Restart

Service CYRUS-IMAPD Restart

Logs can be viewed in/var/log/message and/var/log/mailsend


Iv. Modification

Alternatives--display MTA can view the default mail program, if not/usr/sbin/sendmail.postfix, you can use the following command to modify

Alternatives--config MTA


v. Increase the number of users :


Saslpasswd2-c-u ' postconf-h mydomain ' test

will allow the input two times the password, will produce the Test@mydomain, installs before the configuration can produce test@jira.com

View User name:sasldblistusers2


Vi. Testing: (See details: Click to open the link)

(Echo-n XXX | OpenSSL base64-a will output 64-bit encoding for XXX) Telnet test with Base64 encryption


telnet 127.0.0.1

AUTH LOGIN # then enter test@jira.com and password Base64 encryption information in turn


If the verification succeeds, the other server can connect to change SMTP, send the message




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.