Bug 53456 - /etc/mail/Makefile builds userdb.db in bad format on sendmail 8.11.6
/etc/mail/Makefile builds userdb.db in bad format on sendmail 8.11.6
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: sendmail (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Florian La Roche
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-09 14:53 EDT by paluch
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-09-09 14:53:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description paluch 2001-09-09 14:53:54 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.8 i686)

Description of problem:
Starting from sendmail-8.11.6-1.6.x.i386.rpm (RedHat 6.2 update of
sendmail) the
/etc/mail/userdb.db is build incorrectly.

Makefile runs:
  makemap -f hash userdb.db < userdb

but this produces errors in /var/log/maillog:
Sep  9 19:19:05 moon sendmail[4890]: f89H7p802698:
db_open(/etc/mail/userdb.db):
 Invalid argument
Sep  9 19:19:05 moon sendmail[4890]: f89H7p802698: deferred: udbexpand:
Invalid 
argument



Version-Release number of selected component (if applicable):
sendmail-8.11.6-1.6.x.i386.rpm, RedHat 6.2/i386

How reproducible:
Always

Steps to Reproduce:
1. create /etc/mail/userdb
2. add some entry to /etc/mail/userdb
3. cd /etc/mail
4. make userdb.db      # only make does not work (all: target);
5. /etc/rc.d/init.d/sendmail start
6. Watch /var/log/mailllog

Actual Results:  /var/log/maillog:
Sep  9 19:19:05 moon sendmail[4890]: f89H7p802698:
db_open(/etc/mail/userdb.db):
 Invalid argument
Sep  9 19:19:05 moon sendmail[4890]: f89H7p802698: deferred: udbexpand:
Invalid 
argument


Expected Results:  userdb.db should be working as in old sendmail 8.9.x in
RedHat 6.2...

Additional info:

This is because bad format of userdb.db file: According to README.cf btree
should be used instead of hash:
README.cf:
....
  makemap btree /etc/mail/userdb < /etc/mail/userdb.txt
....

Note that there may not be '-f' option otherwise sendmail is unable to map
any entry in userdb.
So /etc/mail/Makefile should be corrected to:

userdb.db : userdb
        @makemap btree $@ < $<

Also userdb.db should be added as a "weak target" to the above Makefile:

POSSIBLE += $(shell test -f userdb && echo userdb.db)


Note: I did not test sendmail on RedHat 7.x  - it could behave differently
(sendmail uses new db3 on RedHat 7.x - I guess).
Comment 1 Florian La Roche 2001-09-17 06:41:50 EDT
this is fixed in 8.11.6-4 or newer

Thanks for this bug-report,

Florian La Roche

Note You need to log in before you can comment on or make changes to this bug.