<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><span style="font-size:0.75em;">Hallo zusammen,</span></p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">ich habe hier eine auf Debian funktionierende main.cf, die ich auf CentOS 7 (FreePBX) übertragen habe:</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">alias_database = hash:/etc/aliases</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">alias_maps = hash:/etc/aliases</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">append_dot_mydomain = no</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">biff = no</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">canonical_maps = hash:/etc/postfix/canonical</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">config_directory = /etc/postfix</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">inet_interfaces = all</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">mailbox_command = procmail -a "$EXTENSION"</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">mailbox_size_limit = 0</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">mydestination = pbx.postfixserver.tld, localhost.postfixserver.tld, localhost</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">myhostname = pbx.postfixserver.tld</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">myorigin = /etc/mailname</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">readme_directory = no</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">recipient_delimiter = +</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">relayhost = [mx.example.tld]:587</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtp_sasl_auth_enable = yes</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtp_sasl_mechanism_filter = plain</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtp_sasl_security_options = noanonymous</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtp_sasl_tls_security_options = noanonymous</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtp_tls_security_level = may</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">smtpd_use_tls = yes</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">postconf: warning: /etc/postfix/main.cf: unused parameter: compatibility_level=2</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Auf dem bisherigen FreePBX-Server (Debian) funktioniert der Mail Versand zum Relayhost. Ich habe lediglich “mydestination”, “myhostname” und die “/etc/mailname” mit dem richtigen Hostnamen angepasst.</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">caconical:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">FaxMaster@pbx.postfixserver.tld fax@example.tld</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">root@pbx.postfixserver.tld root-asterisk@example.tld</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">asterisk@pbx.postfixserver.tld asterisk@example.tld</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Wenn ich jetzt eine Testmail senden will, sehe ich das hier im LogFile:</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Feb 16 08:53:15 pbx postfix/pickup[10471]: 0936C41D41BE: uid=0 from=<root></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Feb 16 08:53:15 pbx postfix/cleanup[10536]: 0936C41D41BE: message-id=<20220216085315.0936C41D41BE@pbx.postfixserver.tld></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Feb 16 08:53:15 pbx postfix/qmgr[10472]: 0936C41D41BE: from=<root@/etc/mailname>, size=454, nrcpt=1 (queue active)</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Feb 16 08:53:18 pbx postfix/smtp[10538]: 0936C41D41BE: to=<info@example.tld>, relay=mx.example.tld[2a01:4f8:120:4268::24]:587, delay=3.6, delays=0.08/0.04/3.5/0.01, dsn=5.1.7, status=bounced (host mx.example.tld[2a01:4f8:120:4268::24] said: 501 5.1.7 Bad sender address syntax (in reply to MAIL FROM command))</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Wie zu sehen ist, trägt Postfix (Centos) als Absender <a href="mailto:<root@/etc/mailname"><em>"<root@/etc/mailname>"</em></a> anstatt <a href="mailto:asterisk@example.tld"><em>root-asterisk@example.tld.</em></a></p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Was mache ich bei Centos falsch?</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Beste Grüße</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Andreas</p>
<br /><br /></body>
</html>