Server isnt sending any emails at all?

Jordz2203

Verified User
Joined
Sep 8, 2022
Messages
74
Hi guys,
So I am trying to figure out why our server isnt sending any emails. We recently configured it but it seems its not sending any, whatsoever.
I have checked and port 25 is open
1663674409603.png

The hostname is za1.ccstudio.co.za if someone wants to try ping.

Its weird because we recently pointed some clients A records for their site hosting here.
Their websites arent sending any emails (not even landing in spam)
Then as well as this, the actual servers notifications arent being sent? Its really odd to me and I cant seem to diagnose the issue. Whether its a server level email notification or clients websites they arent sending at all or going to spam.
 
UPDATE: After disabling
# require verify = sender
In exim.conf I now get a generic error from within mainlog in exim, but nothing in rejectlog?

2022-09-20 14:37:55 cwd=/home/thedomaincom/domains/thedomain.com/public_html 5 args: /usr/sbin/sendmail -t -i -f [email protected] 2022-09-20 14:37:55 1oacVf-0007Nu-29 <= [email protected] U=thedomaincom P=local S=3205 [email protected] T="New submission from Diagnostics Form" from <[email protected]> for [email protected] 2022-09-20 14:37:55 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1oacVf-0007Nu-29 2022-09-20 14:37:55 1oacVf-0007Nu-29 ** [email protected] F=<[email protected]> R=virtual_aliases: 2022-09-20 14:37:55 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1oacVf-0007Nu-29 2022-09-20 14:37:55 1oacVf-0007O2-2C <= <> R=1oacVf-0007Nu-29 U=mail P=local S=4492 T="Mail delivery failed: returning message to sender" from <> for [email protected] 2022-09-20 14:37:55 1oacVf-0007Nu-29 Completed 2022-09-20 14:37:55 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1oacVf-0007O2-2C 2022-09-20 14:37:55 1oacVf-0007O2-2C => thedomaincom <[email protected]> F=<> R=localuser T=local_delivery S=4597 2022-09-20 14:37:55 1oacVf-0007O2-2C Completed
 
Incorrect authentication data (set_id=[email protected])
So this is username/password error, mostly password error.
You shouldn't disable the require verify in exim.conf.

In the last logpiece it seems as if things are send, but delivery failed for some reason.
It's hard to say like this because the domain name is masked.

1.) Are mails from other domains being send without issues?
2.) Try visiting https://www.mail-tester.com/ and use this to send a test mail and see what happens and what the results are.
 
So this is username/password error, mostly password error.
You shouldn't disable the require verify in exim.conf.

In the last logpiece it seems as if things are send, but delivery failed for some reason.
It's hard to say like this because the domain name is masked.

1.) Are mails from other domains being send without issues?
2.) Try visiting https://www.mail-tester.com/ and use this to send a test mail and see what happens and what the results are.
Hi, sorry will unmask it.
When I go into DNS Management and uncheck this the error changes. Bear in mind we are only pointing A records at this server not ns or mx.

I disabled the require verify because sometimes the mailbox doesnt exist, for example if site@thedomin doesnt exist as a mailbox I still want it to send.

Other domains are not sending emails either.

But we can receive if ns records are pointed.


1663679220968.png

Unchecked "Use this server to handle my e-mails. If not, change the MX records and uncheck this option."

Now the error is
2022-09-20 15:04:28 cwd=/home/sparesboyzcom/domains/sparesboyz.com/public_html 5 args: /usr/sbin/sendmail -t -i -f [email protected] 2022-09-20 15:04:28 1oacvM-0000dk-1x <= [email protected] U=sparesboyzcom P=local S=3195 [email protected] T="New submission from Diagnostics Form" from <[email protected]> for [email protected] 2022-09-20 15:04:28 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1oacvM-0000dk-1x 2022-09-20 15:04:28 1oacvM-0000dk-1x ** [email protected] F=<[email protected]> R=virtual_aliases: 2022-09-20 15:04:28 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1oacvM-0000dk-1x 2022-09-20 15:04:28 1oacvM-0000ds-20 <= <> R=1oacvM-0000dk-1x U=mail P=local S=4482 T="Mail delivery failed: returning message to sender" from <> for [email protected] 2022-09-20 15:04:28 1oacvM-0000dk-1x Completed 2022-09-20 15:04:28 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1oacvM-0000ds-20 2022-09-20 15:04:28 1oacvM-0000ds-20 ** [email protected] F=<> R=lookuphost T=remote_smtp H=proton.xtrahosting.co.za [154.70.137.21] X=TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=yes: SMTP error from remote mail server after RCPT TO:<[email protected]>: 550 No Such User Here" 2022-09-20 15:04:28 1oacvM-0000ds-20 Frozen (delivery error message)
 
