[Postfix] Warn that databases need regeneration
Hello, I realised overnight I was not receiving emails after the latest version of postfix [1]. This is currently in testing, however I thought it would be best to discuss in the general mailing list instead of #archlinux-testing as it is a larger topic. I searched for a "updating" or "upgrading" documentation from postfix, and read their announcement and no mention was made of this. [2][3] Background behind this, I thought it was weird I didn't receive any emails for 24 hours (spam emails are pretty common, and mailing list emails so this is unheard of), so I checked the logs and found the following after updating: Jan 23 14:43:46 email postfix/trivial-rewrite[1043]: warning: virtual_alias_domains lookup failure Jan 23 14:43:46 email postfix/trivial-rewrite[1043]: warning: virtual_alias_domains: hash:/etc/postfix/virtual: table lookup problem Jan 23 14:43:46 email postfix/trivial-rewrite[1043]: warning: hash:/etc/postfix/virtual is unavailable. open database /etc/postfix/virtual.db: Invalid argument Jan 23 14:43:46 email postfix/trivial-rewrite[1043]: error: open database /etc/postfix/virtual.db: Invalid argument (Note these are in REVERSE order) So I found this pretty weird and checked my config, and checked to see virtual.db existed, which it did, so I decided to just regenerate it (postmap virtual). And it fixed the issue. I then restarted and found this: Jan 23 14:46:55 email postfix/local[1094]: warning: hash:/etc/postfix/aliases: lookup of 'polarian' failed Jan 23 14:46:55 email postfix/local[1094]: warning: hash:/etc/postfix/aliases is unavailable. open database /etc/postfix/aliases.db: Invalid argument And I did the same thing, regenerated aliases.db (postmap aliases). This fixed the issue and I am back to recieving emails, but there was NO warning of the requirement to regenerate the databases, unless it is deeply nested into the documentation somewhere? I have had my email server for years, and I have never had issues with updating, so I do find it a little strange that this update required regeneration of the databases, and there was no warning in the accouncement about it. So I have a few suggestions: - Adding a upgrading note to the ArchWiki article. [4] - Add a echo to warn the user to regenerate the virtual and aliases database in post_upgrade(). [5] And also a few questions: - Does anyone know if there is any source I am missing which warned about the requirement to regenerate the aliases and virtual databases on upgrade? - Did anyone else encounter this issue? (you would need to have testing repository enabled) Take care, -- Polarian GPG signature: 0770E5312238C760 Website: https://polarian.dev JID/XMPP: polarian@icebound.dev [1] https://gitlab.archlinux.org/archlinux/packaging/packages/postfix/-/commit/7... [2] https://www.postfix.org/smtp-smuggling.html [3] https://www.postfix.org/announcements/postfix-3.8.5.html [4] https://wiki.archlinux.org/title/Postfix [5] https://gitlab.archlinux.org/archlinux/packaging/packages/postfix/-/blob/mai...
Hello, Sorry for a second email, I just noticed a commit changing from db to db5.3 downgrading the version. [1] I assume this is the cause of the incompatibility, and thus it was not the version bump, but the change in dependency. The suggestion of warning users to regenerate their aliases.db and virtual.db remains, as postfix does not appear to function without doing this. Take care, -- Polarian GPG signature: 0770E5312238C760 Website: https://polarian.dev JID/XMPP: polarian@icebound.dev [1] https://gitlab.archlinux.org/archlinux/packaging/packages/postfix/-/commit/c...
On Tue, Jan 23, 2024 at 15:20:46 +0000, Polarian wrote:
Hello,
Sorry for a second email, I just noticed a commit changing from db to db5.3 downgrading the version. [1]
I assume this is the cause of the incompatibility, and thus it was not the version bump, but the change in dependency.
The suggestion of warning users to regenerate their aliases.db and virtual.db remains, as postfix does not appear to function without doing this.
This has been reverted in postfix 3.8.5-2, so you may need to postmap your .db files again. (users not on [testing] won't have this issue) FYI: it's being considered to move away from Berkeley DB entirely, see: https://gitlab.archlinux.org/archlinux/packaging/packages/postfix/-/issues/3 So you may already want to look into cdb: or lmdb: alternatives. Geert
On Wed, 2024-01-24 at 17:03 +0100, Geert Hendrickx wrote:
... This has been reverted in postfix 3.8.5-2, so you may need to postmap your .db files again. (users not on [testing] won't have this issue)
Geert - this should be okay as the revert takes db5 back to db6 (again) - the earlier problem was likely stemming from 6 going down to 5.
FYI: it's being considered to move away from Berkeley DB entirely, see: https://gitlab.archlinux.org/archlinux/packaging/packages/postfix/- /issues/3 So you may already want to look into cdb: or lmdb: alternatives.
This is a good suggestion. I have changed all my lookup table maps to no longer use 'hash:' -- Gene
On Tue, 2024-01-23 at 15:16 +0000, Polarian wrote See: https://gitlab.archlinux.org/archlinux/packaging/packages/postfix/-/issues/2
Hello,
See:
https://gitlab.archlinux.org/archlinux/packaging/packages/postfix/-/issues/2
I was unaware of this apologises, probably should have checked the issues. It is a real shame to do anything else days I need to sign into gitlab instead of checking my email, so much more of a headache but oh well. Take care, -- Polarian GPG signature: 0770E5312238C760 Website: https://polarian.dev JID/XMPP: polarian@icebound.dev
participants (3)
-
Geert Hendrickx
-
Genes Lists
-
Polarian