I have a front web server using sendmail as an smtp outgoing server for "mydomain.com"
From this server we want to send mail to anyone and to "firstname.lastname@example.org"
which is located on another server (mail.mydomain.com) with full DNS MX entry.
Sendmail did this job perfectly till we recently rebooted the server.
Now sendmail does send correctly mail to anyone on internet but fails to send to "email@example.com
As a fact this Sendmail server will never receive any mail : it is just an outgoing mail server.
Sendmail file /etc/hosts is as follows :
127.0.0.1 MYSERVERNAME mydomain.com localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
if I try to look at sendmail configuration :
sendmail -d0.1 -bt < /dev/null
Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
TCPWRAPPERS USERDB USE_LDAP_INIT
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = mydomain
(canonical domain name) $j = mydomain.com
(subdomain name) $m = com
(node name) $k = MYSERVERNAME
If I delete "mydomain.com" in /etc/hosts while , the mail will be correctly sent to everywhere (including firstname.lastname@example.org
) but then the sender address comes with email@example.com
omain which is not acceptable.
Any idea of how I can use this server to send to anyone *and* to my true MX ?