Mail bounces for certain sender domains

Hello,

On a fresh install on Ubuntu 22.04 I have multiple domains setup each serving a different website and has its respective mail server. The control panel is also on a domain: cphestia@domain(dot)com

I am having issues with receiving mail from certain addresses (not all). Emails for certain domains are bouncing and the senders are receiving the following messages in their mailboxes:

For example say the the following address test@senderdomain(dot)com sends me an email to me@domain2(dot)com, if I run:

sudo exim4 -d -bvs

I get the following:

Exim version 4.95 uid=0 gid=0 pid=456037 D=f7715cfd
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc GnuTLS TLS_resume move_frozen_messages Content_Scanning DANE DKIM DNSSEC Event I18N OCSP PIPE_CONNECT PRDR PROXY Experimental_Queue_Ramp SOCKS SRS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql sqlite
Authenticators: cram_md5 cyrus_sasl dovecot external plaintext spa tls
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Malware: f-protd f-prot6d drweb fsecure sophie clamd avast sock cmdline
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Compiler: GCC [11.4.0]
Library version: Glibc: Compile: 2.35
                        Runtime: 2.35
Library version: BDB: Compile: Berkeley DB 5.3.28: (September  9, 2013)
                      Runtime: Berkeley DB 5.3.28: (September  9, 2013)
Library version: GnuTLS: Compile: 3.7.3
                         Runtime: 3.7.3
Library version: IDN2: Compile: 2.3.2
                       Runtime: 2.3.2
Library version: Stringprep: Compile: 1.38
                             Runtime: 1.38
Library version: Cyrus SASL: Compile: 2.1.27
                             Runtime: 2.1.27 [Cyrus SASL]
Library version: PCRE: Compile: 8.39
                       Runtime: 8.45 2021-06-15
Total 20 lookups
Library version: MySQL: Compile: 80035 8.0.35 [mysqld-8.0]
                        Runtime: 80036 8.0.36
Library version: SQLite: Compile: 3.37.2
                         Runtime: 3.37.2
WHITELIST_D_MACROS: "OUTGOING"
TRUSTED_CONFIG_LIST: "/etc/exim4/trusted_configs"
changed uid/gid: forcing real = effective
  uid=0 gid=0 pid=456037
  auxiliary group list: <none>
seeking password data for user "root": cache not available
getpwnam() succeeded uid=0 gid=0
seeking password data for user "Debian-exim": cache not available
getpwnam() succeeded uid=116 gid=122
configuration file is /var/lib/exim4/config.autogenerated
log selectors = 00000ffc 64205022 0000009c
trusted user
admin user
changed uid/gid: privilege not needed
  uid=116 gid=122 pid=456037
  auxiliary group list: 8 122
originator: uid=0 gid=0 login=root name=root
sender senderdomain = [email protected](dot)com
Verifying: uid=116 gid=122 euid=116 egid=122
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Verifying test@senderdomain(dot)com
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering test@senderdomain(dot)com
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing test@senderdomain(dot)com
--------> send_via_unauthenticated_smtp_relay router <--------
local_part=samb domain=senderdomain(dot)com
send_via_unauthenticated_smtp_relay router skipped: verify 1 0 0
--------> send_via_smtp_relay router <--------
local_part=samb domain=senderdomain(dot)com
send_via_smtp_relay router skipped: verify 1 0 0
--------> dnslookup router <--------
local_part=samb domain=senderdomain(dot)com
checking domains
search_open: dsearch "/etc/exim4/domains/"
search_find: file="/etc/exim4/domains/"
  key="senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
LRU list:
  5/etc/exim4/domains/
  End
internal_search_find: file="/etc/exim4/domains/"
  type=dsearch key="senderdomain(dot)com" opts=NULL
file lookup required for senderdomain(dot)com
  in /etc/exim4/domains/
creating new cache entry
lookup yielded: senderdomain(dot)com
senderdomain(dot)com in "dsearch;/etc/exim4/domains/"? yes (matched "dsearch;/etc/exim4/domains/")
data from lookup saved for cache for +local_domains: key 'senderdomain(dot)com' value 'senderdomain(dot)com'
senderdomain(dot)com in "!+local_domains"? no (matched "!+local_domains")
dnslookup router skipped: domains mismatch
--------> userforward router <--------
local_part=samb domain=senderdomain(dot)com
userforward router skipped: verify 1 0 0
--------> procmail router <--------
local_part=samb domain=senderdomain(dot)com
procmail router skipped: verify 1 0 0
--------> autoreplay router <--------
local_part=samb domain=senderdomain(dot)com
checking require_files
 search_open: dsearch "/etc/exim4/domains/"
   cached open
 search_find: file="/etc/exim4/domains/"
   key="senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
 LRU list:
   5/etc/exim4/domains/
   End
 internal_search_find: file="/etc/exim4/domains/"
   type=dsearch key="senderdomain(dot)com" opts=NULL
 cached data used for lookup of senderdomain(dot)com
   in /etc/exim4/domains/
 lookup yielded: senderdomain(dot)com
