I experienced this with CPanel's Exim after an auto-update (a Google of this error produces lots of complaints with few clear solutions). In this case I'll put the solution at the top.
Run /scripts/buildeximconf to rebuild the Exim config and it should be fine after that.
mail -vs "from test" user@dest.com < .bash_history
LOG: MAIN
cwd=/root 4 args: send-mail -i -v user@dest.com
LOG: MAIN
<= root@box.host U=root P=local S=12289 T="from box.host"
LOG: MAIN
cwd=/var/spool/exim 4 args: /usr/sbin/exim -v -Mc 1SJs73-0007QP-Ai
delivering 1SJs73-0007QP-Ai
LOG: MAIN PANIC
failed to expand condition "${if eq {$authenticated_id}{}{0}{${if eq {$sender_address}{$local_part@$domain}{0}{${if match{$received_protocol}{\N^e?smtps?a$\N}{${perl{checkbx_autowhitelist}{$authenticated_id}}}{${if eq{$received_protocol}{local}{${perl{checkbx_autowhitelist}{$sender_ident}}}{0}}}}}}}}" for boxtrapper_autowhitelist router: Undefined subroutine &main::checkbx_autowhitelist called.
LOG: MAIN PANIC
failed to expand condition "${perl{check_mail_permissions}}" for check_mail_permissions router: Undefined subroutine &main::check_mail_permissions called.
LOG: MAIN PANIC
failed to expand condition "${perl{enforce_mail_permissions}}" for enforce_mail_permissions router: Undefined subroutine &main::enforce_mail_permissions called.
LOG: MAIN PANIC
failed to expand condition "${perl{increment_max_emails_per_hour_if_needed}}" for increment_max_emails_per_hour_if_needed router: Undefined subroutine &main::increment_max_emails_per_hour_if_needed called.
LOG: MAIN PANIC
== user@dest.com R=lookuphost T=remote_smtp defer (-1): failed to expand "interface" option for remote_smtp transport: Undefined subroutine &main::get_sender_from_uid called.\n
Solution:
/scripts/buildeximconf
expand, eq, authenticated_id, sender_address, local_part, domain, received_protocol, smtps, perl, checkbx_autowhitelist, received_proti, cpanel, exim, auto, update, google, produces, complaints, solutions, ll, scripts, buildeximconf, rebuild, config, vs, quot, user, dest, bash_history, cwd, args, var, spool, usr, sbin, mc, sjs, qp, ai, delivering, sender_ident, boxtrapper_autowhitelist, router, undefined, subroutine, check_mail_permissions, enforce_mail_permissions, increment_max_emails_per_hour_if_needed, lookuphost, remote_smtp, defer, interface, get_sender_from_uid,