open dkim email server google 스팸

2022. 5. 26. 17:24
 - 저장소 init centOS 5 버전대
# wget -P /tmp http://mirror.pnl.gov/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -Uvh /tmp/epel-release-5-4.noarch.rpm
# rm -f /tmp/epel-release-5-4.noarch.rpm
 
- 저장소 init centOS 6 버전대
# wget -P /tmp http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -Uvh /tmp/epel-release-6-8.noarch.rpm
# rm -f /tmp/epel-release-6-8.noarch.rpm
 
 - opendkim 설치
# yum install opendkim

 

 

mkdir -p 옵션은 중간에 존재하지 않는 디렉토리까지 생성
# mkdir -p /etc/opendkim/keys/yanghyunsuk.site
# cd /etc/opendkim/keys/yanghyunsuk.site

 

/usr/sbin/opendkim-genkey -D /etc/opendkim/keys/yanghyunsuk.site -d yanghyunsuk.site -s api
# chown -R opendkim.opendkim /etc/opendkim/keys/yanghyunsuk.site
# chmod 640 /etc/opendkim/keys/yanghyunsuk.site/api.private
# chmod 644 /etc/opendkim/keys/yanghyunsuk.site/api.txt

genkey  옵션이 사용이 안될시  tools 다운로드 
yum install opendkim-tools

# vi /etc/opendkim/KeyTable
아래 내용 추가
api._domainkey.yanghyunsuk.site yanghyunsuk.site:api:/etc/opendkim/keys/yanghyunsuk.site/api.private
# vi /etc/opendkim/SigningTable
내용 추가
*** ***        api._domainkey.yanghyunsuk.site
*** ***        api._domainkey.yanghyunsuk.site
 
# vi /etc/opendkim/TrustedHosts
내용 추가
yanghyunsuk.site
api.yanghyunsuk.site

 

 

 

 

cat /etc/opendkim/keys/yanghyunsuk.site/api.txt

api._domainkey  IN      TXT     ( "v=DKIM1; k=rsa; "
          "p=MIGfMA0GCSqGSIb3DQEBAQU34124azsdasdfasdftawetawetgasdgasdfasdfasdfaewra2345aa31l5w+XhZeyWwI9/YTxtwMo+

가비아 설정시

 

 

# vi /etc/opendkim.conf 

PidFile                 /var/run/opendkim/opendkim.pid
Mode                    sv
Syslog                  yes
SyslogSuccess           yes
LogWhy                  yes
UserID                  opendkim:opendkim
Socket                  inet:8891@localhost
Umask                   002
SendReports             yes
SoftwareHeader          yes
Canonicalization        relaxed/relaxed
Selector                default
MinimumKeyBits          1024
KeyTable                /etc/opendkim/KeyTable
SigningTable            refile:/etc/opendkim/SigningTable
ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts
InternalHosts           refile:/etc/opendkim/TrustedHosts
OversignHeaders         From

# systemctl restart opendkim
# systemctl enable opendkim
# vi /etc/postfix/main.cf
위 파일의 끝에 아래 내용 추가
smtpd_milters = inet:localhost:8891
non_smtpd_milters = $smtpd_milters
milter_default_action = accept
 
# systemctl restart postfix
# systemctl enable postfix

'IT' 카테고리의 다른 글

헤놀로지 7.1 후기  (0) 2022.06.27
yona to redmine /redmine to yona .. 후 ..  (0) 2022.06.23
리눅스 본딩설정 linux bonding  (0) 2022.05.26
파티션 추가 설정 및 mariadb 경로설정  (0) 2021.02.23
mriadb 10.3.7  (0) 2021.02.22

BELATED ARTICLES

more