• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

postfix-Versand scheitert beim Ändern von myhostname

Hallo zusammen,
ich habe auf meinem LAN-internen Server folgende postfix-Konfiguration (nur für den maschinen-internen Versand, also z. B. ddclient an root):
Code:
# postconf -n
alias_maps = hash:/etc/aliases
biff = no
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
content_filter =
daemon_directory = /usr/lib/postfix/bin/
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
defer_transports =
delay_warning_time = 1h
disable_dns_lookups = no
disable_mime_output_conversion = no
disable_vrfy_command = yes
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_interfaces = localhost
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 0
message_strip_characters = \0
mydestination = $myhostname, localhost.$mydomain
myhostname = linux-5h2s.homenet
mynetworks_style = subnet
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relay_clientcerts =
relay_domains = $mydestination, hash:/etc/postfix/relay
relayhost =
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix-doc/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_enforce_tls = no
smtp_sasl_auth_enable = no
smtp_sasl_password_maps =
smtp_sasl_security_options =
smtp_tls_CAfile =
smtp_tls_CApath =
smtp_tls_cert_file =
smtp_tls_key_file =
smtp_tls_session_cache_database =
smtp_use_tls = no
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions =
smtpd_delay_reject = yes
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_tls_CAfile =
smtpd_tls_CApath =
smtpd_tls_ask_ccert = no
smtpd_tls_cert_file =
smtpd_tls_key_file =
smtpd_tls_received_header = no
smtpd_use_tls = no
strict_8bitmime = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual
Diese ist nahezu unverändert von der openSUSE-Standard-Konfiguration übernommen.

Mein Problem: Ändere ich myhostname funktioniert anschließend der maschinen-interne Versand nicht mehr. Beispielsweise nach (also ohne Angabe von ".homenet")
Code:
myhostname = linux-5h2s
Anschließend ein
Code:
# postfix reload
Mich wundert das, denn auf meinem Testsystem ist das kein Problem und es werden anschließend Mails mit dem neuen myhostname versendet.

Was übersehe ich? Gibt es noch eine andere Instanz, die hier passen muss?
Gruß, Hengstenberg
 
OP
Hengstenberg

Hengstenberg

Member
Aus dem YaST-Modul Systemd Journal bekomme ich für den Server nur folgende Einträge:
Code:
Jun 25 14:02:16│postlog[28381]        │refreshing the Postfix mail system
Jun 25 14:02:16│master[17026]         │reload -- version 3.3.1, configuration /etc/postfix
Gibt es noch andere Logs, die mehr Informationen liefern? Ich habe auf dem Server keine /var/log/messages oder /var/log/mail wie auf meinem Testsystem, musste ich eben feststellen.

