[GELÖST] Postfix/stmp Connection timed out

Debian macht sich hervorragend als Web- und Mailserver. Schau auch in den " Tipps und Tricks"-Bereich.
Antworten
Apollo013
Beiträge: 62
Registriert: 29.08.2023 11:19:04

[GELÖST] Postfix/stmp Connection timed out

Beitrag von Apollo013 » 05.10.2023 00:31:03

Ich habe da ein Problem mit Postfix, bei jeder E-Mail was ich sende, bekomme ich Connection timed out. E-Mails die an mich sende kommen durch.

Code: Alles auswählen

postfix/smtp[79018]: DA1174845B: to=<meine_email@gmail.com>, relay=none, delay=40532, delays=40502/0.03/30/0, dsn=4.4.1, status=deferred 
(connect to gmail.com[142.250.185.197]:25: Connection timed out)
Ich habe auf meinem System Dovecot, Postfix, Firehol installiert.

Meine main.cf

Code: Alles auswählen

compatibility_level = 3.6
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)

command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix/sbin
data_directory = /var/lib/postfix
sendmail_path = /usr/sbin/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
home_mailbox = /Maildir/
mail_owner = postfix
myhostname = mail.mythos-one.de

mydomain = mythos-one.de
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

setgid_group = postdrop
inet_interfaces = all
inet_protocols = ipv4 

unknown_local_recipient_reject_code = 550
strict_rfc821_envelopes = yes
disable_vrfy_command = yes

message_size_limit = 52428800
mailbox_size_limit = 1073741824

smtp_host_lookup = dns,native
disable_dns_lookups = yes
in_flow_delay = 10s

mynetworks = 127.0.0.0/8, 10.0.3.0/24
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination

#Maps

virtual_alias_domains = hash:/etc/postfix/virtual_domains
local_recipient_maps = unix:passwd.byname $alias_maps
alias_maps = hash:/etc/aliases
virtual_alias_maps = hash:/etc/postfix/virtual


#Restrictions

smtpd_helo_required = yes

smtpd_recipient_restrictions = permit_auth_destination, permit_sasl_authenticated, permit_mynetworks, 
    reject_unauth_destination,
    reject_unauth_pipelining,
    reject_non_fqdn_sender,
    check_policy_service unix:private/policyd-spf

    #check_recipient_access hash:/etc/postfix/blacklisted_domains,
    #check_policy_service unix:private/policy,
    #check_policy_service unix:private/policyd-spf,
    #check_policy_service inet:127.0.0.1:10023, 
    #reject_rhsbl_helo dbl.spamhaus.org, 
    #reject_rhsbl_reverse_client dbl.spamhaus.org, 
    #reject_rhsbl_sender dbl.spamhaus.org, 
    #reject_rbl_client zen.spamhaus.org,
    #reject_rbl_client bl.spamcop.net

smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated,
    reject_unlisted_sender,
    reject_unknown_client_hostname, 
    reject_unknown_reverse_client_hostname

    #check_sender_access hash:/etc/postfix/sender_checks,
    #check_sender_access regexp:/etc/postfix/sender_access,
    #check_sender_access hash:/etc/postfix/blacklisted_domains,
    #reject_unknown_sender_domain pcre:/etc/postfix/rejected_domains, 

smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, 
    reject_invalid_helo_hostname, 
    reject_non_fqdn_helo_hostname, 
    reject_unknown_helo_hostname
#TLS

smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2,!SSLv3
smtp_tls_protocols = !SSLv2,!SSLv3

smtpd_tls_cert_file = /etc/letsencrypt/live/mythos-one.de/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mythos-one.de/privkey.pem

smtp_tls_cert_file = /etc/letsencrypt/live/mythos-one.de/fullchain.pem
smtp_tls_key_file = /etc/letsencrypt/live/mythos-one.de/privkey.pem
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_scache

smtpd_tls_security_level = may 
smtp_tls_security_level = may

smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
#mailbox_command = 
policyd-spf_time_limit = 3600
Meine master.cf

Code: Alles auswählen

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       y       -       -       smtpd 
#smtp      inet  n       -       y       -       1       postscreen
#smtpd     pass  -       -       y       -       -       smtpd
#dnsblog   unix  -       -       y       -       0       dnsblog
#tlsproxy  unix  -       -       y       -       0       tlsproxy
# Choose one: enable submission for loopback clients only, or for any client.
#127.0.0.1:submission inet n -   y       -       -       smtpd
submission inet n       -       n       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=may
  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_tls_auth_only=yes
