#537789 postfix: postmap crashes if networking is not configured

Package:
postfix
Source:
postfix
Description:
High-performance mail transport agent
Submitter:
Tyler MacDonald
Date:
2024-12-10 20:06:01 UTC
Severity:
normal
Tags:
#537789#5
Date:
2009-07-20 22:50:14 UTC
From:
To:
If you attempt to run postmap before network interfaces have been created,
it crashes with the following error:

  postmap: fatal: could not find any active network interfaces

It seems that postmap is playing around with networking stuff, even though
it is only used to make .db key/value pair files.

The workaround is to do an "ifconfig lo up" before running postmap, but
that's kind-of silly. I understand that "postmap -q" can query remote
sources (eg; LDAP), but do I really need an active network interface just to
manipulate files on my own hard disk?

	Thanks,
		Tyler

#537789#10
Date:
2024-12-10 17:21:04 UTC
From:
To:
Control: tag + confirmed upstream wontfix

Hi!

This is upstream behavior.  The problem is that quite some things in postfix
depends on various variables set in main.cf.  postmap might look innocent,
but it does a bit more than it seem it does.  It initializes all variables
as almost any other postfix program does (the exception being postconf).
Upstream does not distinguish between used and unused main.cf variable,
especially in context that they might be referenced by each other in
non-trivial way.  So the conclusion was to init them all.

Upstream don't recommend running any postfix command until the system is
up and running.

/mjt