Promox Postfix konfigurieren

hYtas

Cadet 1st Year
Registriert
Feb. 2022
Beiträge
13
Moin,

da ich keine Mail von Proxmox bzw. Postfix bekomme, hatte ich dort etwas rumkonfiguriert. Hatte erst Probleme mit IPv6, nach Umstellung auf IPv4 kam ich zumindest weiter.

Er soll von meiner Domain die Mails an mich versenden. Scheiter da aber aktuell etwas dran.
Er scheint trotzdem zu versuchen die Mails von root@ zu verschicken.

Hat jemand einen Tipp?

libsas12-modules habe ich installiert.

main.cf sieht so aus:

Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

myhostname=Proxmox.local

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_interfaces = loopback-only
recipient_delimiter = +


inet_protocols = ipv4
relayhost = [smtp.strato.de]:465
smtp_use_tls = yes
smtp_enforce_tls = yes
smtp_tls_wrappermode = yes
smtp_tls_security_level = encrypt
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps =  hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous

compatibility_level = 2



sasl_passwd:

Code:
smtp.strato.de:465 name@domain.de:passwort

echo Test und log:

Code:
Feb  5 23:40:27 Proxmox postfix/qmgr[3028982]: E0F3C195A0: from=<root@Proxmox.local>, size=405, nrcpt=1 (queue active)
Feb  5 23:40:28 Proxmox postfix/smtp[3031968]: E0F3C195A0: to=<xxxxx>, relay=smtp.strato.de[81.169.145.133]:465, delay=0.08, delays=0.01/0.01/0.05/0.01, dsn=5.7.0, status=bounced (host smtp.strato.de[81.169.145.133] said: 530 5.7.0 User not authenticated (in reply to MAIL FROM command))
Feb  5 23:40:28 Proxmox postfix/cleanup[3031966]: 031F6193DC: message-id=<20220205224028.031F6193DC@Proxmox.local>
Feb  5 23:40:28 Proxmox postfix/qmgr[3028982]: 031F6193DC: from=<>, size=2376, nrcpt=1 (queue active)
Feb  5 23:40:28 Proxmox postfix/bounce[3031969]: E0F3C195A0: sender non-delivery notification: 031F6193DC
Feb  5 23:40:28 Proxmox postfix/qmgr[3028982]: E0F3C195A0: removed
Feb  5 23:40:28 Proxmox postfix/local[3031970]: error: open database /etc/aliases.db: No such file or directory
Feb  5 23:40:28 Proxmox postfix/local[3031970]: warning: hash:/etc/aliases is unavailable. open database /etc/aliases.db: No such file or directory
Feb  5 23:40:28 Proxmox postfix/local[3031970]: warning: hash:/etc/aliases: lookup of 'root' failed
Feb  5 23:40:28 Proxmox postfix/local[3031970]: 031F6193DC: to=<root@Proxmox.local>, relay=local, delay=0.01, delays=0/0/0/0, dsn=4.3.0, status=deferred (alias database unavailable)

In Proxmox unter Optionen, ist meine Absendermail Adresse hinterlegt, wird aber nicht verwendet...

Habe langsam keine Idee mehr, wieso es nicht funktionieren will... Port 587 hatte ich bereits probiert. Passwörter etc sind korrekt.
 
Moin,

Postfix ist komplex und verrenne mich da auch regelmäßig.
Dafür erfüllt die Software auch fast alle RFC-Spezifikationen.
Deine Konfiguration sieht erstmal richtig aus.
Relayhost solltest du nur verwenden, wenn du genau ein Ziel hast.
Wenn du die Mails auch irgendwann an andere Mailadressen
zustellen möchtest, dann musst mit transport_maps arbeiten.

Ansonsten funktioniert die Anmeldung via SASL nicht und du hast ein
Problem mit /etc/aliases.
Die SASL-Konfiguration an sich sieht richtig aus, man soll aber
die Option "smtp_sasl_security_options = noanonymous" leer lassen:

smtp_sasl_security_options =

Quelle: https://www.howtoforge.com/tutorial/configure-postfix-to-use-gmail-as-a-mail-relay/
Wurde zwar mit Google getestet, doch andere können auch darauf allergisch reagieren.

