Mail delivery failed: returning message to sender for diradmin@

inomi13

Verified User
Joined
Jan 7, 2022
Messages
162
I want to send message to some user who has email address contact in domain gmail.com. Message was delivery failed. In exim log I see below information. What should do I to repair ?

By the way when I added new user, e-mail with welcome information is from admin e-mail but I don't know why /admin/passwords/ submit send from diradmin@

Screenshot 2023-12-18 at 22-00-06 cloudaldstudio.kylos.net.pl Change Passwords.png


2023-12-18 20:48:20 1rFJbA-00000006XuG-12KZ <= [email protected] U=diradmin P=local S=868 T="New message: test" from <[email protected]> for [email protected]
2023-12-18 20:48:20 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1rFJbA-00000006XuG-12KZ
2023-12-18 20:48:20 1rFJbA-00000006XuG-12KZ ** [email protected] F=<[email protected]> R=lookuphost T=remote_smtp H=gmail-smtp-in.l.google.com [74.125.131.26] X=TLS1.3:TLS_AES_256_GCM_SHA384:256 CV=yes: SMTP error from remote mail server after end of data: 550-5.7.26 This mail has been blocked because the sender is unauthenticated.\n550-5.7.26 Gmail requires all senders to authenticate with either SPF or DKIM.\n550-5.7.26\n550-5.7.26 Authentication results:\n550-5.7.26 DKIM = did not pass\n550-5.7.26 SPF [example.com] with ip: [XXX.XXX.XXX.XXX] = did\n550-5.7.26 not pass\n550-5.7.26\n550-5.7.26 For instructions on setting up authentication, go to\n550 5.7.26 https://support.google.com/mail/answer/81126#authentication j9-20020a056512344900b0050e40a6ba3asi178206lfr.82 - gsmtp
2023-12-18 20:48:20 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1rFJbA-00000006XuG-12KZ
2023-12-18 20:48:20 1rFJbA-00000006XuL-39Vh <= <> R=1rFJbA-00000006XuG-12KZ U=mail P=local S=3541 T="Mail delivery failed: returning message to sender" from <> for [email protected]
2023-12-18 20:48:20 1rFJbA-00000006XuG-12KZ Completed
2023-12-18 20:48:20 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1rFJbA-00000006XuL-39Vh
2023-12-18 20:48:20 1rFJbA-00000006XuL-39Vh => :blackhole: <[email protected]> R=system_aliases
 
Last edited:
You don't use real names. That [email protected] is that really like that or is it a hostname like [email protected]? Because that makes a whole of a lot difference.

If it's only [email protected] then change your admin e-mail.

And be sure to have SPF and DKIM enabled on that admin domain you will be using.
 
Obviously
It's not that obvious as it can also be [email protected] which is the reason one should always present a correct example.
It became only obvious after you editted your post (which I didn't see then yet). ;)

Anyway, those are system emails. You have to create a seperate DNS entry for your hostname, so that has it's own SPF and DKIM entry.

Use this manual for as much as you need it, you probably don't need everything.
 
If you create the hostname via DNS Administration (so NOT under an account) like I wrote in the manual, the SPF records will be created automatically and should be visible instantly in the DNS records of the hostname.
If you domain name already has a DKIM record then you can create the DKIM record for the hostname like this:
Code:
cd /usr/local/directadmin/scripts
./dkim_create.sh server.example.com

Be sure that your ip (both ipv4 and ipv6) has an rDNS/PTR record and once the ip resolves correctly to the hostname around the world, don't forget to create an ssl record for the hostname.
Code:
cd /usr/local/directadmin/scripts
./letsencrypt.sh request_single server.example.com 4096
 
Back
Top