Rebuilding cdb files

From QmailToaster
Revision as of 10:55, 16 March 2024 by Ebroch (talk | contribs) (Created page with "===Rebuilding cdb files=== I cannot seem to remember the commands to rebuild the cdbs, so I bashed one up to do it for me, automagically...put it in /etc/cron.hourly...this way all your cdbs are never more than an hour old. #!/bin/bash #rebuilds simcontrol.cdb /var/qmail/bin/simscanmk sleep 2 #rebuilds simversions.cdb /var/qmail/bin/simscanmk -g sleep 2 #rebuilds badloadertypes--rare-ok to comment out /var/qmail/bin/qmail-badloadertypes sleep 2 #rebuilds badm...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Rebuilding cdb files

I cannot seem to remember the commands to rebuild the cdbs, so I bashed one up to do it for me, automagically...put it in /etc/cron.hourly...this way all your cdbs are never more than an hour old.

#!/bin/bash
#rebuilds simcontrol.cdb
/var/qmail/bin/simscanmk
sleep 2
#rebuilds simversions.cdb
/var/qmail/bin/simscanmk -g
sleep 2
#rebuilds badloadertypes--rare-ok to comment out
/var/qmail/bin/qmail-badloadertypes
sleep 2
#rebuilds badmimetypes--rare-ok to comment out
/var/qmail/bin/qmail-badmimetypes
sleep 2
#rebuilds tcp.smtp and reloads new configs
qmailctl cdb
#eof

WORKSFORME. (don't forget to chmod +x the file you save that as, like I did)


Note, as of QmailToaster v1.3,

# qmailctl cdb

does it all, so there's no more need for this.

User Tips & Tricks