***************************


postfix 設定 
[root@falcon21 ~]# vi /etc/postfix/main.cf

75 myhostname = falcon21.space // mail.falcon21.space ではない。
83 mydomain = falcon21.space
99 myorigin = $mydomain
116 inet_interfaces = all
119 inet_protocols = ipv4
164 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
264 mynetworks = 192.168.2.0/24, 192.168.0.0/24 127.0.0.0/8
419 home_mailbox = Maildir/
574 smtpd_banner = $myhostname ESMTP

最終行へ追記
mailbox_size_limit = 1073741824
smtpd_sasl_type = dovecot
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject



---------------------------

[root@falcon21 ~]# vi /etc/postfix/master.cf

16 submission inet n - n - - smtpd
19 -o smtpd_sasl_auth_enable=yes
------------------------

SMTP認証設定
[root@falcon21 ~]# yum -y install cyrus-sasl
インストール:
cyrus-sasl.x86_64 0:2.1.26-23.el7

完了しました!


[root@falcon21 ~]# systemctl start saslauthd
[root@falcon21 ~]# systemctl enable saslauthd
Created symlink from /etc/systemd/system/multi-user.target.wants/saslauthd.service to /usr/lib/systemd/system/saslauthd.service.

[root@falcon21 ~]# systemctl status saslauthd
saslauthd.service - SASL authentication daemon.
Loaded: loaded (/usr/lib/systemd/system/saslauthd.service; enabled; vendor preset: disabled)
Active: active (running) since 月 2019-02-18 20:31:59 JST; 43s ago
Main PID: 13326 (saslauthd)
CGroup: /system.slice/saslauthd.service
├─13326 /usr/sbin/saslauthd -m /run/saslauthd -a pam
├─13328 /usr/sbin/saslauthd -m /run/saslauthd -a pam
├─13329 /usr/sbin/saslauthd -m /run/saslauthd -a pam
├─13330 /usr/sbin/saslauthd -m /run/saslauthd -a pam
└─13331 /usr/sbin/saslauthd -m /run/saslauthd -a pam

2月 18 20:31:59 falcon21.space systemd[1]: Starting SASL authentication daemon....
2月 18 20:31:59 falcon21.space saslauthd[13326]: detach_tty : master pid is: 13326
2月 18 20:31:59 falcon21.space saslauthd[13326]: ipc_init : listening on socket: /run/saslauthd/mux
2月 18 20:31:59 falcon21.space systemd[1]: Started SASL authentication daemon..
Hint: Some lines were ellipsized, use -l to show in full.

----------------------
メールボックス自動作成設定
[root@falcon21 ~]# mkdir -p /etc/skel/Maildir/{new,cur,tmp}
[root@falcon21 ~]# chmod -R 700 /etc/skel/Maildir/

----------------------

存在しないユーザー宛メールの破棄
[root@falcon21 ~]# vi /etc/postfix/main.cf
最終行へ追加

688 local_recipient_maps =
689 luser_relay = unknown_user@localhost

[root@falcon21 ~]# echo unknown_user: /dev/null >> /etc/aliases
[root@falcon21 ~]# newaliases

--------------------
[root@falcon21 ~]# systemctl restart postfix
[root@falcon21 ~]# systemctl enable postfix
[root@falcon21 ~]# systemctl status postfix
postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: active (running) since 月 2019-02-18 20:36:44 JST; 1min 22s ago
Main PID: 13474 (master)
CGroup: /system.slice/postfix.service
├─13474 /usr/libexec/postfix/master -w
├─13475 pickup -l -t unix -u
└─13476 qmgr -l -t unix -u

2月 18 20:36:44 falcon21.space systemd[1]: Starting Postfix Mail Transport Agent...
2月 18 20:36:44 falcon21.space postfix/postfix-script[13472]: starting the Postfix mail system
2月 18 20:36:44 falcon21.space postfix/master[13474]: daemon started -- version 2.10.1, configuration...fix
2月 18 20:36:44 falcon21.space systemd[1]: Started Postfix Mail Transport Agent.
Hint: Some lines were ellipsized, use -l to show in full.


---------------------------
TCP25番、TCP587番ポート開放
*************************************************************

Dovecotインストール設定
[root@falcon21 ~]# yum -y install dovecot
インストール:
dovecot.x86_64 1:2.2.36-3.el7

完了しました!


[root@falcon21 ~]# vi /etc/dovecot/conf.d/10-mail.conf
30 mail_location = maildir:~/Maildir


[root@falcon21 ~]# vi /etc/dovecot/conf.d/10-auth.conf
10 disable_plaintext_auth = no

[root@falcon21 ~]# vi /etc/dovecot/conf.d/10-ssl.conf
8 ssl = no

---------------------------------------

Dovecot起動
[root@falcon21 ~]# systemctl start dovecot
[root@falcon21 ~]# systemctl enable dovecot
Created symlink from /etc/systemd/system/multi-user.target.wants/dovecot.service to /usr/lib/systemd/system/dovecot.service.

[root@falcon21 ~]# systemctl status dovecot -l
dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled)
Active: active (running) since 月 2019-02-18 20:43:03 JST; 46s ago
Docs: man:dovecot(1)
http://wiki2.dovecot.org/
Main PID: 13730 (dovecot)
CGroup: /system.slice/dovecot.service
├─13730 /usr/sbin/dovecot
├─13733 dovecot/anvil
├─13734 dovecot/log
└─13736 dovecot/config

2月 18 20:43:03 falcon21.space systemd[1]: Starting Dovecot IMAP/POP3 email server...
2月 18 20:43:03 falcon21.space dovecot[13730]: master: Dovecot v2.2.36 (1f10bfa63) starting up for imap, pop3, lmtp (core dumps disabled)
2月 18 20:43:03 falcon21.space systemd[1]: PID file /var/run/dovecot/master.pid not readable (yet?) after start.
2月 18 20:43:03 falcon21.space systemd[1]: Started Dovecot IMAP/POP3 email server.

**********************************************************************
投票数:0 平均点:0.00

 
Back to Top