차근차근/이것저것

centOS sendmail에서 gmail로 발송이 안됨. 9

예쁜꽃이피었으면 2017. 1. 13. 21:03


dkim설정을 할 때 domain.zone파일에 공개키를 추가해야 하는데 이 방법을 잘 모르겠다.



How to Setup DomainKeys Identified Mail (DKIM) with Postfix and Ubuntu Server

http://www.unibia.com/unibianet/systems-networking/how-setup-domainkeys-identified-mail-dkim-postfix-and-ubuntu-server


default._domainkey IN TXT "v=DKIM1; g=*; k=rsa; p=000000000EBAQUAA4GNADCBiQKXXXXXXXX..." ; ----- DKIM default for domain.tld





Creating DKIM TXT Records in Linux/UNIX BIND

https://www.unifiedemail.net/Support/KB/DomainKeys-Identified-Mail-(DKIM)-Setup-Linux-UNIX-BIND/


Add a new "Text (TXT)" resource record, enter the following:

Record name: (DKIM Selector)._domainkey.yourdomain.com.

Example: ue201009._domainkey.yourdomain.com.

Text: (This should be the value of your DKIM Public Key Record).

Example: "v=DKIM1; p=MIGfMA0GCSqGSIb4DQ(.....)z2nJSPOxvGGznkcY25w5lIYpxpVwZ/IwIDAQAB;"





open-DKIM 설치

https://www.enteroa.com/2016/05/19/open-dkim-%EC%84%A4%EC%B9%98/


@     IN      TXT     "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDj0y2e92Mkp4f1DBvBOQXgGCaCfEBKsgJ7Jh4NBNtKQevMq3nLGH0RQUuo5pGKMx+p6eTNJwueh+BN2svHmQTVGfHSNk8qWg2r8Yvfycf2ijs3Mmt126yKILo0nywv3d2z2UX7JWNjPOKxcRQe4u9wtDI+o+w5uF7TjzbidZnhowIDAQAB"





https://philio.me/setting-up-dkim-with-sendmail-on-ubuntu-14-04/


Record name
The record name should be ._domainkey prefixed with the selector name:
default._domainkey.
Any sub domain information should be appended, which opendkim-genkey doesn't do. for sub.domain.example.com you should use:
default._domainkey.sub.domain
TXT value
The value should include a minimum of the DKIM version, key and key type:
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDbpMiQR1EMmOmCYzzuHYlXho97NnX1/nFCftJLjY2NVkGlCdxMpnnoVI3oGeM1DmzdbC9eySW+GbFnPs0FrPB5Tqod1XXYI3gwrMihIyMJfsIMAU0EPJKvJjwsELNYj4UHWBhWIjusGw0AeDQuUH0sCYOkdPkOSvM2wpZsvHkDZwIDAQAB




How to install and integrate DKIM with OpenDKIM and Postfix on a CentOS 6 VPS

https://www.rosehosting.com/blog/how-to-install-and-integrate-opendkim-with-postfix-on-a-centos-6-vps/


assuming the domain in question is ‘mydomain.com’ and server’s hostname is set to ‘host.mydomain.com’


finally, edit your mydomain.com DNS zone and add the TXT record from /etc/opendkim/keys/mydomain.com/default.txt


default._domainkey      IN      TXT     ( "v=DKIM1; k=rsa; "

          "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDApHRr7ZmXRaAB+RQRbP4VdMwIrIHIP18KFtXRsv/xpWc0Gix6ZXN13fcG03KNGKZo2PY+csPkGC5quDnH5V0JEhDZ78KcDWFsU6u4fr9ktVAdt6P7jWXjcyqdHOZ8+YN4cAeU4lRFNgQvdupIcByYwzPYMgBFHfJm9014HvRqhwIDAQAB" )  ; ----- DKIM key default for mydomain.com





음.. 무슨 짓을 해도 안된다..
공백은 \로 표현하는듯.. 

음..그리고 파일 수정 후 service named restart 해보면 새로 시작되는데 
(새로시작하지 않아도 적용되긴하는듯)

잘못설정하면 새로 시작할 수 없다고 에러가 난다.


근데 왜 에러가 없는데도 공개키를 읽지 못하는 거지.



반응형