Portál AbcLinuxu, 7. května 2025 01:36
smtpd_banner = $myhostname ESMTP $mail_name (Debian) # Obecne definice myhostname = neon.domena.cz mydomain = domena.cz myorigin = $mydomain inet_interfaces = all mydestination = $myhostname, localhost.$mydomain mynetworks_style = host mynetworks = 127.0.0.0/8, "moje_ip_adresy" alias_maps = hash:/etc/aliases # velikost zprav message_size_limit = 40960000 # TLS setup smtp_enforce_tls = yes smtpd_enforce_tls = yes lmtp_use_tls = yes lmtp_tls_note_starttls_offer = yes lmtp_tls_security_level = may lmtp_tls_cert_file = /etc/postfix/ssl/neon.domena.cz.cert lmtp_tls_key_file = /etc/postfix/ssl/neon.domena.cz.key lmtp_tls_CAfile = /etc/postfix/ssl/ca.pem smtp_use_tls = yes smtp_tls_note_starttls_offer = yes smtp_tls_security_level = may smtp_tls_cert_file = /etc/postfix/ssl/neon.domena.cz.cert smtp_tls_key_file = /etc/postfix/ssl/neon.domena.cz.key smtp_tls_CAfile = /etc/postfix/ssl/ca.pem smtpd_use_tls = yes smtpd_tls_cert_file = /etc/postfix/ssl/neon.domena.cz.cert smtpd_tls_key_file = /etc/postfix/ssl/neon.domena.cz.key smtpd_tls_CAfile = /etc/postfix/ssl/ca.pem smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_security_level = may smtpd_tls_session_cache_timeout = 3600s smtpd_tls_auth_only = yes tls_random_source = dev:/dev/urandom smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_scache # SMTP restrikce unknown_local_recipient_reject_code = 550 smtpd_recipient_restrictions = permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_invalid_hostname, permit_mynetworks, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_destination, reject_unauth_pipelining, # Toto kontroluje spam listy check_client_access hash:/etc/postfix/rbl_override, reject_rbl_client cbl.abuseat.org, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_rbl_client dul.dnsbl.sorbs.net, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client rabl.nuclearelephant.com, reject_rbl_client combined.rbl.msrbl.net, check_policy_service inet:127.0.0.1:10023 smtpd_sender_restrictions = permit_mynetworks, reject_non_fqdn_sender, reject_unknown_address, reject_unknown_sender_domain, permit smtpd_data_restrictions = reject_unauth_pipelining, permit smtpd_helo_restrictions = permit_mynetworks, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, permit smtpd_helo_required = yes disable_vrfy_command = yes smtpd_delay_reject = yes smtpd_error_sleep_time = 2s smtpd_soft_error_limit = 20 smtpd_hard_error_limit = 30 # ClamAV setup content_filter = scan:127.0.0.1:10025 receive_override_options = no_address_mappings # Mapy transport_maps = hash:/etc/postfix/transportA můj master.cf
# # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master"). # # Do not forget to execute "postfix reload" after editing this file. # # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - - - - smtpd -o content_filter=spamassassin #submission inet n - - - - smtpd # -o smtpd_tls_security_level=encrypt # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING smtps inet n - - - - smtpd -o content_filter=spamassassin -o smtpd_tls_wrappermode=yes # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #628 inet n - - - - qmqpd pickup fifo n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr #qmgr fifo n - - 300 1 oqmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - - - - smtp # When relaying mail as backup MX, disable fallback_relay to avoid MX loops relay unix - - - - - smtp -o smtp_fallback_relay= # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache scan unix - - n - 16 smtp -o smtp_send_xforward_command=yes # For injecting mail back into postfix from the filter 127.0.0.1:10026 inet n - n - 16 smtpd -o content_filter= -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks_style=host -o smtpd_authorized_xforward_hosts=127.0.0.0/8 uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) # # Other external delivery methods. # ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix - n n - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} mailman unix - n n - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user} spamassassin unix - n n - - pipe user=debian-spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient} maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
Je nějaká možnost, jak Postfix donutit k tomu, aby nejdříve vyzkoušel porty 465/587 šifrovaně a teprve pokud by nebyly tyto porty dostupné, tak aby to poslal nešifrovaně přes 25 ?Co je to za blbost. Port 587 není určený ke komunikaci mezi servery, ale pro komunikaci mezi uživatelským programem a serverem, navíc nešifrovaně (či s explicitním navázáním šifrování). Stejnětak lze na portu 25 používat šifrování při explicitní domluvě (STARTTLS). Pokud chceš používat TLS rovnou (nevím, proč bys měl něco takového chtít, ale je k tomu port 465), taky to jde.
Když od toho samého serveru ale příjmám, tak normálně ke STARTTLS dojde a komunikace frčí na 465STARTTLS na 465? To máš něco špatně, ten port je především pro zastaralý software, který STARTTLS neumí.
Predevsim: port 465 je obezlicka pro dementy, co jeste nestihli implementovat pres 15 let (1998) stara RFC (jiz plne podporovana akoro kazdym softem) Na port 465 okamzite zapomen. Ten je pouze pro kreteny ze seznamu apod.A i tak se pokud vím v praxi používá výhradně pro submission.
Detaily strejda googleNení potřeba, poslal jsem už přímé odkazy do dokumentace.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.