# cd /etc/opendkim/keys/
# mkdir mydomain.com
# opendkim-genkey -D /etc/opendkim/keys/mydomain.com -d mydomain.com -s selector
# ls -al /etc/opendkim/keys/mydomain.com
# vi /etc/opendkim/keys/mydomain.com/selector.txt
selector._domainkey IN TXT ( "v=DKIM1; k=rsa; "
"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDFsK5zq3xYuxr7q10qc36LranoE8unpiP70zclaU1Bh7DiSdafMY3K3Jn3x9b2HNf+dpAJ5w4baII7cTdi8tyySxPn4Z8zqD7VHxDojiE4ACgi3yKCKwuhSJoi44D3oakPR/2Mkv+SRWJEezouPLp6OgzVvJ5FWuJAYZtNSWMWFwIDAQAB" ) ; ----- DKIM key selector for mydomain.com
이런식으로 넣기
selector._domainkey.mydomain.com "v=DKIM1 k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDFsK5zq3xYuxr7q10qc36LranoE8unpiP70zclaU1Bh7DiSdafMY3K3Jn3x9b2HNf+dpAJ5w4baII7cTdi8tyySxPn4Z8zqD7VHxDojiE4ACgi3yKCKwuhSJoi44D3oakPR/2Mkv+SRWJEezouPLp6OgzVvJ5FWuJAYZtNSWMWFwIDAQAB"
# dig @8.8.8.8 selector._domainkey.mydomain.com txt
# vim /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:8891@localhost
# vim /etc/opendkim/TrustedHosts
127.0.0.1
localhost
mydomain.com
#vim /etc/opendkim/KeyTable
selector._domainkey.mydomain.com mydomain.com:selector:/etc/opendkim/keys/mydomain.com/selector.private
# vim /etc/opendkim/SigningTable
*@mydomain.co.kr selector._domainkey.mydomain.com
# vim /etc/mail/sendmail.mc
::: 맨 하단에 추가 아래문구 추가.
INPUT_MAIL_FILTER(`opendkim',`S=inet:8891@localhost')dnl
::: 저장종료
# cd /etc/mail/
# m4 sendmail.mc > sendmail.cf
# systemctl restsart opendkim
# systemctl enable opendkim
'Linux&Ubuntu > 서버' 카테고리의 다른 글
Rocky 8 nfs S,C 설치 (0) | 2024.03.04 |
---|---|
linux hostname 변경 (0) | 2024.02.19 |
rocky9 시간동기화 (0) | 2024.01.23 |
linux stress 부하 테스트 (0) | 2024.01.18 |
파일잠금 방법 chattr & lsattr (1) | 2023.11.13 |