SMTP Einstellungen

e4e

Member
Oct 7, 2019
18
0
21
40
Hallo,

ich bin gerade dabei das Gateway zu testen. Leider habe ich während der Installation nicht die richtigen Einstellungen für den SMTP eingetragen. Welche Einstellungen muss ich ändern, dass der Exchange-Server funktioniert.

Vielen Dank
 
nicht möglich das direkt zu sagen ohne mehr infos zu haben...

bitte mal das '/var/log/mail.log' posten (anonymisiert!) - und ein `pmgconfig dump` (ebenfalls consistent anonymisiert) - vl. werden wir daraus schlau, wo es hakt

Danke
 
composed.wl_bounce_relays = pmg.xxx.local
dns.domain = xxx.local
dns.hostname = pmg
ipconfig.int_ip = 192.168.xxx.xxx
pmg.admin.advfilter = 1
pmg.admin.avast = 0
pmg.admin.clamav = 1
pmg.admin.custom_check = 0
pmg.admin.custom_check_path = /usr/local/bin/pmg-custom-check
pmg.admin.dailyreport = 1
pmg.admin.demo = 0
pmg.admin.email = meine@mail.at
pmg.admin.http_proxy =
pmg.admin.statlifetime = 7
pmg.clamav.archiveblockencrypted = 0
pmg.clamav.archivemaxfiles = 1000
pmg.clamav.archivemaxrec = 5
pmg.clamav.archivemaxsize = 25000000
pmg.clamav.dbmirror = database.clamav.net
pmg.clamav.maxcccount = 0
pmg.clamav.maxscansize = 100000000
pmg.clamav.safebrowsing = 1
pmg.mail.banner = ESMTP Proxmox
pmg.mail.conn_count_limit = 50
pmg.mail.conn_rate_limit = 0
pmg.mail.dnsbl_sites =
pmg.mail.dnsbl_threshold = 1
pmg.mail.dwarning = 12
pmg.mail.ext_port = 25
pmg.mail.greylist = 1
pmg.mail.helotests = 0
pmg.mail.hide_received = 0
pmg.mail.int_port = 26
pmg.mail.max_filters = 23
pmg.mail.max_policy = 5
pmg.mail.max_smtpd_in = 100
pmg.mail.max_smtpd_out = 100
pmg.mail.maxsize = 104857600
pmg.mail.message_rate_limit = 0
pmg.mail.rejectunknown = 0
pmg.mail.rejectunknownsender = 0
pmg.mail.relay = 192.168.xxx.xxx
pmg.mail.relaynomx = 0
pmg.mail.relayport = 25
pmg.mail.smarthost =
pmg.mail.smarthostport = 25
pmg.mail.spf = 1
pmg.mail.tls = 0
pmg.mail.tlsheader = 0
pmg.mail.tlslog = 0
pmg.mail.verifyreceivers =
pmg.spam.bounce_score = 0
pmg.spam.clamav_heuristic_score = 3
pmg.spam.languages = all
pmg.spam.maxspamsize = 262144
pmg.spam.rbl_checks = 1
pmg.spam.use_awl = 1
pmg.spam.use_bayes = 1
pmg.spam.use_razor = 1
pmg.spam.wl_bounce_relays =
pmg.spamquar.allowhrefs = 1
pmg.spamquar.authmode = ticket
pmg.spamquar.hostname =
pmg.spamquar.lifetime = 7
pmg.spamquar.mailfrom =
pmg.spamquar.port = 8006
pmg.spamquar.protocol = https
pmg.spamquar.reportstyle = verbose
pmg.spamquar.viewimages = 1
pmg.virusquar.allowhrefs = 1
pmg.virusquar.lifetime = 7
pmg.virusquar.viewimages = 1
postfix.dnsbl_threshold = 1
postfix.int_ip = 192.168.121.113
postfix.mynetworks = 127.0.0.0/8 [::1]/128 192.168.xxx.0/24 192.168.xxx.xxx/32
postfix.transportnets =
postfix.usepolicy = 1
postgres.version = 11