Auf meinem Testsystem sieht das bspw. so aus (Auszug aus /var/log/mail):
Es fängt an, dass ich als myhostname=linux-7n3z.homenet gesetzt habe und etwa ab der Mitte habe ich dann myhostname=linux-7n3z gesetzt. Wie geschrieben, auf dem Testsystem alles gut, nur auf dem Server nicht. Wie käme ich an diese Informationen auf meinem Server?
Code:
2019-06-25T10:57:23.899376+02:00 linux-7n3z postfix/postfix-script[5788]: refreshing the Postfix mail system
2019-06-25T10:57:23.905656+02:00 linux-7n3z postfix/master[2175]: reload -- version 3.3.1, configuration /etc/postfix
2019-06-25T11:19:26.878507+02:00 linux-7n3z postfix/smtpd[6054]: connect from localhost[::1]
2019-06-25T11:19:26.896128+02:00 linux-7n3z postfix/smtpd[6054]: DABD229343: client=localhost[::1]
2019-06-25T11:19:26.896702+02:00 linux-7n3z postfix/cleanup[6057]: DABD229343: message-id=<1628395.hA0BFrSt9J@linux-7n3z>
2019-06-25T11:19:26.901604+02:00 linux-7n3z postfix/smtpd[6054]: disconnect from localhost[::1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
2019-06-25T11:19:26.911916+02:00 linux-7n3z postfix/qmgr[5795]: DABD229343: from=<>, size=442, nrcpt=1 (queue active)
2019-06-25T11:19:27.018170+02:00 linux-7n3z postfix/smtp[6058]: DABD229343: to=<root@linux-7n3z.homenet>, relay=none, delay=0.12, delays=0.02/0.03/0.06/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=linux-7n3z.homenet type=AAAA: Host not found)
2019-06-25T11:19:27.018899+02:00 linux-7n3z postfix/qmgr[5795]: DABD229343: removed
2019-06-25T11:20:33.505533+02:00 linux-7n3z postfix/smtpd[6054]: connect from localhost[::1]
2019-06-25T11:20:33.507550+02:00 linux-7n3z postfix/smtpd[6054]: 7BDCA29347: client=localhost[::1]
2019-06-25T11:20:33.508025+02:00 linux-7n3z postfix/cleanup[6057]: 7BDCA29347: message-id=<7773692.7tlC4zSDx9@linux-7n3z>
2019-06-25T11:20:33.513728+02:00 linux-7n3z postfix/smtpd[6054]: disconnect from localhost[::1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
2019-06-25T11:20:33.518833+02:00 linux-7n3z postfix/qmgr[5795]: 7BDCA29347: from=<>, size=443, nrcpt=1 (queue active)
2019-06-25T11:20:33.527701+02:00 linux-7n3z postfix/smtp[6058]: 7BDCA29347: to=<root@linux-7n3z.homenet>, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=linux-7n3z.homenet type=AAAA: Host not found)
2019-06-25T11:20:33.529206+02:00 linux-7n3z postfix/qmgr[5795]: 7BDCA29347: removed
2019-06-25T11:26:56.510991+02:00 linux-7n3z postfix/sendmail[6088]: fatal: root(0): Recipient addresses must be specified on the command line or via the -t option
2019-06-25T13:48:26.091087+02:00 linux-7n3z postfix/pickup[6866]: 1630529355: uid=1000 from=<mike>
2019-06-25T13:48:26.096382+02:00 linux-7n3z postfix/cleanup[8118]: 1630529355: message-id=<20190625114826.1630529355@linux-7n3z>
2019-06-25T13:48:26.101073+02:00 linux-7n3z postfix/qmgr[5795]: 1630529355: from=<mike@linux-7n3z>, size=440, nrcpt=1 (queue active)
2019-06-25T13:48:26.111151+02:00 linux-7n3z postfix/local[8122]: 1630529355: to=<mike@linux-7n3z>, orig_to=<root>, relay=local, delay=0.03, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
2019-06-25T13:48:26.111389+02:00 linux-7n3z postfix/qmgr[5795]: 1630529355: removed
2019-06-25T13:54:04.490764+02:00 linux-7n3z postfix/postfix-script[8366]: refreshing the Postfix mail system
2019-06-25T13:54:04.497119+02:00 linux-7n3z postfix/master[2175]: reload -- version 3.3.1, configuration /etc/postfix
2019-06-25T13:54:31.222064+02:00 linux-7n3z postfix/pickup[8372]: 362A82935D: uid=1000 from=<mike>
2019-06-25T13:54:31.227244+02:00 linux-7n3z postfix/cleanup[8401]: 362A82935D: message-id=<20190625115431.362A82935D@linux-7n3z.homenet>
2019-06-25T13:54:31.235620+02:00 linux-7n3z postfix/qmgr[8373]: 362A82935D: from=<mike@linux-7n3z.homenet>, size=614, nrcpt=1 (queue active)
2019-06-25T13:54:31.246115+02:00 linux-7n3z postfix/local[8405]: 362A82935D: to=<mike@linux-7n3z.homenet>, orig_to=<root>, relay=local, delay=0.04, delays=0.03/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
2019-06-25T13:54:31.246391+02:00 linux-7n3z postfix/qmgr[8373]: 362A82935D: removed
2019-06-25T13:55:07.001778+02:00 linux-7n3z postfix/postfix-script[8468]: refreshing the Postfix mail system
2019-06-25T13:55:07.007998+02:00 linux-7n3z postfix/master[2175]: reload -- version 3.3.1, configuration /etc/postfix
2019-06-25T13:55:12.803033+02:00 linux-7n3z postfix/pickup[8475]: C3FDB29360: uid=1000 from=<mike>
2019-06-25T13:55:12.808472+02:00 linux-7n3z postfix/cleanup[8488]: C3FDB29360: message-id=<20190625115512.C3FDB29360@linux-7n3z>
2019-06-25T13:55:12.813259+02:00 linux-7n3z postfix/qmgr[8474]: C3FDB29360: from=<mike@linux-7n3z>, size=726, nrcpt=1 (queue active)
2019-06-25T13:55:12.820960+02:00 linux-7n3z postfix/local[8492]: C3FDB29360: to=<mike@linux-7n3z>, orig_to=<root>, relay=local, delay=0.03, delays=0.02/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
2019-06-25T13:55:12.821243+02:00 linux-7n3z postfix/qmgr[8474]: C3FDB29360: removed
2019-06-25T14:06:42.731382+02:00 linux-7n3z postfix/pickup[8475]: B285329363: uid=1000 from=<mike>
2019-06-25T14:06:42.736742+02:00 linux-7n3z postfix/cleanup[8647]: B285329363: message-id=<20190625120642.B285329363@linux-7n3z>
2019-06-25T14:06:42.747034+02:00 linux-7n3z postfix/qmgr[8474]: B285329363: from=<mike@linux-7n3z>, size=870, nrcpt=1 (queue active)
2019-06-25T14:06:42.756725+02:00 linux-7n3z postfix/local[8651]: B285329363: to=<mike@linux-7n3z>, orig_to=<root>, relay=local, delay=0.04, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
2019-06-25T14:06:42.756990+02:00 linux-7n3z postfix/qmgr[8474]: B285329363: removed
2019-06-25T14:21:43.358590+02:00 linux-7n3z postfix/pickup[8475]: 577F12936A: uid=0 from=<root>
2019-06-25T14:21:43.364164+02:00 linux-7n3z postfix/cleanup[9268]: 577F12936A: message-id=<20190625122143.577F12936A@linux-7n3z>
2019-06-25T14:21:43.374318+02:00 linux-7n3z postfix/qmgr[8474]: 577F12936A: from=<root@linux-7n3z>, size=3456, nrcpt=1 (queue active)
2019-06-25T14:21:43.384522+02:00 linux-7n3z postfix/local[9273]: 577F12936A: to=<mike@linux-7n3z>, orig_to=<root>, relay=local, delay=0.04, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
2019-06-25T14:21:43.384781+02:00 linux-7n3z postfix/qmgr[8474]: 577F12936A: removed
2019-06-25T14:30:02.048596+02:00 linux-7n3z postfix/pickup[8475]: 0BD2929373: uid=0 from=<root>
2019-06-25T14:30:02.053999+02:00 linux-7n3z postfix/cleanup[9553]: 0BD2929373: message-id=<20190625123002.0BD2929373@linux-7n3z>
2019-06-25T14:30:02.064468+02:00 linux-7n3z postfix/qmgr[8474]: 0BD2929373: from=<root@linux-7n3z>, size=3456, nrcpt=1 (queue active)
2019-06-25T14:30:02.071412+02:00 linux-7n3z postfix/pickup[8475]: 1166629376: uid=0 from=<root>
2019-06-25T14:30:02.071986+02:00 linux-7n3z postfix/cleanup[9553]: 1166629376: message-id=<20190625123002.1166629376@linux-7n3z>
2019-06-25T14:30:02.082015+02:00 linux-7n3z postfix/local[9567]: 0BD2929373: to=<mike@linux-7n3z>, orig_to=<root>, relay=local, delay=0.04, delays=0.03/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
2019-06-25T14:30:02.082328+02:00 linux-7n3z postfix/qmgr[8474]: 0BD2929373: removed
2019-06-25T14:30:02.100973+02:00 linux-7n3z postfix/qmgr[8474]: 1166629376: from=<root@linux-7n3z>, size=1219, nrcpt=1 (queue active)
2019-06-25T14:30:02.109012+02:00 linux-7n3z postfix/local[9567]: 1166629376: to=<mike@linux-7n3z>, orig_to=<root>, relay=local, delay=0.04, delays=0.03/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
2019-06-25T14:30:02.109291+02:00 linux-7n3z postfix/qmgr[8474]: 1166629376: removed
 
Schau mal in der /etc/hosts nach ob dort neben dem vollen Namen mit Domain (FQDN) auch noch der Kurzname, also ohne Domain angegeben ist.
 
OP
Hengstenberg

Hengstenberg

Member
Die /etc/hosts der Maschine linux-5h2s sieht wie folgt aus:
Code:
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.
# Syntax:
#    
# IP-Address    Full-Qualified-Hostname  Short-Hostname
#

127.0.0.1       localhost 
192.168.153.2   fritz.extender 
192.168.153.3   fritz.repeater 
192.168.153.11  homenet.switch 
192.168.153.21  linux-7n3z
192.168.153.23  linux-6o2w
192.168.153.24  linux-8u4v
192.168.153.35  linux-9a1c

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet 

ff00::0         ipv6-mcastprefix 
ff02::1         ipv6-allnodes 
ff02::2         ipv6-allrouters 
ff02::3         ipv6-allhosts
 

spoensche

Moderator
Teammitglied
Du musst den geänderten Hostnamen auch in der /etc/hosts eintragen. Wenn Postfix ihn per DNS nicht auflösen kann streikt er.
 
Oben