Sent email fails instantly

mbsmt

Verified User
Joined
Jul 24, 2013
Messages
175
Location
Mashhad, Iran
Hi. I have an installed ticketing system on my server and have multiple customers on it. All notification emails receive correctly to them. But there is just one customer that can not receive these emails. I tested sending email to his email address through webmail and also with php mail() function, and the same result occurred. All of those email failed instantly after submit.
The message in failed email is like this:

Code:
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  [email protected]
    
Reporting-MTA: dns; srv1.parniahost.com

Action: failed
Final-Recipient: rfc822;[email protected]
Status: 5.0.0

Note: [email protected] is a sample email address here.

Target email address is correct and can receive all emails from other servers. On the other hand, all other targets can receive my sent email. So the problem is only between my server and that customer's server.

Can you help me to solve this problem?
 
I know you want to protect the user, but without actual information there isn't enough information for anyone to help. All we see here is that it failed, there is typically more information that gives you the reason for the failure. It could be that you are attempting to send an email with an email address you aren't authorized to send from. That is just a guess, but it would help if you included the Diagnostic-Code too as well as what was in your exim mainlog for that transaction.
 
I know you want to protect the user, but without actual information there isn't enough information for anyone to help. All we see here is that it failed, there is typically more information that gives you the reason for the failure. It could be that you are attempting to send an email with an email address you aren't authorized to send from. That is just a guess, but it would help if you included the Diagnostic-Code too as well as what was in your exim mainlog for that transaction.

Emails are sending from info[@]helpical.com to admin.support[@]tolue.com .
This is exim mainlog :

2017-10-05 20:54:01 1e09sP-00053h-Cq <= info[@]helpical.com H=(srv1.parniahost.com) [127.0.0.1] P=esmtpa A=login:info[@]helpical.com S=581 id=e4f496572dd3c28fa47a1e061ddb4517[@]helpical.com T="Test log" from <info[@]helpical.com> for admin.support[@]tolue.com
2017-10-05 20:54:01 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1e09sP-00053h-Cq
2017-10-05 20:54:01 1e09sP-00053h-Cq ** admin.support[@]tolue.com F=<info[@]helpical.com> R=virtual_aliases:
2017-10-05 20:54:01 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1e09sP-00053h-Cq
2017-10-05 20:54:01 1e09sP-00053p-On acl_m_script_path '/' is never allowed for Users.
2017-10-05 20:54:01 1e09sP-00053p-On <= <> R=1e09sP-00053h-Cq U=mail P=local S=1784 T="Mail delivery failed: returning message to sender" from <> for info[@]helpical.com
2017-10-05 20:54:01 1e09sP-00053p-On => blackhole (non-SMTP ACL discarded recipients)
2017-10-05 20:54:01 1e09sP-00053p-On Completed
2017-10-05 20:54:01 1e09sP-00053h-Cq Process failed (1) when writing error message to info[@]helpical.com (frozen)

To prevent spams, I wrote @ as [@]
 
Last edited:
Did you complete the guide https://help.directadmin.com/item.php?id=8 for domains which are using external mailservers?

I did not Alex, because I have not access to customer's web hosting panel. They are only using our software hosted on our server. On the other hand, they are working with their email service well. It seems just the connection between our server and their server has some problems.
 
I think these are the lines that are your problem:
Code:
2017-10-05 20:54:01 1e09sP-00053p-On acl_m_script_path '/' is never allowed for Users.
2017-10-05 20:54:01 1e09sP-00053p-On => blackhole (non-SMTP ACL discarded recipients)
It looks like you are trying to run your script in '/'. See http://forum.directadmin.com/showthread.php?t=55342

I saw that link. But I did not understand what can I do to solve my problem.
 
Just so I understand correctly, you are sending the emails from one of your email adresses to his email address?

If that's the case your customer should check if your domain, address or ip is maybe blacklisted.

If you are sending from one of his email adresses, your are probably not allowed to do that. Did you try it over SMTP with authentication? Try to send a test mail to mail-tester.com and see if something shows up.
 
Just so I understand correctly, you are sending the emails from one of your email adresses to his email address?

If that's the case your customer should check if your domain, address or ip is maybe blacklisted.

If you are sending from one of his email adresses, your are probably not allowed to do that. Did you try it over SMTP with authentication? Try to send a test mail to mail-tester.com and see if something shows up.

The first one is my issue. I want to send email to his email and it fails. I tested it with SMTP, PHP mail(), WebMail, etc.
This is my result on mail-tester.com : https://www.mail-tester.com/web-dukbu
Also, as target hosting company said, our server IP is in WhiteList.
 
Are you sure that you don't have the domain on your server?

Code:
grep tolue.com /etc/virtual/domains
Code:
grep tolue.com /etc/virtual/domainowners

