Bug 1220715 - postfix 3.8.5-2.1: myhostname variable broken
Summary: postfix 3.8.5-2.1: myhostname variable broken
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Network (show other bugs)
Version: Current
Hardware: All openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Peter Varkoly
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-29 17:51 UTC by Paul Bransford
Modified: 2024-07-19 10:45 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
archive of /etc/postfix in case the contents post package installation (49.83 KB, application/x-compressed-tar)
2024-02-29 17:51 UTC, Paul Bransford
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Bransford 2024-02-29 17:51:56 UTC
Created attachment 873135 [details]
archive of /etc/postfix in case the contents post package installation

After updating my tumbleweed system today to postfix-3.8.5-2.1.x86_64, postfix no longer starts. To ensure it wasn't something I had done, I moved the whole of /etc/postfix aside, and reinstalled the package. The daemon failed in the same way with fresh default configurations:

    Feb 29 12:38:18 my.redacted.fqdn systemd[1]: Starting Postfix Mail Transport Agent...
    Feb 29 12:38:18 my.redacted.fqdn echo[28183]: Starting mail service (Postfix)
    Feb 29 12:38:18 my.redacted.fqdn (storecon)[28311]: postfix.service: Executable /sbin/restorecon missing, skipping: No such file or directory
    Feb 29 12:38:18 my.redacted.fqdn update_postmaps[28498]: postmap: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:18 my.redacted.fqdn postfix/postmap[28498]: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:19 my.redacted.fqdn update_postmaps[29383]: postmap: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:19 my.redacted.fqdn postfix/postmap[29383]: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:20 my.redacted.fqdn update_postmaps[29475]: postmap: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:20 my.redacted.fqdn postfix/postmap[29475]: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:21 my.redacted.fqdn update_postmaps[29477]: postmap: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:21 my.redacted.fqdn postfix/postmap[29477]: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:22 my.redacted.fqdn update_postmaps[29480]: postmap: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:22 my.redacted.fqdn postfix/postmap[29480]: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:23 my.redacted.fqdn update_postmaps[29487]: postalias: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:23 my.redacted.fqdn postfix/postalias[29487]: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:24 my.redacted.fqdn postfix[29489]: postfix: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:24 my.redacted.fqdn postfix[29489]: fatal: bad string length 0 < 1: myhostname =
    Feb 29 12:38:25 my.redacted.fqdn systemd[1]: postfix.service: Control process exited, code=exited, status=1/FAILURE
    Feb 29 12:38:25 my.redacted.fqdn systemd[1]: postfix.service: Failed with result 'exit-code'.
    Feb 29 12:38:25 my.redacted.fqdn systemd[1]: Failed to start Postfix Mail Transport Agent.

    ginnungagap:~ # postfix check
    postfix: fatal: bad string length 0 < 1: myhostname = 

hostnamectl reports a static hostname of my FQDN, with a pretty hostname of just the hostname component. I have had this configuration for years.

I have attached /etc/postfix in case that should be useful (ie in case some postinst scripts are mangling it). The directory was absent prior to reinstalling the package, and I made no changes.
Comment 1 Christos Gourdoupis 2024-07-19 10:45:11 UTC
I just discovered (blush) I had the same problem.
Here's how I fixed it. Make sure 

> hostname -f

returns your FQDN. Then:

# rm /var/adm/postfix.configured
# /usr/sbin/config.postfix