![Postfix 이메일 문제 해결](https://linux55.com/image/72527/Postfix%20%EC%9D%B4%EB%A9%94%EC%9D%BC%20%EB%AC%B8%EC%A0%9C%20%ED%95%B4%EA%B2%B0.png)
Postfix 이메일에 사용하는 서버를 변경하는 데 몇 가지 문제가 있습니다.
Linux 서버(CentOS 5)에 postfix를 설치하고 다음과 같이 설정했습니다.
/etc/postfix/main.cf에 설정을 추가했습니다.
relayhost=imap.googlemail.com
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
그런 다음 다음 내용으로 /etc/postfix/sasl_passwd 파일을 만들었습니다.
imap.googlemail.com fake_usernm:fake_passwd
다음과 같이 매핑하세요.
postmap /etc/postfix/sasl_passwd
그런 다음 모든 것이 잘 작동했지만 이제 릴레이 호스트를 smtp 서버 mail.example.co.za:26으로 변경하려고 하면 이메일이 전송되지 않는 것 같습니다. 메일 로그를 확인해 보니 다음과 같은 내용이 포함되어 있습니다.
Sep 7 09:30:23 dev postfix/pickup[32641]: E8BF874E3D4: uid=0 from=<root>
Sep 7 09:30:23 dev postfix/cleanup[32691]: E8BF874E3D4: message-id=<[email protected]>
Sep 7 09:30:23 dev postfix/qmgr[32642]: E8BF874E3D4: from=<[email protected]>, size=333, nrcpt=1 (queue active)
Sep 7 09:30:26 dev postfix/smtp[32693]: certificate verification failed for mail.example.co.za: num=20:unable to get local issuer certificate
Sep 7 09:30:26 dev postfix/smtp[32693]: certificate verification failed for mail.example.co.za: num=27:certificate not trusted
Sep 7 09:30:28 dev postfix/smtp[32693]: E8BF874E3D4: to=<[email protected]>, relay=mail.example.co.za[198.57.162.234]:26, delay=4.4, delays=0.07/0.02/3.8/0.51, dsn=5.0.0, status=bounced (host mail.example.co.za[198.57.162.234] said: 550-Verification failed for <[email protected]> 550-The mail server could not deliver mail to [email protected]. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries. 550 Sender verify failed (in reply to RCPT TO command))
Sep 7 09:30:28 dev postfix/cleanup[32691]: 9D7D374E3D6: message-id=<[email protected]>
Sep 7 09:30:28 dev postfix/qmgr[32642]: 9D7D374E3D6: from=<>, size=2642, nrcpt=1 (queue active)
Sep 7 09:30:28 dev postfix/bounce[32695]: E8BF874E3D4: sender non-delivery notification: 9D7D374E3D6
Sep 7 09:30:28 dev postfix/qmgr[32642]: E8BF874E3D4: removed
Sep 7 09:30:28 dev postfix/cleanup[32691]: A72DF74E3D1: message-id=<[email protected]>
Sep 7 09:30:28 dev postfix/qmgr[32642]: A72DF74E3D1: from=<>, size=2777, nrcpt=1 (queue active)
Sep 7 09:30:28 dev postfix/local[32696]: 9D7D374E3D6: to=<[email protected]>, relay=local, delay=0.06, delays=0.03/0.01/0/0.02, dsn=2.0.0, status=sent (forwarded as A72DF74E3D1)
Sep 7 09:30:28 dev postfix/qmgr[32642]: 9D7D374E3D6: removed
Sep 7 09:30:31 dev postfix/smtp[32693]: certificate verification failed for mail.example.co.za: num=20:unable to get local issuer certificate
Sep 7 09:30:31 dev postfix/smtp[32693]: certificate verification failed for mail.example.co.za: num=27:certificate not trusted
차이점이 무엇인지, 어떻게 해결해야 할지 모르겠습니다.
답변1
내가 겪고 있는 오류는 실제로 서버의 /etc/hosts 파일에 있는 버그로 인해 발생한 것 같습니다.
호스트 파일을 재구성하고 테스트할 수 있었습니다.
# hostname
출력이 정확합니다
dev.server.com
하지만
# hostname -f
오류를 출력하지만 재구성 후에 출력됩니다.
dev.server.com
정확하고 릴레이 호스트에서 발생한 문제를 해결했습니다.