Description of Problem: Symptom: Reboot or "service sendmail restart" (i.e., execution of "/etc/rc.d/init.d/sendmail start") do not update the indexes for the databases in /etc/mail although it appears that the intention was to do so. Diagnosis: File /etc/rc.d/init.d/sendmail's function "start" attempts to update the indexes of databases under /etc/mail with command: make -C /etc/mail -q The "make" command has no effect because the "-q" instructs make to do nothing except issue a special exit status if any targets are out of date. I suspect that the "-q" was added in the mistaken belief that it would simply suppress make's message output (as in "quiet"). To "make", "-q" stands for "question" -- not "quiet". Suggested solution: Use "-s" for "silent". Change the relevant line to be: make -C /etc/mail -s Version-Release number of selected component (if applicable): Redhat 7.1 with updated sendmail-8.11.6-2.7.1 or Redhat 7.2 with sendmail-8.11.6-3 How Reproducible: Always Steps to Reproduce: 1. touch /etc/mail/virtusertable 2. service sendmail restart 3. Observe that virtusertable.db has not been updated: ls -lt /etc/mail/virtusertable* but should have been.
*blush* big problem and thanks to your detailed report. This will be fixed in 8.11.6-5 or newer and I will provide new errata rpms for older releases. Thanks, Florian La Roche
I think the proposed fix is incorrect. The fix rebuilds the db files whether they need it or not. That was based on the assumption was that the '-q' option was mistakenly assumed to be the same as '--quiet'. I don't believe that. I think it was supposed to mean just what says: "return an exit status that is zero if the specified targets are already up to date, nonzero otherwise." I believe that the error is in not checking the status. The following code checks the status and rebuilds only if needed: if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then make -C /etc/mail -q updatedb=$? if [ $updatedb -gt 0 ]; then for i in virtusertable access domaintable mailertable ; do if [ -f /etc/mail/$i ] ; then makemap hash /etc/mail/$i < /etc/mail/$i fi done fi fi
[Note: I'm the original reporter. I've retired dale due to spam.] > I think the proposed fix is incorrect. The fix rebuilds the db files whether > they need it or not Under RH 7.3 (with all errata), the original fix does not rebuild db files unless they need it. I just tried it. Also, from inspection of the makefile %.db : % @makemap hash $@ < $< it would seem that it does the right thing; that is, invoking makemap only if the .db is older than the file upon which it depends. Is it conceivable you are seeing a different problem? Did this issue arise under the limbo beta or something, in which case maybe there's something causing this behavior? Please take another look at this, as the alternate fix you most recently proposed: 1. rebuilds all databases, even if only one needs rebuilding 2. does not rebuild the "possible" databases, as does the Makefile. (I don't know how significant this is, but it seems significant to me).