Q0055 - Exim/exim GitHub Wiki
What does the error Failed to open wait-remote_smtp database: Invalid argument mean?
This is something that happens if you have existing DBM hints files when you install a new version of Exim that is compiled to use a different or upgraded DBM library. The simplest thing to try is
rm /var/spool/exim/db/*
This removes all the hints files. Exim will start afresh and build new ones. If the symptom recurs, it suggests there is some problem with your DBM library.