logfile:
Oct 8 04:30:10 pmg pmgpolicy[965]: starting policy database maintainance (grey$
Oct 8 04:30:10 pmg pmgpolicy[965]: end policy database maintainance (12 ms, 1 $
Oct 8 04:30:43 pmg pmg-smtp-filter[19979]: starting database maintainance
Oct 8 04:30:43 pmg pmg-smtp-filter[19979]: end database maintainance (10 ms)
Oct 8 04:32:20 pmg pmgpolicy[965]: starting policy database maintainance (grey$
Oct 8 04:32:20 pmg pmgpolicy[965]: end policy database maintainance (16 ms, 5 $
Oct 8 04:32:44 pmg pmg-smtp-filter[19979]: starting database maintainance
Oct 8 04:32:44 pmg pmg-smtp-filter[19979]: end database maintainance (11 ms)
Oct 8 04:34:30 pmg pmgpolicy[965]: starting policy database maintainance (grey$
Oct 8 04:34:30 pmg pmgpolicy[965]: end policy database maintainance (14 ms, 1 $
Oct 8 04:34:44 pmg pmg-smtp-filter[19979]: starting database maintainance
Oct 8 04:34:44 pmg pmg-smtp-filter[19979]: end database maintainance (11 ms)
Oct 8 04:36:40 pmg pmgpolicy[965]: starting policy database maintainance (grey$
Oct 8 04:36:40 pmg pmgpolicy[965]: end policy database maintainance (12 ms, 1 $
Oct 8 04:36:44 pmg pmg-smtp-filter[19979]: starting database maintainance
Oct 8 04:36:44 pmg pmg-smtp-filter[19979]: end database maintainance (10 ms)
Oct 8 04:38:44 pmg pmg-smtp-filter[19979]: starting database maintainance
Oct 8 04:38:44 pmg pmg-smtp-filter[19979]: end database maintainance (10 ms)
Oct 8 04:38:50 pmg pmgpolicy[965]: starting policy database maintainance (grey$



vielen dank
 
bei dem log sehe ich keine einzige mail die reinkommt/zugestellt werden soll - damit fehlen auch die infos was denn nicht geht.


Vielleicht auch mal das setup beschreiben, wie es funktionieren soll:
* wo ist der exchange server
* wurden sämtliche domains für die das PMG mails annehmen soll auch bei RelayDomains (GUI->Configuration->Mail Proxy) eingetragen?
 
Ich musste die pmg wieder abschalten, da ich sonst beim Versand der E-Mails Probleme bekommen hätte, da die Rückmeldungen bei HELO pmg.xxx.local ist und nicht mail.xxx.co.at

RelayDomains wurden angelegt. Der Empfang klappt problemlos.

Die Anordnung:
Empfang: Firewall -> gibt Port 25 an PMG -> gibt Port 25 an Exchange Server
Senden: derzeit sendet der Exchange Server noch direkt ohne PMG
 
per default meldet sich PMG beim HELO mit seinem hostname -> eine einfache Möglichkeit wäre es den hostname auf mail.xxx.co.at zu setzen (Vorsicht mit den DNS-records und die logs im Auge behalten).
Alternativ kann auch der helo name bei postfix konfiguriert werden - siehe https://forum.proxmox.com/threads/change-helo-hostname.52582/
https://forum.proxmox.com/threads/change-helo-fqdn-independently-from-server-hostname.44186/
und https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#_service_configuration_templates (für das bearbeiten der Config-templates)

Senden: derzeit sendet der Exchange Server noch direkt ohne PMG
beim ausgehenden Versand sollte der exchange die mails an den internen Port von PMG weiterreichen - siehe punkt 4.5.3 der referenzdoku: https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html

Ich hoffe das hilft!
 
vielen dank, ich arbeite dies durch.
Welche Einstellung ist beim: dpkg-reconfigure postfix die richtige für mich?
 

Attachments

  • Image 4.png
    Image 4.png
    4.7 KB · Views: 19
vielen dank, ich arbeite dies durch.
Welche Einstellung ist beim: dpkg-reconfigure postfix die richtige für mich?
die config von postfix wird vom PMG-stack übernommen und überschrieben - insofern kann hier alles ausgewählt werden - nachher muss jedoch mittels `pmgconfig sync` die config geschrieben werden und postfix nochmals neugestartet werden `systemctl restart postfix`

Ich hoffe das hilft
 
Somit ist es egal ob ich local oder sattelite nehme?

wenn ich den Befehl 'pmgconfig sync' eingebe bekomme ich die Fehlermeldung: "could not change directory to "/root": Permission denied"
 
wenn ich den Befehl 'pmgconfig sync' eingebe bekomme ich die Fehlermeldung: "could not change directory to "/root": Permission denied"
die kommt daher das teile des Befehls nicht als root user ausgeführt werden können und diese nicht nach /root wechseln können.

Die Meldung ist an und für sich in diesem Kontext harmlos.

Zur Überpruefung einfach vorher nach /tmp wechseln und es nochmal versuchen:
Code:
cd /tmp
pmgconfig sync
 
Hallo,

ich habe nun die Änderung in die Config eingetragen, aber leider wurde diese nicht übernommen:

220-pmg.xxx.local ESMTP Proxmox<br />220 pmg.xxx.local ESMTP Proxmox

Vielen Dank für Tipps
 
Hallo,

ich habe es nun wie in deinem Link angeführt probiert und die Zeile:
[% IF dns.hostname == '<server1>' %]
myhostname = mx1.domain.nl
[% END %]

eingefügt.
Ich habe beide Variante probiert. Einmal habe ich den bestehenden Eintrag mit myhostname mit # deaktiviert und einmal nicht.

Bei beiden Versionen kommen keine Mails an und der Sender bekommt die Fehlermeldung: "loops back to myself"
Sobald ich diese zeilen wieder entferne können mails empfangen werden, jedoch habe ich dann das Problem, dass der HELO Name nicht stimmt.

Vielen Dank für Tipps

EDIT: Hat sich erledigt. Der FEhler war, dass sich exchange mit dem sleben HELO gemeldet hat.
 
Last edited:
Wenn ich pmgconfig sync mache, bekomme ich:

root@pmg02:~# pmgconfig sync
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied
 

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!