안전하지 않은 것으로 Dovecot 이메일을 신고하는 Gmail


10

Postfix / Dovecot 이메일 서버를 성공적으로 보호했다고 생각했습니다. LetsEncrypt에서 서명 한 인증서를 가지고 있는데, 이는 내 도메인에 유효합니다.

보내기 및 받기는 제대로 작동하지만 Gmail이 안전하지 않은 이메일을 표시하기 시작한 이후로 내 서버에서 전송 된 모든 메일은 암호화되지 않은 것으로 표시됩니다.

Gmail 사용자에게는 다음과 같이 "이 메시지는 암호화되지 않았습니다"가 표시됩니다.

여기에 이미지 설명을 입력하십시오

Postfix의 main.cf다른 설정 중에서 다음과 같은 기능이 있습니다.

# SASL, for SMTP authentication
smtpd_sasl_type = dovecot
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_path = private/auth

# TLS, for encryption
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtpd_tls_CAfile = /etc/letsencrypt/live/mydomain.com/chain.pem
smtpd_tls_cert_file = /etc/letsencrypt/live/mydomain.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mydomain.com/privkey.pem
tls_random_source = dev:/dev/urandom
smtpd_client_new_tls_session_rate_limit = 10
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_exclude_ciphers =
    EXP
    EDH-RSA-DES-CBC-SHA
    ADH-DES-CBC-SHA
    DES-CBC-SHA
    SEED-SHA
smtpd_tls_dh512_param_file = ${config_directory}/certs/dh_512.pem
smtpd_tls_dh1024_param_file = ${config_directory}/certs/dh_1024.pem
disable_vrfy_command = yes
smtpd_helo_required = yes
smtpd_delay_reject = yes

Postfix의 master.cf다른 설정 중에서 다음과 같은 기능이 있습니다.

smtp      inet  n       -       -       -       -       smtpd
  -o smtpd_enforce_tls=yes
  -o smtpd_use_tls=yes
  -o smtpd_tls_security_level=encrypt

submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o broken_sasl_auth_clients=yes

Dovecot의 10-ssl.conf다른 설정 중에서 다음과 같은 기능이 있습니다.

ssl = required
ssl_ca = </etc/letsencrypt/live/mydomain.com/chain.pem
ssl_cert = </etc/letsencrypt/live/mydomain.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/mydomain.com/privkey.pem

Gmail이 인증서를 신뢰하지 않기 때문에 LetsEncrypt 인증서를 잘못 표시합니까? 아니면 내 이메일이 실제로 암호화되지 않은 상태로 전송됩니까?


1
Postfix를 게시하십시오 main.cf. 스 니펫과 관련된 모든 것을 포함하지 않았습니다.
Michael Hampton

@MichaelHampton-확실합니다. main.cf의 모든 사용자 정의 컨텐츠를 추가했습니다. 같은 그것은 단지 제외 기본적인 것들 smtpd_banner, myhostname
gavanon

답변:


11

Postfix에 다음 두 줄을 모두 추가 하여이 문제를 해결했습니다 main.cf.

smtp_tls_security_level = may
smtpd_tls_security_level = may

(나는 smtpd_tls_security_level모든 smtp_가치가 찬성하여 감가 상각 되었다고 오해의 소지가있는 기사로 설정했습니다 smtpd_.)


7

귀하의 이메일은 암호화되지 않은 상태로 발송됩니다. 최선을 다하려면 main.cf에 다음을 추가하십시오.

smtp_tls_security_level = may

Google에 전송 된 이메일에 대해 TLS 암호화를 시행하려면이를 main.cf에 추가하십시오.

# Force TLS for outgoing server connection
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
smtp_tls_CApath = /etc/postfix/rootcas/ 

/ etc / postfix / rootcas /를 신뢰할 수있는 루트 CA의 위치로 바꾸고 / etc / postfix / tls_policy 파일에 추가하십시오.

#/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
gmail.com       secure ciphers=high
google.com      secure ciphers=high
googlemail.com  secure ciphers=high

이를 통해 gmail.com., google.com 및 googlemail.com으로 전송 된 이메일이 암호화되어 SMTP 서버를 인증합니다.

인증하지 않고 암호화 만하려면 (가상 인증서가있는 사이트에 필요)

gmail.com       encrypt ciphers=high
google.com      encrypt ciphers=high
googlemail.com  encrypt ciphers=high

postfix를 다시 시작하기 전에

postmap /etc/postfix/tls_policy

고마워 내가 정말로하려고하는 것은 가능한 모든 대상에 대해 TLS를 강제 실행하고 대상이 지원하지 않는 경우 최후의 수단으로 만 안전하게 암호화되지 않은 상태로 돌아갑니다. 특정 도메인 목록을 유지 관리하지 않고도 가능합니까? TLS의 포괄적 인 강제력처럼?
gavanon

문제는 TLS를 지원하지 않는 서버와이를 지원하고 자체 서명 또는 가짜 인증서를 사용하는 서버가 많다는 것입니다. 또한 STARTLS가 일반 텍스트로 전송되면 활성 공격자가 전송 중에이를 제거 할 수 있습니다. 별도의 긴 테이블을 유지하는 것이 가장 안전하지만 가장 신뢰할 수있는 솔루션이 아니라는 것에 동의합니다.
Jofre


감사합니다. 답변의 첫 부분이 도움이되었습니다 smtp_tls_security_level = may. 그게 전부 였고 나머지 Google 특정 설정은 필요하지 않았습니다.
gavanon

5

SMTP와 관련하여 클라이언트 / 서버 관계를 고려하면 설정이 의미가 있습니다.

2.1. 기본 구조

SMTP 디자인은 다음과 같이 나타낼 수 있습니다.

              +----------+                +----------+
  +------+    |          |                |          |
  | User |<-->|          |      SMTP      |          |
  +------+    |  Client- |Commands/Replies| Server-  |
  +------+    |   SMTP   |<-------------->|    SMTP  |    +------+
  | File |<-->|          |    and Mail    |          |<-->| File |
  |System|    |          |                |          |    |System|
  +------+    +----------+                +----------+    +------+
               SMTP client                SMTP server

(Src : rfc5321.txt)

그러므로:

"smtp_tls_security_level"은 Postfix SMTP 클라이언트 용입니다. 참조 : http://www.postfix.org/postconf.5.html#smtp_tls_security_level

"smtp d _tls_security_level"은 Postfix SMTP 서버를위한 것입니다 : http://www.postfix.org/postconf.5.html#smtpd_tls_security_level

postfix가 gmail로 메일을 전송할 때 smtp_tls_security_level 설정이 관련 설정입니다.

postfix가 smtp를 통해 메일을 수신 하는 경우 smtp d _tls_security_level 설정이 관련됩니다.

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.