DirectAdmin emails can't be sent

ASghostKI

Verified User
Joined
Oct 30, 2020
Messages
30
Hello,

I'm having some trouble with DirectAdmin, it can't send emails (like the welcome email)
When I go to a user details and I hit the "Resend Welcome Email" action, I get this error

An error occurred while sending the mail
Permissions on /etc/alternatives/sendmail are -rwxr-xr-x. /usr/sbin/exim needs 4755.

Please note that exim can already send email without problem using the admin user
(I already configured it to use an external smtp server and it's working correctly)

If anyone can help me with that I would be thankful.


Here is the ls -l of those files

Code:
admin@DA:~$ id
uid=1004(admin) gid=1005(admin) groups=1005(admin),8(mail)
admin@DA:~$ ls -l /etc/alternatives/sendmail
lrwxrwxrwx 1 root root 24 Oct 11 03:31 /etc/alternatives/sendmail -> /usr/lib/sm.bin/sendmail
admin@DA:~$ ls -l /usr/lib/sm.bin/sendmail
-rwxr-xr-x 1 root smmsp 860672 Aug 25  2019 /usr/lib/sm.bin/sendmail
admin@DA:~$ ls -l /usr/sbin/exim
-rwxr-xr-x 1 mail mail 1601328 Oct  8 23:27 /usr/sbin/exim
 
Last edited:
Which distro is this? Because I've looked in 2 Centos 7 and 1 Centos 8 server and there is no sendmail in /etc/alternatives on our servers.
 
I already have some problem with the hostname being reset to something else (GCP can't change instance hostname) I think this might be a part of the problem
Anyway I'll try to start from scratch and retry and get back to you with the results.

Thanks for trying to help guys.

it's Debian btw.
 
Thank you guys for trying to help, yes that was the problem, now DirectAdmin panel can send email correctly.

But I have another problem:

let's say my hostname is serv.domain.com
and an email has to be sent to [email protected]
(serv.domain.com has an MX records pointing to my external email service, I'm using Zoho mail here)

Exim here send that email only locally, I have roundcube installed and I can see the email has been received
here is the exim log:
2020-11-01 21:06:59 1kZKYe-0000qx-J0 => admin <[email protected]> F=<[email protected]> R=localuser T=local_delivery S=484
2020-11-01 21:06:59 1kZKYe-0000qx-J0 Completed

What I need is to configure Exim to treat emails like *@serv.domain.com like any other email aka (as I assume) diable local delivery
 
Normally, only some systems send mail to the hostname. You should not use that email address in a normal way.

What you would like is mostly fixed by:
1.) Change admin email address
2.) Install the latest versions of both Exim and exim.conf
3.) change /etc/aliases
#root:
to
root: [email protected]
4.) Next to having the MX pointing to your external mailserver, also make user that on the MX page the local mailserver is UNchecked.
 
Back
Top