sendmail.cf: How can I read a .db file and search for a token?

Hello,

I need to write code in '/etc/mail/sendmail.cf' to verify that a string exists within a hash file ( Such as /etc/mail/key-value.db ). I've searched the web and did find many great articles regarding 'sendmail.cf' however I'm not clear how I can do this specific thing as the online sources are sketchy on this topic.

I would really appreciate any feedback you can suggest or if you have links that would be great too.

Thank You,
Devyn