#  -o smtpd_reject_unlisted_recipient=no
#     Instead of specifying complex smtpd_<xxx>_restrictions here,
#     specify "smtpd_<xxx>_restrictions=$mua_<xxx>_restrictions"
#     here, and specify mua_<xxx>_restrictions in main.cf (where
#     "<xxx>" is "client", "helo", "sender", "relay", or "recipient").
#  -o smtpd_client_restrictions=
#  -o smtpd_helo_restrictions=
#  -o smtpd_sender_restrictions=
#  -o smtpd_relay_restrictions=
  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
# Choose one: enable submissions for loopback clients only, or for any client.
#127.0.0.1:submissions inet n  -       y       -       -       smtpd
#submissions     inet  n       -       y       -       -       smtpd
#  -o syslog_name=postfix/submissions
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
#     Instead of specifying complex smtpd_<xxx>_restrictions here,
#     specify "smtpd_<xxx>_restrictions=$mua_<xxx>_restrictions"
#     here, and specify mua_<xxx>_restrictions in main.cf (where
#     "<xxx>" is "client", "helo", "sender", "relay", or "recipient").
#  -o smtpd_client_restrictions=
#  -o smtpd_helo_restrictions=
#  -o smtpd_sender_restrictions=
#  -o smtpd_relay_restrictions=
#  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       y       -       -       qmqpd
pickup    unix  n       -       y       60      1       pickup
cleanup   unix  n       -       y       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       y       1000?   1       tlsmgr
rewrite   unix  -       -       y       -       -       trivial-rewrite
bounce    unix  -       -       y       -       0       bounce
defer     unix  -       -       y       -       0       bounce
trace     unix  -       -       y       -       0       bounce
verify    unix  -       -       y       -       1       verify
flush     unix  n       -       y       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       y       -       -       smtp
relay     unix  -       -       y       -       -       smtp
        -o syslog_name=postfix/$service_name
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       y       -       -       showq
error     unix  -       -       y       -       -       error
retry     unix  -       -       y       -       -       error
discard   unix  -       -       y       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       y       -       -       lmtp
anvil     unix  -       -       y       -       1       anvil
scache    unix  -       -       y       -       1       scache
postlog   unix-dgram n  -       n       -       1       postlogd
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRXhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
#   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
#  mailbox_transport = lmtp:inet:localhost
#  virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  flags=DRX user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
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=FRX user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}

policyd-spf unix - n n - 0 spawn 
  user=policyd-spf argv=/usr/bin/policyd-spf
Würde mich freuen über jede Hilfe.
LG
Zuletzt geändert von Apollo013 am 13.10.2023 21:08:11, insgesamt 1-mal geändert.
:THX: Lebe lang und im Frieden

Benutzeravatar
debilian
Beiträge: 1200
Registriert: 21.05.2004 14:03:04
Wohnort: 192.168.43.7
Kontaktdaten:

Re: Postfix/stmp Connection timed out

Beitrag von debilian » 05.10.2023 08:05:22

steht im postfix log nicht noch mehr als das, was du hier gepostet hast?
kannst du die ip 142.250.185.197 erreichen (z.B. mit ping/telnet)
-- nichts bewegt Sie wie ein GNU --

Apollo013
Beiträge: 62
Registriert: 29.08.2023 11:19:04

Re: Postfix/stmp Connection timed out

Beitrag von Apollo013 » 05.10.2023 12:27:10

Code: Alles auswählen

2023-10-05T12:01:20.327858+02:00 mythos postfix/submission/smtpd[87291]: connect from 213142097203.public.telering.at[213.142.97.203]
2023-10-05T12:01:21.147839+02:00 mythos postfix/submission/smtpd[87291]: 240E048506: client=213142097203.public.telering.at[213.142.97.203], sasl_method=PLAIN, sasl_username=logs@mail.mythos-one.de
2023-10-05T12:01:21.312216+02:00 mythos postfix/cleanup[87294]: 240E048506: message-id=<ff40c335ba046354478dff2196cc7dbf4d328e67.camel@mythos-one.de>
2023-10-05T12:01:21.313846+02:00 mythos postfix/qmgr[71018]: 240E048506: from=<logs@mythos-one.de>, size=539, nrcpt=1 (queue active)
2023-10-05T12:01:21.348077+02:00 mythos postfix/submission/smtpd[87291]: disconnect from 213142097203.public.telering.at[213.142.97.203] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
2023-10-05T12:01:51.355046+02:00 mythos postfix/smtp[87295]: connect to gmail.com[142.250.186.37]:25: Connection timed out
2023-10-05T12:01:51.362113+02:00 mythos postfix/smtp[87295]: 240E048506: to=<meine_email@gmail.com>, relay=none, delay=30, delays=0.21/0.02/30/0, dsn=4.4.1, status=deferred (connect to gmail.com[142.250.186.37]:25: Connection timed out)
ping 142.250.186.37

