집의 라우터 / 방화벽 뒤에있는 postfix / dovecot 메일 서버 구성을 완료하려고합니다. 저는 Mint / Ubuntu 12.04에 있습니다.
가까워요. SSL을 통해 이메일을 연결 / 검색 할 수 있지만 SSL을 사용하지 않을 때만 사용자 이름 / 암호 만 클라이언트에서 이메일을 보낼 수 있습니다.
/etc/postfix/main.cf에서 "smtpd_tls_auth_only = yes"로 SSL 연결을 시도하고 내 클라이언트에서 SSL을 활성화하면 전송할 수 없습니다.
다음은 몇 가지 주석과 함께 로그에서 (수정 된) 관련 줄이라고 생각하는 몇 가지입니다. 나는 홀수 포트 번호로 들어오고 있습니다. 내 인증서가 오래되었고 CN이 더 이상 서버와 일치하지 않습니다. (그러나 이것이 문제라면 왜 내가 그들을 사용하여 IMAP 검색을 할 수 있습니까?)
Oct 18 22:13:02 ghost postfix / smtpd [3342] : 연결 설정 Oct 18 22:13:02 ghost postfix / smtpd [3339] : auto_clnt_close : private / tlsmgr 스트림 연결 해제 Oct 18 22:13:02 ghost postfix / smtpd [3342] : master_notify : 상태 0 Oct 18 22:13:02 ghost postfix / smtpd [3342] : name_mask : resource Oct 18 22:13:02 ghost postfix / smtpd [3342] : name_mask : software Oct 18 22:13 : 02 ghost postfix / smtpd [3342] : 라우터에서 연결 [XXX.XX.180.81]
내 공용 IP가 아닌 localhost에서 연결을 기대합니다. 여기서 무슨 일이 일어나는지 잘 모르겠습니다.
Oct 18 22:13:02 ghost postfix / smtpd [3342] :> router [XXX.XX.180.81] : 220 ghost.domain.net ESMTP Postfix (Ubuntu) Oct 18 22:13:02 ghost postfix / smtpd [3342] : 라우터 [XXX.XX.180.81] : 502 5.5.2 오류 : 명령이 인식되지 않음 10 월 18 일 22:13:02 ghost postfix / smtpd [3342] : 라우터 [XXX.XX.180.81] : 502 5.5.2 오류 : 명령 인식되지 않음 Oct 18 22:13:02 ghost postfix / smtpd [3342] : router [XXX.XX.180.81] : 500 5.5.2 Error : 잘못된 구문 Oct 18 22:13:02 ghost postfix / smtpd [3342] : smtp_get : EOF ... Oct 18 22:13:02 ghost postfix / smtpd [3342] : 라우터 [XXX.XX.180.81]에서 UNKNOWN 후 연결 끊김
첫 번째 시도의 명백한 끝
다음 시도는 실제로 인증서 정보를 전달하지만 궁극적으로 실패합니다.
Oct 18 22:13:02 ghost postfix / smtpd [3339] :> router [XXX.XX.180.81] : 220 ghost.domain.net ESMTP Postfix (Ubuntu) Oct 18 22:13:02 ghost postfix / smtpd [3339] :
위의 줄이 혼동됩니다. 'imac.home'은 이메일 클라이언트의 컴퓨터입니다 ...
10 월 18 일 22:13:02 ghost postfix / smtpd [3339] : match_list_match : 라우터 : 일치하지 않음 Oct 18 22:13:02 ghost postfix / smtpd [3339] : match_list_match : XXX.XX.180.81 : 일치하지 않음 Oct 18 22 : 13:02 ghost postfix / smtpd [3339] :> 라우터 [XXX.XX.180.81] : 250-ghost.domain.net Oct 18 22:13:02 ghost postfix / smtpd [3339] :> 라우터 [XXX.XX. 180.81] : 250-PIPELINING Oct 18 22:13:02 ghost postfix / smtpd [3339] :> router [XXX.XX.180.81] : 250-SIZE 10240000 Oct 18 22:13:02 ghost postfix / smtpd [3339] : > 라우터 [XXX.XX.180.81] : 250-VRFY Oct 18 22:13:02 ghost postfix / smtpd [3339] :> 라우터 [XXX.XX.180.81] : 250-ETRN Oct 18 22:13:02 ghost postfix / smtpd [3339] :> 라우터 [XXX.XX.180.81] : 250-STARTTLS Oct 18 22:13:02 ghost postfix / smtpd [3339] :> 라우터 [XXX.XX.180.81] : 250-ENHANCEDSTATUSCODES Oct 18 22:13:02 ghost postfix / smtpd [3339] :> 라우터 [XXX.XX.180.81] : 250-8BITMIME Oct 18 22:13:02 ghost postfix / smtpd [3339] :> 라우터 [XXX.XX. 180.81] : 250 DSN Oct 18 22:13:02 ghost postfix / smtpd [3339] : router [XXX.XX.180.81] : 220 2.0.0 Ready to start TLS Oct 18 22:13:02 ghost postfix / smtpd [3339 ] : 라우터에서 TLS 연결 설정 [XXX.XX.180.81] Oct 18 22:13:02 ghost postfix / smtpd [3339] : router [XXX.XX.180.81] : TLS 암호 목록 "aNULL : -aNULL : ALL : + RC4 : @STRENGTH " Oct 18 22:13:02 ghost postfix / smtpd [3339] : auto_clnt_open : connected to private / tlsmgr Oct 18 22:13:02 ghost postfix / smtpd [3339] : private / tlsmgr : 원하는 속성 : 상태 Oct 18 22:13:02 ghost postfix / smtpd [3339] : attr request = seed 전송 Oct 18 22:13:02 ghost postfix / smtpd [3339] : send attr size = 32 Oct 18 22:13:02 ghost postfix / smtpd [3339] : input attribute name : status Oct 18 22:13:02 ghost postfix / smtpd [3339] : 입력 속성 값 : 0 Oct 18 22:13:02 ghost postfix / smtpd [3339] : private / tlsmgr : 원하는 속성 : seed Oct 18 22:13:02 ghost postfix / smtpd [3339] : 입력 속성 이름 : seed Oct 18 22:13:02 ghost postfix / smtpd [3339] : 입력 속성 값 : CYbyt + Fx2lpkfU7NordArB5Snqm93U4t5J / YuWwf2xA = Oct 18 22:13:02 ghost postfix / smtpd [3339] : private / tlsmgr : 원하는 속성 : (목록 종결 자) Oct 18 22:13:02 ghost postfix / smtpd [3339] : 입력 속성 이름 : (end) Oct 18 22:13:02 ghost postfix / smtpd [3339] : SSL_accept : before / accept 초기화 10 월 18 일 22:13:02 ghost postfix / smtpd [3339] : 21104A00 [21110E00]에서 읽음 (11 바이트 => -1 (0xFFFFFFFF)) Oct 18 22:13:02 ghost postfix / smtpd [3339] : 21104A00에서 읽음 [21110E00] (11 bytes => 11 (0xB)) Oct 18 22:13:02 ghost postfix / smtpd [3339] : 0000 16 03 01 00 a4 01 00 00 | a0 03 01
특정 데이터
Oct 18 22:13:02 ghost postfix / smtpd [3339] : 009d- Oct 18 22:13:02 ghost postfix / smtpd [3339] : SSL_accept : SSLv3 read client hello A Oct 18 22:13:02 ghost postfix / smtpd [3339] : SSL_accept : SSLv3 쓰기 서버 hello A Oct 18 22:13:02 ghost postfix / smtpd [3339] : SSL_accept : SSLv3 쓰기 인증서 A Oct 18 22:13:02 ghost postfix / smtpd [3339] : SSL_accept : SSLv3 쓰기 키 교환 A Oct 18 22:13:02 ghost postfix / smtpd [3339] : SSL_accept : SSLv3 write server done A Oct 18 22:13:02 ghost postfix / smtpd [3339] : write to 21104A00 [2111E7B8] (1455 bytes => 1455 (0x5AF))
인증서 데이터
Oct 18 22:13:02 ghost postfix / smtpd [3339] : 05ac- Oct 18 22:13:02 ghost postfix / smtpd [3339] : SSL_accept : SSLv3 플러시 데이터 Oct 18 22:13:02 ghost postfix / smtpd [3339 ] : 21104A00에서 읽음 [21110E03] (5 바이트 => -1 (0xFFFFFFFF)) 10 월 18 일 22:13:02 ghost postfix / smtpd [3339] : 21104A00에서 읽음 [21110E03] (5 바이트 => 0 (0x0)) Oct 18 22:13:02 ghost postfix / smtpd [3339] : SSL_accept : SSLv3 읽기 클라이언트 인증서 A에 실패했습니다. Oct 18 22:13:02 ghost postfix / smtpd [3339] : 라우터의 SSL_accept 오류 [XXX.XX.180.81] : 연결 끊김
...
Oct 18 22:13:02 ghost postfix / smtpd [3339] : 라우터에서 STARTTLS 후 연결 끊김 [XXX.XX.180.81] Oct 18 22:13:02 ghost postfix / smtpd [3339] : 라우터에서 연결 해제 [XXX.XX .180.81]
다음에 무엇을 시도해야할지 모르겠습니다.
Hubert. 단서를 주셔서 감사합니다. CA 파일 경로를 활성화하지 않았습니다. 나는 새로운 인증서 파일로 전환하는 것뿐만 아니라 그것을 수행했지만 오류가 남아 있습니다-갑작스러운 연결 끊김.
다음은 내 /etc/postfix/main.cf 파일입니다 (편집 포함).
# 주석이 달린 더 완전한 내용은 /usr/share/postfix/main.cf.dist를 참조하십시오. # 버전 smtpd_banner = $ myhostname ESMTP $ mail_name (Ubuntu) biff = no # .domain 추가는 MUA의 작업입니다. append_dot_mydomain = no # "지연된 메일"경고를 생성하기 위해 다음 줄의 주석 처리를 제거 #delay_warning_time = 4h # smtp는 POSTFIX에서 OUTBOUND입니다. # smtp_use_tls = yes smtp_sasl_mechanism_filter = 로그인 smtp_sasl_auth_enable = yes smtp_sasl_database = yes smtp_sasl_password_maps : $ cache {data_directory} / smtp_scache # Scott의 물건 smtp_sasl_security_options = noanonymous # 일반 릴레이 호스트 = [127.0.0.1] : 50025 #################### myhostname = ghost.domain.net mydomain = ghost.domain.net myorigin = $ myhostname alias_maps = 해시 : / etc / aliases alias_database = 해시 : / etc / aliases #myorigin = / etc / mailname mydestination = $ myhostname localhost. $ mydomain localhost $ mydomain #relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [:: 1] / 128 192.168.1.0/24 #mailbox_command = procmail -a "$ EXTENSION" mailbox_command = / usr / lib / dovecot / deliver -c /etc/dovecot/conf.d/01-mail-stack-delivery.conf -m "$ { EXTENSION} " mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all # myshost smtpd_sasl_local_domain = $ myhostname smtpd_sasl_auth_enable = 예 smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = 예 smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination #smtpd_tls_auth_only = 아니오 smtpd_tls_auth_only = 예 smtp_tls_security_level = 수 smtpd_tls_security_level = 수 smtp_tls_note_starttls_offer = 예 smtpd_tls_key_file = /etc/postfix/ghost.domain.net.key smtpd_tls_cert_file = / 등 /postfix/ghost.domain.net.crt #smtpd_tls_cert_file = /etc/apache2/ssl/apache.pem #smtpd_tls_key_file = /etc/apache2/ssl/apache.key smtpd_tls_CAfile = /etc/postfix/ca.crt smtpd_tls_loglevel = 3 smtpd_tls_received_header = 예 smtpd_tls_session_cache_timeout = 3600S tls_random_source = DEV :는 / dev / urandom을 # 고유의 smtpd_use_tls = 예 smtpd_tls_session_cache_database = BTREE : $ {data_directory} / smtpd_scache inet_protocols = IPv4의 home_mailbox = Maildir 형식 / smtpd_sasl_type = 비둘기장 # -auth smtpd_sasl_path = / 개인의 비둘기장 - 인증 smtpd_sasl_authenticated_header = 예 smtpd_tls_mandatory_protocols = SSLv3, TLSv1 smtpd_tls_mandatory_ciphers = medium ## #smtpd_sasl_application_name = smtpd #smtpd_sasl_type = dovecot # smtpd_tls_wrappermode = yes
내 대답을 찾았습니다.
내 이메일 클라이언트는 TLS가 아닌 SSL 만 지원하는 Apple Mail입니다. 어떤 이유로 든 이로 인해 Apple Mail과 내 서버 간의 연결이 끊어지고 연결이 끊어집니다. 이것은 또한 왜 postfix가 유효하지 않은 명령- "???"에 의해 항상 혼동되는 이유를 설명합니다.
그래서 STARTTLS를 사용하여 내 안드로이드 폰에서 테스트했는데 제대로 작동했습니다. 가정용 컴퓨터를 계속 연결하기 위해 /etc/postfix/main.cf에서 SASL 이전에 TLS가 필요하지 않도록 서버를 업데이트했습니다. 라우터와 방화벽 뒤에서 집에 있기 때문에 안전하게 할 수 있다고 생각합니다.
smtpd_use_tls = 예 smtpd_tls_auth_only = 아니요
설치하려는 OS X 업데이트가 작동 할 수도 있습니다. :)
네. :)
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다