file check: /etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/autoreply.${local_part}.msg
expanded file: /etc/exim4/domains/senderdomain(dot)com/autoreply.samb.msg
stat() yielded -1
errno = 2
autoreplay router skipped: file check
--------> aliases router <--------
local_part=samb domain=senderdomain(dot)com
checking require_files
file check: /etc/exim4/domains/$domain/aliases
expanded file: /etc/exim4/domains/senderdomain(dot)com/aliases
stat() yielded 0
calling aliases router
rda_interpret (string): '${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}}}}'
   search_open: dsearch "/etc/exim4/domains/"
     cached open
   search_find: file="/etc/exim4/domains/"
     key="senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
   LRU list:
     5/etc/exim4/domains/
     End
   internal_search_find: file="/etc/exim4/domains/"
     type=dsearch key="senderdomain(dot)com" opts=NULL
   cached data used for lookup of senderdomain(dot)com
     in /etc/exim4/domains/
   lookup yielded: senderdomain(dot)com
  search_open: lsearch "/etc/exim4/domains/senderdomain(dot)com/aliases"
  search_find: file="/etc/exim4/domains/senderdomain(dot)com/aliases"
    key="test@senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
  LRU list:
    :/etc/exim4/domains/senderdomain(dot)com/aliases
    5/etc/exim4/domains/
    End
  internal_search_find: file="/etc/exim4/domains/senderdomain(dot)com/aliases"
    type=lsearch key="test@senderdomain(dot)com" opts=NULL
  file lookup required for test@senderdomain(dot)com
    in /etc/exim4/domains/senderdomain(dot)com/aliases
  creating new cache entry
  lookup failed
expanded: ''
file is not a filter file
parse_forward_list:
aliases router declined for test@senderdomain(dot)com
--------> localuser_fwd_only router <--------
local_part=samb domain=senderdomain(dot)com
checking "condition" "${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/e"...
   search_open: dsearch "/etc/exim4/domains/"
     cached open
   search_find: file="/etc/exim4/domains/"
     key="senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
   LRU list:
     5/etc/exim4/domains/
     :/etc/exim4/domains/senderdomain(dot)com/aliases
     End
   internal_search_find: file="/etc/exim4/domains/"
     type=dsearch key="senderdomain(dot)com" opts=NULL
   cached data used for lookup of senderdomain(dot)com
     in /etc/exim4/domains/
   lookup yielded: senderdomain(dot)com
  search_open: lsearch "/etc/exim4/domains/senderdomain(dot)com/fwd_only"
  search_find: file="/etc/exim4/domains/senderdomain(dot)com/fwd_only"
    key="samb" partial=-1 affix=NULL starflags=0 opts=NULL
  LRU list:
    :/etc/exim4/domains/senderdomain(dot)com/fwd_only
    5/etc/exim4/domains/
    :/etc/exim4/domains/senderdomain(dot)com/aliases
    End
  internal_search_find: file="/etc/exim4/domains/senderdomain(dot)com/fwd_only"
    type=lsearch key="samb" opts=NULL
  file lookup required for samb
    in /etc/exim4/domains/senderdomain(dot)com/fwd_only
  creating new cache entry
  lookup failed
localuser_fwd_only router skipped: condition failure
--------> localuser_spam router <--------
local_part=samb domain=senderdomain(dot)com
checking "condition" "${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_par"...
   search_open: dsearch "/etc/exim4/domains/"
     cached open
   search_find: file="/etc/exim4/domains/"
     key="senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
   LRU list:
     5/etc/exim4/domains/
     :/etc/exim4/domains/senderdomain(dot)com/fwd_only
     :/etc/exim4/domains/senderdomain(dot)com/aliases
     End
   internal_search_find: file="/etc/exim4/domains/"
     type=dsearch key="senderdomain(dot)com" opts=NULL
   cached data used for lookup of senderdomain(dot)com
     in /etc/exim4/domains/
   lookup yielded: senderdomain(dot)com
  search_open: lsearch "/etc/exim4/domains/senderdomain(dot)com/passwd"
  search_find: file="/etc/exim4/domains/senderdomain(dot)com/passwd"
    key="samb" partial=-1 affix=NULL starflags=0 opts=NULL
  LRU list:
    :/etc/exim4/domains/senderdomain(dot)com/passwd
    5/etc/exim4/domains/
    :/etc/exim4/domains/senderdomain(dot)com/fwd_only
    :/etc/exim4/domains/senderdomain(dot)com/aliases
    End
  internal_search_find: file="/etc/exim4/domains/senderdomain(dot)com/passwd"
    type=lsearch key="samb" opts=NULL
  file lookup required for samb
    in /etc/exim4/domains/senderdomain(dot)com/passwd
  creating new cache entry
  lookup failed
