c***@gmail.com
2020-03-31 21:56:14 UTC
Skonfigurowałem Postfiksa z uwierzytelnianiem SASL, ale coś nie chce działać wysyłanie maili.
Sprawdzanie telnetem daje taki wynik:
telnet localhost 587
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
EHLO localhost
Connection closed by foreign host.
I tyle. Natomiast na port 465 jest już inaczej.
telnet localhost 465
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.moja.domena.pl ESMTP
EHLO localhost
250-mail.moja.domena.pl
250-PIPELINING
250-SIZE 128000000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
quit
221 2.0.0 Bye
Connection closed by foreign host.
Klient skonfigurowany do wysyłki na port 465, wysyła i maile dochodzą.
Niestety, obawiam się, że serwer jest open relay.
Mój wynik postconf -n
--------------------
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin/
compatibility_level = 2
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5
default_destination_concurrency_limit = 20
dovecot_destination_recipient_limit = 1
home_mailbox = Maildir/
inet_protocols = ipv4
local_destination_concurrency_limit = 2
local_recipient_maps = $alias_maps unix:passwd.byname
mail_name = Postfix
mail_spool_directory = /var/mail/%u/
mailbox_command = /usr/libexec/dovecot/deliver
mailbox_size_limit = 204800000
mailq_path = /usr/bin/mailq
manpage_directory = /usr/man
message_size_limit = 128000000
mydestination = $mydomain, $myhostname, localhost
mydomain = moja.domena.pl
myhostname = mail.moja.domena.pl
mynetworks = 192.168.0.0/16, 192.168.0.253, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
readme_directory = /usr/share/doc/postfix
recipient_canonical_maps = hash:/etc/postfix/recipient_canonical
relay_domains = $mydestination
sample_directory = /etc/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unknown_client
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_unauth_pipelining,reject_invalid_helo_hostname,permit
smtpd_recipient_restrictions = reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,permit_mynetworks,reject
smtpd_relay_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sender_login_maps = hash:/etc/postfix/login_maps
smtpd_sender_restrictions = permit_sasl_authenticated,permit_mynetworks, reject_unknown_sender_domain,reject_non_fqdn_sender,reject_authenticated_sender_login_mismatch
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpcert.pem
smtpd_tls_key_file = /etc/postfix/ssl/smtpkey.pem
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 450
virtual_transport = dovecot
------------------
W maillog mam taki pojawiający się dość często komunikat:
SSL_accept error from gate[192.168.0.253]: -1
warning: TLS library problem: error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading:ssl/record/rec_layer_s3.c:302:
Co mogłem zepsuć?
Sprawdzanie telnetem daje taki wynik:
telnet localhost 587
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
EHLO localhost
Connection closed by foreign host.
I tyle. Natomiast na port 465 jest już inaczej.
telnet localhost 465
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.moja.domena.pl ESMTP
EHLO localhost
250-mail.moja.domena.pl
250-PIPELINING
250-SIZE 128000000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
quit
221 2.0.0 Bye
Connection closed by foreign host.
Klient skonfigurowany do wysyłki na port 465, wysyła i maile dochodzą.
Niestety, obawiam się, że serwer jest open relay.
Mój wynik postconf -n
--------------------
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin/
compatibility_level = 2
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5
default_destination_concurrency_limit = 20
dovecot_destination_recipient_limit = 1
home_mailbox = Maildir/
inet_protocols = ipv4
local_destination_concurrency_limit = 2
local_recipient_maps = $alias_maps unix:passwd.byname
mail_name = Postfix
mail_spool_directory = /var/mail/%u/
mailbox_command = /usr/libexec/dovecot/deliver
mailbox_size_limit = 204800000
mailq_path = /usr/bin/mailq
manpage_directory = /usr/man
message_size_limit = 128000000
mydestination = $mydomain, $myhostname, localhost
mydomain = moja.domena.pl
myhostname = mail.moja.domena.pl
mynetworks = 192.168.0.0/16, 192.168.0.253, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
readme_directory = /usr/share/doc/postfix
recipient_canonical_maps = hash:/etc/postfix/recipient_canonical
relay_domains = $mydestination
sample_directory = /etc/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unknown_client
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_unauth_pipelining,reject_invalid_helo_hostname,permit
smtpd_recipient_restrictions = reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,permit_mynetworks,reject
smtpd_relay_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sender_login_maps = hash:/etc/postfix/login_maps
smtpd_sender_restrictions = permit_sasl_authenticated,permit_mynetworks, reject_unknown_sender_domain,reject_non_fqdn_sender,reject_authenticated_sender_login_mismatch
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpcert.pem
smtpd_tls_key_file = /etc/postfix/ssl/smtpkey.pem
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 450
virtual_transport = dovecot
------------------
W maillog mam taki pojawiający się dość często komunikat:
SSL_accept error from gate[192.168.0.253]: -1
warning: TLS library problem: error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading:ssl/record/rec_layer_s3.c:302:
Co mogłem zepsuć?