On Wed, Aug 03, 2016 at 10:26:57AM +0200, Mauro Salvini wrote: > > > > If uname() returns a single-component name, Exim calls gethostbyname() > > > > (or getipnodebyname() where available) in an attempt to acquire a > > > > fully qualified host name. > > > > > > > > Can you check what your gethostbyname/getipnodebyname returns? > > > > > hostname by uname(): myhostname > > > hostname by gethostbyname(): myhostname.mydomain.local > > > > Hm. > > > > What does hostname --fqdn say? > > It says myhostname.mydomain.local
Good. > > What does exim -bP | grep ^primary_hostname say? > > It says myhostname not good. > Checked /var/lib/exim4/config.autogenerated for primary_hostname: > > .ifdef MAIN_HARDCODE_PRIMARY_HOSTNAME > primary_hostname = MAIN_HARDCODE_PRIMARY_HOSTNAME > .endif > > MAIN_HARDCODE_PRIMARY_HOSTNAME never defined So primary_hostname is set according to the docs (/usr/share/doc/exim4-base/spec.txt.gz): $primary_hostname This variable contains the value set by primary_hostname in the configuration file, or read by the uname() function. If uname() returns a single-component name, Exim calls gethostbyname() (or getipnodebyname() where available) in an attempt to acquire a fully qualified host name. See also $smtp_active_hostname. The last sentence doesn't apply here. And we see that your gethostbyname returns the host name just fine. What does getent hosts $IP for all your IP addresses say? > > and 192.168.0.10 is your local IP address on the network? > > No , I obfuscate it, sorry. It actually is 10.0.xx.xx Same thing, a RFC 1918 address that is unlikely to have correct reverse DNS. > > Is your "myhostname.mydomain.local" the literal host name? If so, are > > you actually using the .local TLD or is that just obfuscated? Please > > consider using a different TLD as .local may cause interference with > > avahi (the .local TLD is reserved for use with mDNS). > > Yes, domain ends with .local (this name comes from IT&C office > configuration). > > Just for a try, I changed /etc/hosts and /etc/mailname to have a .net > TLD: > - exim -bP | grep ^primary_hostname says > myhostname Bad. > - exim -bt -d+all username says > 10:13:17 5455 local_part=username domain=myhostname.mydomain.net > 10:13:17 5455 checking domains > 10:13:17 5455 myhostname.mydomain.net in "@:localhost"? no (end of > list) Looks better, but why? Strangely, the process of qualifying the address is not in the debug output, first thing I see of the username is its already qualified form. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421