adjust base postfix role to use lmdb on rhel10 hosts #13035

Closed
opened 2026-01-14 00:56:21 +00:00 by kevin · 4 comments
Owner

rhel10 doesn't ship with bdb, so hash: maps don't work in postfix.

Use lmdb: instead.

So, we need to adjust our roles/base/postfix to install a config using lmdb on rhel10.

Either only on rhel10, or switching everything to use lmdb if it's available.

rhel10 doesn't ship with bdb, so hash: maps don't work in postfix. Use lmdb: instead. So, we need to adjust our roles/base/postfix to install a config using lmdb on rhel10. Either only on rhel10, or switching everything to use lmdb if it's available.
Owner

Metadata Update from @zlopez:

  • Issue priority set to: Waiting on Assignee (was: Needs Review)
  • Issue tagged with: low-gain, medium-trouble
**Metadata Update from @zlopez**: - Issue priority set to: Waiting on Assignee (was: Needs Review) - Issue tagged with: low-gain, medium-trouble
zlopez self-assigned this 2026-02-17 13:44:56 +00:00
Owner

So as a test I tried to migrate mailman01.stg to lmdb. Here is what I needed to do:

  1. In /etc/postfix/main.cf change hash/btree to lmdb
  2. Install dnf install postfix-lmdb (I think this will not be needed on RHEL 10)
  3. Do postalias lmdb:/etc/aliases to create .lmdb file
  4. Do postmap lmdb:/var/lib/mailman3/data/postfix_domains (this is only needed for mailman3, but all the files converted from bdb to lmdb needs to be converted like this)
  5. Do postmap lmdb:/var/lib/mailman3/data/postfix_lmtp (this is only needed for mailman3, but all the files converted from bdb to lmdb needs to be converted like this)
  6. Enable SELinux boolean for lmdb setsebool domain_can_mmap_files 1 (there will be permission denied otherwise)

This makes the postfix running with lmdb instead of bdb. I will try to reflect this in ansible and create PR. I think it won't be an issue to convert all the existing postfix deployments to bdb.

So as a test I tried to migrate mailman01.stg to lmdb. Here is what I needed to do: 1. In `/etc/postfix/main.cf` change `hash/btree` to `lmdb` 2. Install `dnf install postfix-lmdb` (I think this will not be needed on RHEL 10) 3. Do `postalias lmdb:/etc/aliases` to create `.lmdb` file 4. Do `postmap lmdb:/var/lib/mailman3/data/postfix_domains` (this is only needed for mailman3, but all the files converted from bdb to lmdb needs to be converted like this) 5. Do `postmap lmdb:/var/lib/mailman3/data/postfix_lmtp` (this is only needed for mailman3, but all the files converted from bdb to lmdb needs to be converted like this) 6. Enable SELinux boolean for lmdb `setsebool domain_can_mmap_files 1` (there will be permission denied otherwise) This makes the postfix running with lmdb instead of bdb. I will try to reflect this in ansible and create PR. I think it won't be an issue to convert all the existing postfix deployments to bdb.
zlopez referenced this issue from a commit 2026-02-18 14:59:08 +00:00
Owner

I created the PR for postfix here infra/ansible#3120

I created the PR for postfix here https://forge.fedoraproject.org/infra/ansible/pulls/3120
zlopez referenced this issue from a commit 2026-02-19 15:58:56 +00:00
zlopez referenced this issue from a commit 2026-02-25 11:28:09 +00:00
zlopez referenced this issue from a commit 2026-02-26 09:12:27 +00:00
zlopez referenced this issue from a commit 2026-03-02 09:10:44 +00:00
zlopez referenced this issue from a commit 2026-03-02 16:18:52 +00:00
zlopez referenced this issue from a commit 2026-03-11 13:27:26 +00:00
zlopez referenced this issue from a commit 2026-03-11 13:37:21 +00:00
zlopez referenced this issue from a commit 2026-03-11 13:46:28 +00:00
Owner

Tested it out today on staging, have to do some adjustment that ansiblelint didn't caught, but it worked on staging proxies, mailman and correctly created lmdb files.

I also tested it out on pkgs and pagure to check it will not do anything and confirmed that it completely skipped the lmdb parts.

I think we can close this ticket and every machine should be automatically converted when playbooks will be ran next time.

Tested it out today on staging, have to do some adjustment that ansiblelint didn't caught, but it worked on staging proxies, mailman and correctly created lmdb files. I also tested it out on pkgs and pagure to check it will not do anything and confirmed that it completely skipped the lmdb parts. I think we can close this ticket and every machine should be automatically converted when playbooks will be ran next time.
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
infra/tickets#13035
No description provided.