So this is username/password error, mostly password error.
You shouldn't disable the require verify in exim.conf.

In the last logpiece it seems as if things are send, but delivery failed for some reason.
It's hard to say like this because the domain name is masked.

1.) Are mails from other domains being send without issues?
2.) Try visiting https://www.mail-tester.com/ and use this to send a test mail and see what happens and what the results are.
One thing I also noticed is [email protected] the username is the hosting accounts username--
 
@Richard G - Going to make a new thread with some more concise info
I would use SMTP (with authentication, DKIM etc.) instead of sendmail, it will help with deliverability as well.

Just create an email-account in Directadmin and use those settings (email, password, mail.domain.com, SSL, port 465) to send. If you're running a Wordpress website, you can install an SMTP-plugin and insert your credentials there.
 
Unchecked "Use this server to handle my e-mails. If not, change the MX records and uncheck this option."

Bear in mind we are only pointing A records at this server not ns or mx.
Both these things can take care that you can't send mail via your server. So if you want to send mail from this server, why not use an MX address?

As @wtptrs said, if you want to use another server to send mail from, use that servers SMTP settings.

the username is the hosting accounts username
That's normal. The username is also always the system account. Which can also send e-mail. But you can always create a new mail account. However, you have to point out to the correct A and MX addresses for the server which does send and receive mail for the domain.

Going to make a new thread with some more concise info
No need for that. Info is all here. A new thread would be doubleposting, better keep it in here.
 
Both these things can take care that you can't send mail via your server. So if you want to send mail from this server, why not use an MX address?

As @wtptrs said, if you want to use another server to send mail from, use that servers SMTP settings.


That's normal. The username is also always the system account. Which can also send e-mail. But you can always create a new mail account. However, you have to point out to the correct A and MX addresses for the server which does send and receive mail for the domain.


No need for that. Info is all here. A new thread would be doubleposting, better keep it in here.
Okay cool :) We cant use the MX records as they are already in use elsewhere. We develop websites for the clients and host them, not their emails, etc.

I think Ive pinpointed the issue as having a low spam score. Here is the test link https://www.mail-tester.com/test-en7ua4tzl&reloaded=1

I also made a test on an account still on our old server with KonsoleH (Hetzner) https://www.mail-tester.com/test-9pj466857 I noticed here that there is no bounce address in the headers compared to our new DA server. As well it indicates that its not a PHP scripted mail? Even though the exact same plugin sent the mail as the other site.

But I think it may be important to note that currently we are with Hetzner and use KonsoleH as a hosting panel. Using that email tester you send, it scores a 5/10. The DNS settings pointing at the server are an SPF record and the @ & www A records. Considering that the emails are still showing as being sent from [email protected] not the DirectAdmin account of [email protected]
Considering that info after we moved the site to our new DirectAdmin server, the email gets indicated as from [email protected] with the bounce address being [email protected]. Why is there a bounce address here?
 
I think Ive pinpointed the issue as having a low spam score.
Yes. You can exactly see why you get an issue with the mail. That's why I suggested to use mail-tester to be sure.

First of all, always make sure you have an rDNS/PTR record for your system. Especially with Hetzner that is easy to adjust.

You should not send mail from a server which is not handling your mail, either via PHP script or smtp.
If you use a PHP script on a server not handling your mail, you have to include that server in the SPF record of the server that does handle the mail for the domain, to prevent DKIM issues also.