localuser_spam router skipped: condition failure
--------> localuser router <--------
local_part=samb domain=senderdomain(dot)com
checking "condition" "${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/ex"...
  search_open: dsearch "/etc/exim4/domains/"
    cached open
  search_find: file="/etc/exim4/domains/"
    key="senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
  LRU list:
    5/etc/exim4/domains/
    :/etc/exim4/domains/senderdomain(dot)com/passwd
    :/etc/exim4/domains/senderdomain(dot)com/fwd_only
    :/etc/exim4/domains/senderdomain(dot)com/aliases
    End
  internal_search_find: file="/etc/exim4/domains/"
    type=dsearch key="senderdomain(dot)com" opts=NULL
  cached data used for lookup of senderdomain(dot)com
    in /etc/exim4/domains/
  lookup yielded: senderdomain(dot)com
 search_open: lsearch "/etc/exim4/domains/senderdomain(dot)com/passwd"
   cached open
 search_find: file="/etc/exim4/domains/senderdomain(dot)com/passwd"
   key="samb" partial=-1 affix=NULL starflags=0 opts=NULL
 LRU list:
   :/etc/exim4/domains/senderdomain(dot)com/passwd
   5/etc/exim4/domains/
   :/etc/exim4/domains/senderdomain(dot)com/fwd_only
   :/etc/exim4/domains/senderdomain(dot)com/aliases
   End
 internal_search_find: file="/etc/exim4/domains/senderdomain(dot)com/passwd"
   type=lsearch key="samb" opts=NULL
 cached data used for lookup of samb
   in /etc/exim4/domains/senderdomain(dot)com/passwd
 lookup failed
localuser router skipped: condition failure
--------> catchall router <--------
local_part=samb domain=senderdomain(dot)com
checking require_files
file check: /etc/exim4/domains/$domain/aliases
expanded file: /etc/exim4/domains/senderdomain(dot)com/aliases
stat() yielded 0
checking "condition" "${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch"...
  search_open: dsearch "/etc/exim4/domains/"
    cached open
  search_find: file="/etc/exim4/domains/"
    key="senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
  LRU list:
    5/etc/exim4/domains/
    :/etc/exim4/domains/senderdomain(dot)com/passwd
    :/etc/exim4/domains/senderdomain(dot)com/fwd_only
    :/etc/exim4/domains/senderdomain(dot)com/aliases
    End
  internal_search_find: file="/etc/exim4/domains/"
    type=dsearch key="senderdomain(dot)com" opts=NULL
  cached data used for lookup of senderdomain(dot)com
    in /etc/exim4/domains/
  lookup yielded: senderdomain(dot)com
 search_open: lsearch "/etc/exim4/domains/senderdomain(dot)com/aliases"
   cached open
 search_find: file="/etc/exim4/domains/senderdomain(dot)com/aliases"
   key="test@senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
 LRU list:
   :/etc/exim4/domains/senderdomain(dot)com/aliases
   5/etc/exim4/domains/
   :/etc/exim4/domains/senderdomain(dot)com/passwd
   :/etc/exim4/domains/senderdomain(dot)com/fwd_only
   End
 internal_search_find: file="/etc/exim4/domains/senderdomain(dot)com/aliases"
   type=lsearch key="test@senderdomain(dot)com" opts=NULL
 cached data used for lookup of test@senderdomain(dot)com
   in /etc/exim4/domains/senderdomain(dot)com/aliases
 lookup failed
