Latest postfix update breaks hash-based aliases.db (potentially other .db files too?)

Asked by d1zzyg

OS: Ubuntu 8.04.4 LTS
Package: 2.5.1-2ubuntu1.4

Errors were reported during the update:
  postfix/postfix-script: fatal: the Postfix mail system is already running [fail]
  invoke-rc.d: initscript postfix, action "restart" failed.
  dpkg: error processing postfix (--configure):
   subprocess post-installation script returned error exit status 1
  dpkg: dependency problems prevent configuration of postfix-ldap:
   postfix-ldap depends on postfix (= 2.5.1-2ubuntu1.4); however:
    Package postfix is not configured yet.
  dpkg: error processing postfix-ldap (--configure):
   dependency problems - leaving unconfigured
  dpkg: dependency problems prevent configuration of postfix-pcre:
   postfix-pcre depends on postfix (= 2.5.1-2ubuntu1.4); however:
    Package postfix is not configured yet.
  dpkg: error processing postfix-pcre (--configure):
   dependency problems - leaving unconfigured
  Processing triggers for libc6 ...
  ldconfig deferred processing now taking place
  Errors were encountered while processing:
   postfix
   postfix-ldap
   postfix-pcre

Whenever postfix is restarted, the following errors are shown in /var/log/mail.err:
  Jun 22 09:50:04 colossus postfix/local[30997]: fatal: open database /etc/mail/aliases.db: Invalid argument

The *original* version of the aliases.db file gives (file /etc/postfix/aliases.db):
  /etc/postfix/aliases.db: Berkeley DB (Hash, version 8, native byte-order)
... whereas *after* the update it shows version 9.

TEMPORARY FIX: Changing the default_database_type to btree fixes aliases.db, kills the mail.errors and allows postfix to run normally.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu postfix Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Scott Kitterman (kitterman) said :
#1

https://launchpadlibrarian.net/71523987/postfix_2.5.1-2ubuntu1.3_2.5.1-2ubuntu1.4.diff.gz

There's nothing in the update that could cause that. It looks like what you have is a postfix configuration problem unrelated to the package update.

Revision history for this message
Scott Kitterman (kitterman) said :
#2

What is the output of postconf -n|grep alias? On a Ubuntu system with Ubuntu defaults it will look like:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases

Revision history for this message
d1zzyg (brianjamesgillespie) said :
#3

postfix was working for a long time (of the order of months) prior to the update. Originally the alias_database and alias_maps types were indeed hash:...

We were able to roll back the original working aliases.db file from backup and this works. However when the postaliases command is run (with the db type set to hash) it creates a Berkeley v9 hash file, subsequent reloads of postfix fail on smtp and local. Replacing the aliases.db from backup, *or* changing the db type to btree then running postaliases allows postfix to run correctly on reload.

Revision history for this message
Scott Kitterman (kitterman) said :
#4

Please notice that you didn't actually answer my question. I don't doubt you have a problem that somehow got exposed by postfix going through the configuration process that is part of the update, but the actual update isn't your problem. If you look at the diff you'll see it's completely unrelated.

Revision history for this message
d1zzyg (brianjamesgillespie) said :
#5

Apologies, I should have worded my response better.

If we run "postconf -n | grep alias" with the configuration as it stands now, we see:

     :
  alias_database = btree:/etc/mail/aliases
  alias_maps = btree:/etc/mail/aliases
     :

... but before we changed it (to address our problem), the results were:

     :
  alias_database = hash:/etc/mail/aliases
  alias_maps = hash:/etc/mail/aliases
     :

Revision history for this message
Scott Kitterman (kitterman) said :
#6

Are you using an aliases file in /etc or /etc/mail? Your original bug report refers to both.

I'd run sudo postalias $PATH_YOU_WANT/aliases and then set alias_database and alias_maps to point at that one.

Revision history for this message
Launchpad Janitor (janitor) said :
#7

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.