0

I am using the following setup.

The client's DNS is pointing to Hostgator, but the client wants to test if his site runs faster on DigitalOcean. So the only DNS records I am pointing to DigitalOcean are:

site.com          A         xxx.xxx.xxx.xxx
www.site.com      CNAME     site.com
site.com          AAAA      abcd:abcd::::::0001 (example ip6)

The rest of the DNS records are pointed to the hostgator server.

I configured sendmail for mail sending from the site and everything works fine, until the destination address is ...@site.com.

I am pretty sure it's considering the delivery as a local delivery and it's never sent outside of the server.

Here's my sendmail.mc file just the parts I've modified:

...
FEATURE(`no_default_msa')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
dnl DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl
dnl DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
...
...
MAILER_DEFINITIONS   -- I haven't touched these three lines
MAILER(`local')dnl
MAILER(`smtp')dnl


dnl define(`MAIL_HUB', `site.com.')dnl  
dnl define(`LOCAL_RELAY', `site.com.')dnl

LOCAL_RULESETS
LOCAL_RULE_0

define(`confDONT_PROBE_INTERFACES', `true')dnl

R$* < @site.com. > $*   $#esmtp $@ mail.site.com $: $1<@site.com.>$2

My local-host-names was originally:

site.com
localhost

Changed it to:

localhost

Also, my /etc/hosts file has this line:

127.0.0.1 site.com {servername} localhost.localdomain localhost

In this case {servername} is my server's local name.

Relevant mail.log entries:

Mar 23 01:36:13 servername sendmail[15492]: 02N1aD4f015492: from=www-data, size=5902, class=0, nrcpts=2, msgid=<9c87adbbbcf9915930b16972d7b17b7e@site.com>, relay=www-data@localhost
Mar 23 01:36:13 servername sm-mta[15493]: 02N1aDOf015493: <receiver@site.com>... User unknown

I think this log entry basically describes the situation. The user unknown part. The rest of the log entries are fine, this is the one that fails where the domain is @site.com.

I followed these tutorials, but it seems it's still not working:

  1. https://tecadmin.net/install-sendmail-on-ubuntu/
  2. http://biostall.com/how-i-resolved-my-ubuntu-sendmail-woes/

What should I modify in sendmail's config in order to indicate that the reception of e-mails is not done on that server?

  • Could you post the relevant entries in the log file? Your description leaves far too many open possibillities. – AnFi Mar 25 '20 at 20:58
  • Hello @AnFi I added parts of `sendmail.mc` and `local-host-names`. – Mihail Minkov Mar 25 '20 at 22:56
  • I also added `etc/hosts`. – Mihail Minkov Mar 25 '20 at 23:09
  • I have asked for (system) **log entries** generated by the failed deliveries. Sorry but I am used to "misleading descriptions" and "big differences in terminology". – AnFi Mar 25 '20 at 23:19
  • Hello again @AnFi sorry I misread your comment. I opened `/var/log/mail.log` and I updated my question with the entries I considered relevant to this case. – Mihail Minkov Mar 26 '20 at 20:33
  • Could you also post results produced by `echo $j | sendmail -bt` (this host email name) and `echo $=w | sendmail -bt` (list of local email domains) and content of `/etc/mail/local-host-names` ("manual" list of local email domains) – AnFi Mar 27 '20 at 19:35

0 Answers0