calling catchall router
rda_interpret (string): '${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}}}}'
   search_open: dsearch "/etc/exim4/domains/"
     cached open
   search_find: file="/etc/exim4/domains/"
     key="senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
   LRU list:
     5/etc/exim4/domains/
     :/etc/exim4/domains/senderdomain(dot)com/aliases
     :/etc/exim4/domains/senderdomain(dot)com/passwd
     :/etc/exim4/domains/senderdomain(dot)com/fwd_only
     End
   internal_search_find: file="/etc/exim4/domains/"
     type=dsearch key="senderdomain(dot)com" opts=NULL
   cached data used for lookup of senderdomain(dot)com
     in /etc/exim4/domains/
   lookup yielded: senderdomain(dot)com
  search_open: lsearch "/etc/exim4/domains/senderdomain(dot)com/aliases"
    cached open
  search_find: file="/etc/exim4/domains/senderdomain(dot)com/aliases"
    key="*@senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
  LRU list:
    :/etc/exim4/domains/senderdomain(dot)com/aliases
    5/etc/exim4/domains/
    :/etc/exim4/domains/senderdomain(dot)com/passwd
    :/etc/exim4/domains/senderdomain(dot)com/fwd_only
    End
  internal_search_find: file="/etc/exim4/domains/senderdomain(dot)com/aliases"
    type=lsearch key="*@senderdomain(dot)com" opts=NULL
  file lookup required for *@senderdomain(dot)com
    in /etc/exim4/domains/senderdomain(dot)com/aliases
  creating new cache entry
  lookup failed
expanded: ''
file is not a filter file
parse_forward_list:
catchall router declined for test@senderdomain(dot)com
--------> terminate_alias router <--------
local_part=samb domain=senderdomain(dot)com
checking "condition" "${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch"...
  search_open: dsearch "/etc/exim4/domains/"
    cached open
  search_find: file="/etc/exim4/domains/"
    key="senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
  LRU list:
    5/etc/exim4/domains/
    :/etc/exim4/domains/senderdomain(dot)com/aliases
    :/etc/exim4/domains/senderdomain(dot)com/passwd
    :/etc/exim4/domains/senderdomain(dot)com/fwd_only
    End
  internal_search_find: file="/etc/exim4/domains/"
    type=dsearch key="senderdomain(dot)com" opts=NULL
  cached data used for lookup of senderdomain(dot)com
    in /etc/exim4/domains/
  lookup yielded: senderdomain(dot)com
 search_open: lsearch "/etc/exim4/domains/senderdomain(dot)com/aliases"
   cached open
 search_find: file="/etc/exim4/domains/senderdomain(dot)com/aliases"
   key="test@senderdomain(dot)com" partial=-1 affix=NULL starflags=0 opts=NULL
 LRU list:
   :/etc/exim4/domains/senderdomain(dot)com/aliases
   5/etc/exim4/domains/
   :/etc/exim4/domains/senderdomain(dot)com/passwd
   :/etc/exim4/domains/senderdomain(dot)com/fwd_only
   End
 internal_search_find: file="/etc/exim4/domains/senderdomain(dot)com/aliases"
   type=lsearch key="test@senderdomain(dot)com" opts=NULL
 cached data used for lookup of test@senderdomain(dot)com
   in /etc/exim4/domains/senderdomain(dot)com/aliases
 lookup failed
terminate_alias router skipped: condition failure
no more routers
test@senderdomain(dot)com failed to verify: Unrouteable senderdomain
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=456037 (fresh-exec) terminating with rc=2 >>>>>>>>>>>>>>>>

The weird thing is that I can normally receive emails on that same address from gmail and other domains.
I’ve been read many posts on similar topics but none of them were the same case (but I tried their solutions anyway).

I would appreciate any input on the issue.

PS: if there’s any additional info/logs that would provide more insight please let me know to update the post.

Thank you

I’ve read almost every post and documentation related to my issue, but I still can’t find a solution :sob:

I’m counting on you (hestians), to figure it out, and I’ll be very thankful.

Estás utilizando un smtp relay?

Are you using an SMTP relay?

No.
I’m using Cloudflare and have setup all the records correctly (dns only for mail records).

What is really strange is that exim is bouncing certain senders, while allowing others(all mail from gmail goes through)

What is the domain?

webspot.me

That’s because I have multiple domains on the same server. But this is not the issue, since the email are being bounced from my server.

I’m 99% sure it has to do with Exim4 but I can’t figure it out.

Is there a way to stop all verifications in Exim4? So that I can make sure it’s the cause.

¿Estás utilizando Cloudflare como proveedor de dominio? ¿O simplemente como intermediario?

Are you using cloudflare as a domain provider? or just as an intermediary?

tail -f -s0.1 /var/log/exim4/mainlog

And when a mail bounces share that part of the logs …