[SOLVED] PMG relay

swenni

New Member
Jan 31, 2023
7
0
1
Hallo zusammen,

ich hoffe meine Beschreibung hilft mein Problem zu lösen:
Ich habe pmg installiert, es kommen auch mails an (firewall etc sollte also korrekt sein), allerdings schaffe ich es nicht mails weiterzuleiten.
Nun der Aufbau:

Mail (von extern@postfach.de an mich@meinedomän.de) --> PMG (nimmt an und verarbeitet : mx funktioniert ist eine feste ip) --> df.eu (ins Postfach mich@meinedomän.de)
ich habe es hiermit probiert (dachte smarthost sollte gehen):

1. Let’s take care of software dependencies first. You need to install a SASL library that’s not included by default; if you skip this step, you’ll see errors in your Postfix log and authentication will fail. Update software package information, and then install “libsasl2-modules.”

apt-get update
apt-get install libsasl2-modules


2. Change to the /etc/postfix/ directory and create a file to store the hostname, username, and password of your relay host; and set secure permissions on the file. It doesn’t matter what you name the file; just use a name that makes sense to you. I’ve chosen to call it “relay_passwd.”

cd /etc/postfix
touch relay_passwd
chmod 0600 relay_passwd


3. Edit the file using your favourite command-line editor, and enter just one line in precisely this format (replacing your relay server, port number, username, and password with your own information):

[smtp.example.com]:587 username:password


4. Save and close the file. Then, hash the newly created password file to make a db file Postfix can use:

postmap relay_passwd


5. Make a backup copy of your main.cf file in case you mess things up and need to restore known-good configuration. I like to date-stamp my configuration file backups, like so. Replace with today’s date.

cp main.cf main.cf.2018-10-06


6. Edit main.cf and add the following lines. Again, replace the “smtp.example.com” host name with the actual host name of your smart host; use the correct port number; and pay attention to the file name.


relayhost=[sslout.df.eu]:465
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd
smtp_sasl_security_options =
smtp_tls_wrappermode = yes
smtp_tls_security_level = encrypt


7. Restart Postfix, and test your new configuration.

systemctl restart postfix

allerdings bekomme ich ein:

pmg postfix/smtp[7597]: CCEC120308: to=<mail@domain.de>, relay=sslout.df.eu[134.119.18.24]:465, delay=0.49, delays=0.05/0.01/0.38/0.05, dsn=5.0.0, status=bounced (host sslout.df.eu[134.119.18.24] said: 550 "envelope sender not allowed extern@postfach.de" (in reply to MAIL FROM command))

ich kann ja nicht für alle canonicals einrichten, nur damit df.eu das versendet.

So nun meine Frage, ich möchte das die Mails an mich auf den PMG landen (funktioinert) und dann weiter zum df.eu postfach geleitet werden.
Bin mir nicht sicher, aber ich denke mein PMG ist ein relayhost, den df.eu nicht akzeptiert... was kann ich tun?

Danke für jeden Kommentar der mich auf die richtige Spur bringt.

BTW: ich habe auch schon gesucht, weil ich natürlich weiß, dass ich bestimmt nicht der Einzige mit diesem Problem bin, habe aber nichts Richtiges gefunden. Liegt wohl an meiner Unkenntis.

Grüße und Danke
 
1. Let’s take care of software dependencies first. You need to install a SASL library that’s not included by default; if you skip this step, you’ll see errors in your Postfix log and authentication will fail. Update software package information, and then install “libsasl2-modules.”

apt-get update
apt-get install libsasl2-modules
Woher kommt diese info?
Prinzipiell ist PMG nicht wirklich dafür vorgesehen SMTP-AUTH zum downstream server zu sprechen (da dies normalerweise eher mail-clients machen) - Kann zwar gemacht werden - allerdings muss zum anpassen der main.cf (und master.cf) in PMG das templateing system verwendet werden:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

pmg postfix/smtp[7597]: CCEC120308: to=<mail@domain.de>, relay=sslout.df.eu[134.119.18.24]:465, delay=0.49, delays=0.05/0.01/0.38/0.05, dsn=5.0.0, status=bounced (host sslout.df.eu[134.119.18.24] said: 550 "envelope sender not allowed extern@postfach.de" (in reply to MAIL FROM command))
das kann viele Gründe haben - und welcher es genau ist kann der admin von sslout.df.eu sagen - aber ich kann mir vorstellen, dass die PMG-IP für mail@domain.de als "trusted relay" (oder so ähnlich) bei df.eu hinterlegt werden muss.

Prinzipiell wuerde ich mal schauen ob df.eu ein HOWTO hat für externe Mail-filter und MX.

Ich hoffe das hilft!
 
Hallo,

danke werd mich mal weiter durchkämpfen und nachfragen bei df.eu. Gibt es sonst eine Alternative? einen eigenen postfix der nur das macht? Aber da hänge ich wahrscheinlich wieder an der "Mail-filter" Problmatik.

Danke schon mal
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!