Code: Alles auswählen

PING 142.250.186.37 (142.250.186.37) 56(84) bytes of data.
64 bytes from 142.250.186.37: icmp_seq=1 ttl=116 time=5.53 ms
64 bytes from 142.250.186.37: icmp_seq=2 ttl=116 time=5.19 ms
64 bytes from 142.250.186.37: icmp_seq=3 ttl=116 time=18.4 ms
64 bytes from 142.250.186.37: icmp_seq=4 ttl=116 time=5.23 ms
telnet 142.250.185.197

Code: Alles auswählen

Trying 142.250.185.197...
telnet: Unable to connect to remote host: Connection timed ou
t
:THX: Lebe lang und im Frieden

Benutzeravatar
heisenberg
Beiträge: 3567
Registriert: 04.06.2015 01:17:27
Lizenz eigener Beiträge: MIT Lizenz

Re: Postfix/stmp Connection timed out

Beitrag von heisenberg » 05.10.2023 12:33:04

Apollo013 hat geschrieben: ↑ zum Beitrag ↑
05.10.2023 12:27:10

telnet 142.250.185.197

Code: Alles auswählen

Trying 142.250.185.197...
telnet: Unable to connect to remote host: Connection timed out
Telnet bitte auf Port 25 oder 587.

Code: Alles auswählen

telnet 142.250.185.197 25
Telnet als Remote-Shell wird sicher nicht funktionieren.
Jede Rohheit hat ihren Ursprung in einer Schwäche.

mat6937
Beiträge: 2953
Registriert: 09.12.2014 10:44:00

Re: Postfix/stmp Connection timed out

Beitrag von mat6937 » 05.10.2023 12:37:19

heisenberg hat geschrieben: ↑ zum Beitrag ↑
05.10.2023 12:33:04
Telnet als Remote-Shell wird sicher nicht funktionieren.
Versuch mal:

Code: Alles auswählen

nc -zv smtp.gmail.com 25
Denn:

Code: Alles auswählen

:~$ host smtp.gmail.com
smtp.gmail.com has address 74.125.71.109
smtp.gmail.com has IPv6 address 2a00:1450:400c:c02::6d

Code: Alles auswählen

:~$ nc -zv smtp.gmail.com 25 465 587
Connection to smtp.gmail.com 25 port [tcp/smtp] succeeded!
Connection to smtp.gmail.com 465 port [tcp/urd] succeeded!
Connection to smtp.gmail.com 587 port [tcp/submission] succeeded!

Apollo013
Beiträge: 62
Registriert: 29.08.2023 11:19:04

Re: Postfix/stmp Connection timed out

Beitrag von Apollo013 » 05.10.2023 12:53:16

❯ nc -zv smtp.gmail.com 25

Code: Alles auswählen

DNS fwd/rev mismatch: smtp.gmail.com != wb-in-f108.1e100.net
❯ nc -zv smtp.gmail.com 465

Code: Alles auswählen

DNS fwd/rev mismatch: smtp.gmail.com != wb-in-f108.1e100.net
❯ nc -zv smtp.gmail.com 587

Code: Alles auswählen

DNS fwd/rev mismatch: smtp.gmail.com != wb-in-f108.1e100.net
smtp.gmail.com [66.102.1.108] 587 (submission) open
Das sind die Ausgaben.
:THX: Lebe lang und im Frieden

mat6937
Beiträge: 2953
Registriert: 09.12.2014 10:44:00

Re: Postfix/stmp Connection timed out

Beitrag von mat6937 » 05.10.2023 12:57:03

Apollo013 hat geschrieben: ↑ zum Beitrag ↑
05.10.2023 12:53:16
❯ nc -zv smtp.gmail.com 25