Alternative wäre, dass Strato deine Mailadresse auch als Absender erwartet.
Da könntest du in /etc/aliase folgendes eintragen:
root: meineMailadresse@strato.xy

Danach noch das Kommando "newaliases" ausführen, was dann die /etc/aliases.db
erstellen sollte.
 
noanonymous weglassen bringt nichts.

root: in etc/aliases eintragen und postmap behebt schon mal den Fehler.

Code:
Feb  6 13:55:25 Proxmox postfix/qmgr[3837195]: 9F06C19FC7: removed
Feb  6 13:55:25 Proxmox pvemailforward[3837224]: forward mail to <xxx@domain.de>
Feb  6 13:55:25 Proxmox postfix/pickup[3837194]: E1A9819ECE: uid=65534 from=<proxmox@domain.de>
Feb  6 13:55:25 Proxmox postfix/cleanup[3837217]: E1A9819ECE: message-id=<20220206125525.B638619ECD@Proxmox.local>
Feb  6 13:55:25 Proxmox postfix/qmgr[3837195]: E1A9819ECE: from=<proxmox@domain.de>, size=2557, nrcpt=1 (queue active)
Feb  6 13:55:25 Proxmox postfix/local[3837223]: B638619ECD: to=<root@Proxmox.local>, relay=local, delay=0.18, delays=0/0/0/0.18, dsn=2.0.0, status=sent (delivered to command: /usr/bin/pvemailforward)
Feb  6 13:55:25 Proxmox postfix/qmgr[3837195]: B638619ECD: removed
Feb  6 13:55:25 Proxmox postfix/smtp[3837220]: E1A9819ECE: to=<xxx@domain.de>, relay=smtp.strato.de[81.169.145.133]:465, delay=0.07, delays=0/0/0.05/0.01, dsn=5.7.0, status=bounced (host smtp.strato.de[81.169.145.133] said: 530 5.7.0 User not authenticated (in reply to MAIL FROM command))
Feb  6 13:55:26 Proxmox postfix/qmgr[3837195]: E1A9819ECE: removed
Feb  6 13:55:26 Proxmox postfix/cleanup[3837217]: 0095919ECF: message-id=<20220206125526.0095919ECF@Proxmox.local>

Wird immer noch abgelehnt. Hast du da noch eine Idee? Dafür ist mein Absender nun nicht mehr root@
 
Zuletzt bearbeitet:
Ich hab nun mal:

myhostname=domain.de

eingetragen nur kommt "nur" noch:

Code:
Feb  6 16:58:32 Proxmox postfix/qmgr[4069803]: DDEFF1A2C4: removed
Feb  6 16:58:33 Proxmox pvemailforward[4069868]: forward mail to <xxx@domain.de>
Feb  6 16:58:33 Proxmox postfix/pickup[4069802]: 18FD319CDA: uid=65534 from=<proxmox@domain.de>
Feb  6 16:58:33 Proxmox postfix/cleanup[4069864]: 18FD319CDA: message-id=<20220206155832.E18C419BDE@domain.de>
Feb  6 16:58:33 Proxmox postfix/qmgr[4069803]: 18FD319CDA: from=<proxmox@domain.de>, size=2451, nrcpt=1 (queue active)
Feb  6 16:58:33 Proxmox postfix/local[4069866]: E18C419BDE: to=<root@domain.de>, relay=local, delay=0.18, delays=0/0/0/0.18, dsn=2.0.0, status=sent (delivered to command: /usr/bin/pvemailforward)
Feb  6 16:58:33 Proxmox postfix/qmgr[4069803]: E18C419BDE: removed
Feb  6 16:58:33 Proxmox postfix/local[4069871]: 18FD319CDA: to=<xxx@domain.de>, relay=local, delay=0.01, delays=0/0/0/0, dsn=5.1.1, status=bounced (unknown user: "xxx")
Feb  6 16:58:33 Proxmox postfix/qmgr[4069803]: 18FD319CDA: removed
Feb  6 16:58:33 Proxmox postfix/cleanup[4069864]: 1AC4619CDB: message-id=<20220206155833.1AC4619CDB@domain.de>
 
Funktioniert. Musste nur mydestinations = leer lassen.

Danke für deine Hilfe :)
 
Zurück
Oben