Postfix und Wireguard

Furzmulle

Ensign
Registriert
Juni 2012
Beiträge
177
Hallo Forum,

Bei folgendem Problem komme ich momentan nicht weiter:

Ich habe bei meinen Eltern einen Raspberry Pi mit externer Festplatte und ZFS aufgestellt auf den ich jede Nacht die wichtigsten Daten meiner TrueNAS repliziere. Verbindung über einen Wireguard VPN. Dies funktioniert so weit und ohne Probleme.

Auf dem Pi habe ich postfix konfiguriert um dir über smartd E-Mails zu senden, wenn es mit der externen Festplatte S.M.A.R.T Probleme gibt.

Jetzt das Problem: E-Mails kommen nur an, wenn ich in der Wireguard config unter den allowed IPs 0.0.0.0/0 eintrage. Dann wird aber sämtlicher Traffic über den VPN geroutet, das will ich nicht. Wo liegt das Problem, wieso kommen Mails sonst nicht an?

Configs anbei

Postfix:
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version 
                                                                              
myhostname=rpi.host                                                           
                                                                              
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)                     
biff = no                                                                     
                                                                              
# appending .domain is the MUA's job.                                         
append_dot_mydomain = no                                                     
                                                                              
# Uncomment the next line to generate "delayed mail" warnings                 
#delay_warning_time = 4h                                                     
                                                                              
alias_maps = hash:/etc/aliases                                               
alias_database = hash:/etc/aliases                                           
mydestination = $myhostname, localhost.$mydomain, localhost                   
relayhost =                                                                   
mynetworks = 127.0.0.0/8                                                     
inet_protocols = ipv4                                                                                                             
inet_interfaces = loopback-only                                               
recipient_delimiter = +                                                       
                                                                              
compatibility_level = 2

Wireguard
Code:
[Interface]                                                                   
PrivateKey = xxxxxxxx                   
Address = 10.10.10.4                                                         
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCE>
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j AC>
MTU = 1420                                                                   
                                                                              
[Peer]                                                                       
PublicKey = xxxxxxxx                 
Endpoint = xxxxxxxxxxx:51820                                                                           
AllowedIPs = 192.168.188.0/24, 10.10.10.0/24                                                                     
PersistentKeepalive = 25

Danke schonmal für's drauf schauen :-)
 
Servus, es liegt wohl an mynetworks in main.cf ...

What clients to relay mail from​


By default, Postfix will forward mail from clients in authorized network blocks to any destination. Authorized networks are defined with the mynetworks configuration parameter. The current default is to authorize the local machine only. Prior to Postfix 3.0, the default was to authorize all clients in the IP subnetworks that the local machine is attached to.

Da muß dann das Subnetz oder zumindest die IP der erlaubten Maschine rein.

lG
 
Check mal die logfiles vom Postfix... das is normal sehr aufschlussreich.
Ansatzpunkte aus dem Bauch raus:
  • Routing/Firewall-Issue => Traceroute / "TCP-Ping" vom Pi mit und ohne VPN auf den Target Mail-server. => Schauen ob der Router deiner Eltern dazwischenfunkt. Auch NAT Config des Routers checken!
  • DNS-Auflösung => wenn die Zieldomäne vom Pi nicht aufgelöst werden kann keine email-zustellung
  • IP deiner Eltern is blacklisted (emails von CGNAT IPs werden vom Target Mail-Server uU direkt deleted)?
@TheLastHotfix Postfix läuft auf dem Pi. Die erlaubte Maschine is der localhost.
 
Zurück
Oben