So now the system account is left over. I think there was some setting in which you could change from which e-mail account the system mails were send. But I'm not 100%, also not where. Can't find it that quickly.
If that account is an admin acount, you can change the admin mail. Otherwise for the system emails send from [email protected] you can add the ip of that server to be included in SPF which should fix the issue.

On both servers, take care the rDNS/PTR is setup correctly.

Not sure why that bounce address is in there, could be depending on how things were send.
 
Yes. You can exactly see why you get an issue with the mail. That's why I suggested to use mail-tester to be sure.

First of all, always make sure you have an rDNS/PTR record for your system. Especially with Hetzner that is easy to adjust.

You should not send mail from a server which is not handling your mail, either via PHP script or smtp.
If you use a PHP script on a server not handling your mail, you have to include that server in the SPF record of the server that does handle the mail for the domain, to prevent DKIM issues also.

So now the system account is left over. I think there was some setting in which you could change from which e-mail account the system mails were send. But I'm not 100%, also not where. Can't find it that quickly.
If that account is an admin acount, you can change the admin mail. Otherwise for the system emails send from [email protected] you can add the ip of that server to be included in SPF which should fix the issue.

On both servers, take care the rDNS/PTR is setup correctly.

Not sure why that bounce address is in there, could be depending on how things were send.
Unfortunately most of our clients wont pay for SMTP because it never actually used to be an issue in the past for them. Only thing is, I have now noticed that PHP Script (in the headers) is massively impacting my score, Im told its possible to make PHP not attach the headers, in DirectAdmin inside Custom Build there is this option here, Im just struggling because I set it from yes, to no, restarted DA and Exim yet the headers still attach themselves?
1663697446207.png


The "?" links here https://www.php.net/manual/en/mail.configuration.php#ini.mail.add-x-header
 
1663697568295.png

I can also confirm inside the options.conf file in custom build that x_mail_header is set to no? Not sure why they still attaching
 
Unfortunately most of our clients wont pay for SMTP because it never actually used to be an issue in the past for them.
So is that a business thing for you then? Because smtp is free of charge, and we provide this to our customers free of charge. Out of security reasons we even rather have them using SMTP than PHP mail.

Not sure why they still attaching
I don't know, don't use that. I presume you have restarted directadmin afterwards, but it could well be you need to recompile php too afterwards, I'm not sure for the same reason (don't use it myself).

As for the header stuff, I can't help you, maybe somebody else can.

As for the 10 errors mentioned by Active8, the rDNS and smtp are the most important. But if you want to send php mail from your server, you best configure it to send mail to prevent most problems.
 
So is that a business thing for you then? Because smtp is free of charge, and we provide this to our customers free of charge. Out of security reasons we even rather have them using SMTP than PHP mail.


I don't know, don't use that. I presume you have restarted directadmin afterwards, but it could well be you need to recompile php too afterwards, I'm not sure for the same reason (don't use it myself).

As for the header stuff, I can't help you, maybe somebody else can.

As for the 10 errors mentioned by Active8, the rDNS and smtp are the most important. But if you want to send php mail from your server, you best configure it to send mail to prevent most problems.
Well SMTP itself is free, but it needs to be configured and maintained, and specifically setup. Most of our clients use services like Outlook, Gsuite, etc. so for us to use SMTP as a work around means every client has to have SMTP, versus it being a nice to have. PHP Mail has functioned perfectly fine for us in the past. Some clients are willing to pay for us to setup SMTP for them, some are okay with the default of PHP Mail.
We have configured rDNS which makes us happy because it increased, our score, the issue we are now having is that we still cant get the PHP script headers gone.

UPDATE: Removed them with an Exim filter
 
Please close this thread and mark as solved
Thank you for your insight. As for marking as solved, if all is correct you can edit your first post and change the prefix youself to solved now. You should have enough posts to be able to do that.
 
Thank you for your insight. As for marking as solved, if all is correct you can edit your first post and change the prefix youself to solved now. You should have enough posts to be able to do that.
Doesn't give me the option sadly, I tried before asking.
 
Ah I'm sorry, indeed. I missed that you're not yet in the verified usergroup. Maybe the postcount must be more.
In that case you can just leave it as is and the post will go down by itself in the list.
Thank you for reporting back the fix for your issue.
 
Back
Top