When you send email to an emailbox on tolue.com from your server with helpical.com a virtual_aliases router is used instead of lookuphost:

Code:
2017-10-05 20:54:01 1e09sP-00053h-Cq ** admin.support[@]tolue.com F=<info[@]helpical.com> R=virtual_aliases:

as if you host the domain locally.

That's why I suggested that you follow instructions from https://help.directadmin.com/item.php?id=8

The error:

Code:
2017-10-05 20:54:01 1e09sP-00053p-On acl_m_script_path '/' is never allowed for Users.

happened for a bounced email, see ID 1e09sP-00053p-On. And is not related to the original email which has ID 1e09sP-00053h-Cq.

P.S. You'd better use exigrep instead of grep in order to get relative information for your email from logs. E.g.:

Code:
exigrep 1e09sP-00053h-Cq /var/log/exim/mainlog

you can use any search string instead of 1e09sP-00053h-Cq.
 
Are you sure that you don't have the domain on your server?

Code:
grep tolue.com /etc/virtual/domains
Code:
grep tolue.com /etc/virtual/domainowners

When you send email to an emailbox on tolue.com from your server with helpical.com a virtual_aliases router is used instead of lookuphost:

Code:
2017-10-05 20:54:01 1e09sP-00053h-Cq ** admin.support[@]tolue.com F=<info[@]helpical.com> R=virtual_aliases:

as if you host the domain locally.

That's why I suggested that you follow instructions from https://help.directadmin.com/item.php?id=8

The error:

Code:
2017-10-05 20:54:01 1e09sP-00053p-On acl_m_script_path '/' is never allowed for Users.

happened for a bounced email, see ID 1e09sP-00053p-On. And is not related to the original email which has ID 1e09sP-00053h-Cq.

P.S. You'd better use exigrep instead of grep in order to get relative information for your email from logs. E.g.:

Code:
exigrep 1e09sP-00053h-Cq /var/log/exim/mainlog

you can use any search string instead of 1e09sP-00053h-Cq.

Let me describe what is the situation exactly.
Our customer's domain is Tolue.com, and they created an A record (support.tolue.com) that linked to our server IP (136.243.141.46). We installed a web application for them in our server, so we should create an account for them in our server too with the same domain (Tolue.com) and then, do installation on support directory on our server.
Can these details give you more overview on my issue? We did this operations many times for different users, but this is the first time we occurred with such problem.
 
If you have a domain in Directadmin and mailservers for the domains are hosted somewhere else outside of your Directadmin server you should uncheck that option "Local Mail Server" if you use the default /etc/exim.conf (without smathost). If you don't uncheck the option emails for such a domain from the same server will always will be delivered locally. That's it.

This is my 3rd post suggesting the same solution. If you don't like this solution feel free to find your own.
 
If you have a domain in Directadmin and mailservers for the domains are hosted somewhere else outside of your Directadmin server you should uncheck that option "Local Mail Server" if you use the default /etc/exim.conf (without smathost). If you don't uncheck the option emails for such a domain from the same server will always will be delivered locally. That's it.

This is my 3rd post suggesting the same solution. If you don't like this solution feel free to find your own.

My previous comment was to continue your solution because I found it useful. Just I decided to show the real situation to you because I thought it might help us more.
I will do your suggestion and inform you about its result.
Thank you for helping me ...
 
OK, it's good to know. Thanks for the clarification. Actually first I did not realize that you followed the recommendations.

You're welcome ;)
 
OK, it's good to know. Thanks for the clarification. Actually first I did not realize that you followed the recommendations.

You're welcome ;)

Alex, I removed local MX record and changed it to remote mail server using your given link steps. But problem did not solve.
Please pay attention to this: My sent emails don't be received to any account on tolue.com (Emails are sending from different hosted domains on my server). Briefly, any sent email from my server and hosted domains on it, can not be received in any of tolue.com email accounts. I did this test with SMTP, Webmail and also PHP Mail() function.
 
Last edited:
Kindly show related log lines with exigrep and test it with nslookup and telnet:

Code:
nslookup mail.tolue.com
telnet mail.tolue.com 25

and post results here.
 
Kindly show related log lines with exigrep and test it with nslookup and telnet:

Code:
nslookup mail.tolue.com
telnet mail.tolue.com 25

and post results here.

Lookup:
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
Name: mail.tolue.com
Address: 185.88.153.9
Telnet:
Trying 185.88.153.9...
Connected to mail.tolue.com (185.88.153.9).
Escape character is '^]'.
220 irmail2.bertina.us
421 Command timeout, closing transmission channel
Connection closed by foreign host.
 
OK, you can connect to the MX server. Of course if you tested it from your server.

And what about logs?
 
Back
Top