[главная] | [каталоги]

создан: 2021-02-24 19:31:57
пользователь: cloud раздел: linux
[просмотров|82]
Почтовый сервер из Postfix, Dovecot и MySQL + opendkim
Postfix, Dovecot и MySQL

apt install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-mysql mysql-server

Почтовый сервер из Postfix, Dovecot и MySQL
https://ixnfo.com/postfix-dovecot-mysql.html

postfix main.cf
# dkim
milter_default_action = accept
milter_protocol = 2
non_smtpd_milters = inet:localhost:12301
smtpd_milters = inet:localhost:12301

opendkim

apt-get install opendkim opendkim-tools
http://www.codenet.ru/webmast/dkim-postfix-debian/

0.
useradd opendkim -m -s /sbin/nologin

1.
mkdir /etc/opendkim

2.
opendkim-genkey -D /etc/opendkim/ -d example.com -s example.com
opendkim-genkey -D /etc/opendkim/ -d example2.com -s example2.com

3.
/etc/opendkim.conf
AutoRestart Yes
AutoRestartRate 10/1h
UMask 002
Syslog yes
SyslogSuccess Yes
LogWhy Yes
Canonicalization relaxed/simple
ExternalIgnoreList refile:/etc/opendkim/TrustedHosts
InternalHosts refile:/etc/opendkim/TrustedHosts
KeyTable refile:/etc/opendkim/KeyTable
SigningTable refile:/etc/opendkim/SigningTable
Mode sv
PidFile /var/run/opendkim/opendkim.pid
SignatureAlgorithm rsa-sha256
UserID opendkim:opendkim
Socket inet:12301@localhost

4.
nano /etc/opendkim/TrustedHosts
127.0.0.1
::1
192.168.0.1/24

*.example.com
*.example2.com

5.
nano /etc/opendkim/KeyTable
mail._domainkey.example.com fizord.ru:mail:/etc/opendkim/example.com.private
mail._domainkey.example2.com cl0oud.ru:mail:/etc/opendkim/example2.com.private

6.
nano /etc/opendkim/SigningTable
*@example.com mail._domainkey.example.com
*@example2.com mail._domainkey.example2.com

7.
[u]nano ...
загрузить
ещё

fizord.ru © 2021
site by cl0oud