I have Exim installed on two Raspberry Pis primarily to email any exceptional output from cron jobs performing their monitoring tasks. One is an old installation running exim 4.84.2-2+deb8u6 which is working fine and the other is a freshly installed NOOBS with exim 4.92-8+deb10u3.
The /etc/exim4/update-exim4.conf.conf files are identical (configured for a smarthost) and both have the same /etc/mailname. /etc/email-addresses are both empty (comments only). The /etc/hosts files are identical with the exception of the basic hostname (e.g. raspberrypi1 and raspberrypi2). Neither has a fully qualified domain name. The same user is set up on both systems. "exim -bt username" produces identical output, showing the local username qualified with the content of /etc/mailname. "exim -bP" shows "qualify_domain" is set correctly to "mydomain.com".
On the older, working system, mail from a local user to an external address is given the qualified name of
username@mydomain.com where mydomain.com is in /etc/mailname. In the newer, non-working case, the local user is not qualified with the domain name, so the sender is username@raspberrypi2 instead and consequently mail is rejected by the smarthost because it fails sender verification. Using the mail command with "-aFrom:username@mydomain.com" works, so the problem is just that the local user is not getting the proper email address.
What am I missing or where else should I be looking for a difference between the configurations? Thanks in advance.