Code: Alles auswählen

DNS fwd/rev mismatch: smtp.gmail.com != wb-in-f108.1e100.net
❯ nc -zv smtp.gmail.com 465

Code: Alles auswählen

DNS fwd/rev mismatch: smtp.gmail.com != wb-in-f108.1e100.net
Wie sind die Ausgaben von:

Code: Alles auswählen

cat /etc/resolv.conf
host smtp.gmail.com
host smtp.gmail.com 1.1.1.1
?

Apollo013
Beiträge: 62
Registriert: 29.08.2023 11:19:04

Re: Postfix/stmp Connection timed out

Beitrag von Apollo013 » 05.10.2023 13:00:28

Habe noch mal nc gemacht, dabei hat es ca. 3-- min gedauert bis ich die Ausgabe bekommen habe.

nc -zv smtp.gmail.com 25 465 587

Code: Alles auswählen

DNS fwd/rev mismatch: smtp.gmail.com != wl-in-f108.1e100.net
smtp.gmail.com [64.233.167.108] 25 (smtp) : Connection timed out
smtp.gmail.com [64.233.167.108] 465 (submissions) : Connection timed out
smtp.gmail.com [64.233.167.108] 587 (submission) open

❯ cat /etc/resolv.conf

Code: Alles auswählen

nameserver 2a01:4ff:ff00::add:1
nameserver 2a01:4ff:ff00::add:2
nameserver 185.12.64.2
❯ host smtp.gmail.com

Code: Alles auswählen

smtp.gmail.com has address 66.102.1.109
smtp.gmail.com has IPv6 address 2a00:1450:400c:c0c::6d
❯ host smtp.gmail.com 1.1.1.1

Code: Alles auswählen

Using domain server:
Name: 1.1.1.1
Address: 1.1.1.1#53
Aliases: 

smtp.gmail.com has address 142.250.110.108
smtp.gmail.com has IPv6 address 2a00:1450:400c:c0b::6c
:THX: Lebe lang und im Frieden

mat6937
Beiträge: 2953
Registriert: 09.12.2014 10:44:00

Re: Postfix/stmp Connection timed out

Beitrag von mat6937 » 05.10.2023 14:00:09

Apollo013 hat geschrieben: ↑ zum Beitrag ↑
05.10.2023 13:00:28
Habe noch mal nc gemacht, dabei hat es ca. 3-- min gedauert bis ich die Ausgabe bekommen habe.
nc -zv smtp.gmail.com 25 465 587

Code: Alles auswählen

DNS fwd/rev mismatch: smtp.gmail.com != wl-in-f108.1e100.net
smtp.gmail.com [64.233.167.108] 25 (smtp) : Connection timed out
smtp.gmail.com [64.233.167.108] 465 (submissions) : Connection timed out
smtp.gmail.com [64.233.167.108] 587 (submission) open
Evtl. ist in deinem Router und/oder in deiner Firewall, der Zugang zum Port 25 (und evtl. auch zum Port 465) gesperrt.
Wie ist die Ausgabe von:

Code: Alles auswählen

nc -zv -w 5 smtp.gmx.net 25 465 587
?

Benutzeravatar
heisenberg
Beiträge: 3567
Registriert: 04.06.2015 01:17:27
Lizenz eigener Beiträge: MIT Lizenz

Re: Postfix/stmp Connection timed out

Beitrag von heisenberg » 05.10.2023 14:03:22

Apollo013 hat geschrieben: ↑ zum Beitrag ↑
05.10.2023 13:00:28
nc -zv smtp.gmail.com 25 465 587

Code: Alles auswählen

DNS fwd/rev mismatch: smtp.gmail.com != wl-in-f108.1e100.net
smtp.gmail.com [64.233.167.108] 25 (smtp) : Connection timed out
smtp.gmail.com [64.233.167.108] 465 (submissions) : Connection timed out
smtp.gmail.com [64.233.167.108] 587 (submission) open
Das bedeutet schon mal, dass die Verbindung auf 25 und 465 geblockt wird. Also entweder auf der entfernten Serverseite oder irgendwo zwischen Dir und dem Server.

Da Du eine Hetzner IP hast (mailhostname user deiner main.cf), habe ich da mal nach gegoogelt und siehe da:

https://docs.hetzner.com/cloud/servers/ ... -my-server
Why can I not send any mails from my server?

Unfortunately, email spammers and scammers like to use cloud hosting providers. And we at Hetzner naturally want to prevent this. That's why we block ports 25 and 465 by default on all cloud servers. This is a very common practice in the cloud hosting industry because it prevents abuse. We want to build trust with our new customers before we unblock these mail ports. Once you have been with us for a month and paid your first invoice, you can create a limit request to unblock these ports for a valid use case. In your request, you can tell us details about your use case. We make decisions on a case-by-case basis.

As an alternative, you can also use port 587 to send emails via external mail delivery services. Port 587 is not blocked and can be used without sending a limit request.
Die Frage an Dich: Hast Du einen Hetzner Cloud-Server?
Zuletzt geändert von heisenberg am 05.10.2023 14:17:59, insgesamt 1-mal geändert.
Jede Rohheit hat ihren Ursprung in einer Schwäche.

Apollo013
Beiträge: 62
Registriert: 29.08.2023 11:19:04

Re: Postfix/stmp Connection timed out

Beitrag von Apollo013 » 05.10.2023 14:17:56

Ja, ich habe einen Hetzner Cloud Server.

Das ist meine firehol.conf

Code: Alles auswählen

version 6

# Accept all client traffic on any interface
#interface4 any world
#	server all accept
#	client all accept
#
#	NEU

#interface eth0 dhcp
#	policy return
#	server dhcp accept
#	client all accept

interface4 any world 
	policy return
	server ssh accept
	server icmp accept
	server echo accept
	server dhcp accept
	server dns accept
	server http accept
	server https accept
	server httpalt accept
	server "smtp smtps submission imaps" accept 
        server "rtp" accept
        client all accept

interface6 any world6
    server "icmpv6 ipv6neigh" accept
    client "icmpv6 ipv6neigh" accept
    server dhcpv6 accept
   client dhcpv6 accept
    client all accept

router4 lxc1 inface lxcbr0 outface eth0 
    masquerade
    server "dhcp dns rtp sip stun http" accept
#    server all accept
    client all accept
    route all accept
❯ nc -zv -w 5 smtp.gmx.net 25 465 587

Code: Alles auswählen

mail.gmx.net [212.227.17.168] 25 (smtp) : Connection timed out
mail.gmx.net [212.227.17.168] 465 (submissions) : Connection timed out
mail.gmx.net [212.227.17.168] 587 (submission) open
Auch wenn ich firehol abschalte, kommt dasselbe.
Zuletzt geändert von Apollo013 am 05.10.2023 14:21:12, insgesamt 2-mal geändert.
:THX: Lebe lang und im Frieden

Benutzeravatar
heisenberg
Beiträge: 3567
Registriert: 04.06.2015 01:17:27
Lizenz eigener Beiträge: MIT Lizenz

Re: Postfix/stmp Connection timed out

Beitrag von heisenberg » 05.10.2023 14:19:04

Ok. Dann hast Du ja oben die Erklärung zum Grund, was Du weiter machen kannst und wie/wann Du das dann freigeschaltet bekommst.
Jede Rohheit hat ihren Ursprung in einer Schwäche.

Benutzeravatar
heisenberg
Beiträge: 3567
Registriert: 04.06.2015 01:17:27
Lizenz eigener Beiträge: MIT Lizenz

Re: Postfix/stmp Connection timed out

Beitrag von heisenberg » 05.10.2023 14:28:31

Ok. Du hast das Obige entweder nicht gelesen oder nicht verstanden. Deswegen nochmal kurz und knapp:

Hetzner blockt bei Cloud-Servern ausgehend Port 25 und Port 465. Du kannst das frühestens nach einem Monat begrenzt freischalten lassen. Erklärung siehe oben.
Jede Rohheit hat ihren Ursprung in einer Schwäche.

Apollo013
Beiträge: 62
Registriert: 29.08.2023 11:19:04

Re: Postfix/stmp Connection timed out

Beitrag von Apollo013 » 05.10.2023 14:29:27

Das habe ich verstanden.

Ja, das habe ich nicht gewusst, dass der Hetzner blockt. Ich könnte noch ein Jahr herumsuchen :).

Meine Vermutung war auch das es dazwischen etwas blockt.

Danke vielmals für die Hilfe.
:THX: Lebe lang und im Frieden

