Bug 53456 - /etc/mail/Makefile builds userdb.db in bad format on sendmail 8.11.6
Summary: /etc/mail/Makefile builds userdb.db in bad format on sendmail 8.11.6
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sendmail
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Florian La Roche
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-09 18:53 UTC by paluch
Modified: 2007-04-18 16:36 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2001-09-09 18:53:58 UTC


Attachments (Terms of Use)

Description paluch 2001-09-09 18:53:54 UTC
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 10:41:50 UTC
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.