Opened 5 months ago

Closed 5 months ago

#18871 closed enhancement (fixed)

Archive db

Reported by: Xi Ruoyao Owned by: Bruce Dubbs
Priority: normal Milestone: 12.1
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description (last modified by Xi Ruoyao)

Yet another deathware.

Like how we treat GTK-2 and Python-2, let's ignore the optional dependencies to db first. Then:

  • Bogofilter: Alleged to be "required" but actually can be replaced by sqlite3.
    • Switched the book configuration to use sqlite3.
  • cyrus-sasl: Recommended.
    • Switched the book to use LMDB instead
  • postfix: Recommended.
    • Switched the book to use LMDB instead

Change History (16)

comment:1 by Bruce Dubbs, 5 months ago

Seems like something we can do. Ever since Oracle took over db, we reverted to the most recent really open source version of db.

  • Bogofilter: add --with-database=sqlite3
  • cyrus-sasl: add --with-dblib=lmdb
  • postfix: I could not find any references to Berkeley DB in my postfix logs, but we already have several database options i the book. I recommend:
    CCARGS='-DNO_NIS -DHAS_SQLITE'
    AUXLIBS='-lsqlite3 -lpthread'
    

Of course all have to be tested.

comment:2 by Xi Ruoyao, 5 months ago

I've been running Bogofilter with sqlite3 for years.

comment:3 by Xi Ruoyao, 5 months ago

Description: modified (diff)

Bogofilter done.

comment:4 by Douglas R. Reno, 5 months ago

I can test SASL

In favor of removing this package. One less thing I have to worry about turning up when I update Java and check for references.

comment:5 by Douglas R. Reno, 5 months ago

Description: modified (diff)

I've converted cyrus-sasl to use LMDB instead of Berkeley DB at 7167f307742426ba2373645021eb8f10e6566b22

comment:6 by Bruce Dubbs, 5 months ago

Getting db out of postfix will not be easy. It looks fairly embedded without options to change. I could only find two files that included db.h:

src/util/mkmap_db.c:#include <db.h>
src/util/dict_db.c:#include <db.h>

I looked at mkmap_db.c. It's not a long file (172 lines) but I didn't see where db.h was needed.

dict_db.c is 880 lines but looks like it would need to be completely rewritten.

comment:7 by Xi Ruoyao, 5 months ago

https://www.postfix.org/DB_README.html#disable_db

But this seems disabling the "hash" file support which is referred by many online tutorials of postfix. Not sure if we should do it.

in reply to:  7 ; comment:8 by Xi Ruoyao, 5 months ago

Replying to Xi Ruoyao:

https://www.postfix.org/DB_README.html#disable_db

But this seems disabling the "hash" file support which is referred by many online tutorials of postfix. Not sure if we should do it.

We can tell the users to replace "hash" with "lmdb". I'll try if I can use lmdb instead of hash on my server (it's not running LFS though).

in reply to:  8 comment:9 by Xi Ruoyao, 5 months ago

Replying to Xi Ruoyao:

Replying to Xi Ruoyao:

https://www.postfix.org/DB_README.html#disable_db

But this seems disabling the "hash" file support which is referred by many online tutorials of postfix. Not sure if we should do it.

We can tell the users to replace "hash" with "lmdb". I'll try if I can use lmdb instead of hash on my server (it's not running LFS though).

On Ubuntu:

  1. apt install postfix-lmdb
  2. echo default_database_type = lmdb >> /etc/postfix/main.cf
  3. Use postmap command to regenerate all maps file again. Now the generated files are "xxx.lmdb" instead of "xxx.db".
  4. Change every hash: in main.cf to lmdb:
  5. Restart postfix

Then I sent a mail to my linuxfromscratch.org mailbox and it worked.

comment:10 by Bruce Dubbs, 5 months ago

Just checked rivendell:

# Location of SMTP auth credentials
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

# For sympa (shouldn't interfere with the above since it creates virtual domains)
# virtual(8) maps
virtual_mailbox_domains =
  hash:/etc/sympa/transport.sympa
virtual_mailbox_maps =
  hash:/etc/sympa/transport.sympa,
  hash:/etc/sympa/sympa_transport,
  hash:/etc/sympa/virtual.sympa
# virtual(5) maps
virtual_alias_maps =
  hash:/etc/sympa/virtual.sympa
# transport maps
transport_maps =
  hash:/etc/sympa/transport.sympa,
  hash:/etc/sympa/sympa_transport

I wonder it external programs access these files directly or through postfix. We are not going to experiment there though,

comment:12 by Xi Ruoyao, 5 months ago

I've switched postfix from db to lmdb at r12.0-722-g90066bfaf2. I tested the functionality of postmap, but I've not really set up a mail server. Waiting for someone else to test.

comment:13 by Xi Ruoyao, 5 months ago

Description: modified (diff)

comment:14 by Xi Ruoyao, 5 months ago

Summary: Archive db?Archive db

comment:15 by Bruce Dubbs, 5 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: newassigned

I plan on creating an ENTITY for this as an external dependency for packages that use it and then archiving the package.

comment:16 by Bruce Dubbs, 5 months ago

Resolution: fixed
Status: assignedclosed

Fixed at commit dcd5a06347.

Note: See TracTickets for help on using tickets.