Apollo013
Beiträge: 62
Registriert: 29.08.2023 11:19:04

Re: Postfix/stmp Connection timed out

Beitrag von Apollo013 » 06.10.2023 22:34:54

Nachdem ich es erfahren habe, kontaktierte ich den Hetzner und die Ports wurden gleich freigeschaltet.

Das Problem besteht immer noch. Wenn ich eine E-Mail an chello.at sende, bekomme ich Connection refused und eine E-Mail an GMX oder Gmail bekomme ich Connection timed out.
Habe ebenfalls auch eine E-Mail gesendet an einen Kollegen der auch eigenen Server besitzt und die E-Mail hat er bekommen.

Code: Alles auswählen

2023-10-06T21:33:20.552417+02:00 mythos postfix/smtp[155069]: 625A741AE4: to=<ujz@chello.at>, relay=none, delay=29983, delays=29983/0.03/0.03/0, dsn=4.4.1, 
status=deferred (connect to chello.at[213.46.237.24]:25: Connection refused)
2023-10-06T21:38:20.615954+02:00 mythos postfix/qmgr[71018]: AABD04844B: from=<logs@mythos-one.de>, size=529, nrcpt=1 (queue active)
2023-10-06T21:38:50.644983+02:00 mythos postfix/smtp[155112]: connect to gmail.com[172.217.16.197]:25: Connection timed out
2023-10-06T21:38:50.656484+02:00 mythos postfix/smtp[155112]: AABD04844B: to=<meine_email@gmail.com>, relay=none, delay=29933, delays=29903/0.02/30/0, 
dsn=4.4.1, status=deferred (connect to gmail.com[172.217.16.197]:25: Connection timed out)
Die ausgaben von nc sind folgend:

Code: Alles auswählen

nc -zv smtp.gmail.com 25 465 587
DNS fwd/rev mismatch: smtp.gmail.com != wn-in-f109.1e100.net
smtp.gmail.com [74.125.71.109] 25 (smtp) open
smtp.gmail.com [74.125.71.109] 465 (submissions) open
smtp.gmail.com [74.125.71.109] 587 (submission) open

Code: Alles auswählen

nc -zv -w 5 smtp.gmx.net 25 465 587
mail.gmx.net [212.227.17.168] 25 (smtp) open
mail.gmx.net [212.227.17.168] 465 (submissions) open
mail.gmx.net [212.227.17.168] 587 (submission) open
Könnte sein, dass ich auf einer Blacklist bin?
:THX: Lebe lang und im Frieden

mat6937
Beiträge: 2953
Registriert: 09.12.2014 10:44:00

Re: Postfix/stmp Connection timed out

Beitrag von mat6937 » 07.10.2023 08:37:34

Apollo013 hat geschrieben: ↑ zum Beitrag ↑
06.10.2023 22:34:54
Wenn ich eine E-Mail an chello.at sende, bekomme ich Connection refused ...

Code: Alles auswählen

2023-10-06T21:33:20.552417+02:00 mythos postfix/smtp[155069]: 625A741AE4: to=<ujz@chello.at>, relay=none, delay=29983, delays=29983/0.03/0.03/0, dsn=4.4.1, 
status=deferred (connect to chello.at[213.46.237.24]:25: Connection refused)
Versuch mal:

Code: Alles auswählen

host smtp.chello.at
nc -zv -w 5 smtp.chello.at 25 465 587
Apollo013 hat geschrieben: ↑ zum Beitrag ↑
06.10.2023 22:34:54
Könnte sein, dass ich auf einer Blacklist bin?
Das könnte sein. Evtl. bei gmx nachfragen.

Apollo013
Beiträge: 62
Registriert: 29.08.2023 11:19:04

Re: Postfix/stmp Connection timed out

Beitrag von Apollo013 » 08.10.2023 12:39:52

Habe den Fehler gefunden.

In meiner main.cf hatte ich den Eintrag disable_dns_lookups=yes , dadurch hat der Postfix eine Verbindung zu gmail.com[142.250.186.101] versucht.
Ich habe ein paar Sachen getestet und habe vergessen wieder zu entfernen.

Bei Auskommentieren oder Änderung disable_dns_lookups auf no funktioniert es.

Jetzt verbindet sich richtig
relay=gmail-smtp-in.l.google.com[66.102.1.26]:25

LG, Danke
:THX: Lebe lang und im Frieden

Antworten