Client host rejected: Access denied

General discussion about Zimbra Desktop.
BharathS
Posts: 46
Joined: Wed Nov 26, 2014 12:42 am

Client host rejected: Access denied

Postby BharathS » Sun Feb 08, 2015 6:36 pm

Hi,


We're using Zimbra Network Edition. I have just started handling a zimbra server and one of my customer has come back that his application is not able to send mail over TLS 587, when i checked the zimbra logs I see the below, what could be causing for zimbra to reject?


Feb 9 00:31:29 zimbra postfix/submission/smtpd[2882]: warning: hostname 115.115.115.198.Static-Bangalore.tcl.net.in does not resolve to address 115.115.115.198


Feb 9 00:31:29 zimbra postfix/submission/smtpd[2882]: connect from unknown[115.115.115.198]
Feb 9 00:31:29 zimbra postfix/submission/smtpd[2882]: NOQUEUE: reject: RCPT from unknown[115.115.115.198]: 554 5.7.1 <unknown[115.115.115.198]>: Client host rejected: Access denied; from=<admin@mydomain.com> to=<myuser@gmail.com> proto=ESMTP helo=<EITDTP004>
Feb 9 00:31:30 zimbra postfix/submission/smtpd[2882]: lost connection after RCPT from unknown[115.115.115.198]
Feb 9 00:31:30 zimbra postfix/submission/smtpd[2882]: disconnect from unknown[115.115.115.198]


any advice?



imanudin11
Outstanding Member
Outstanding Member
Posts: 278
Joined: Sat Sep 13, 2014 2:23 am
ZCS/ZD Version: Release 8.8.11.GA.3737.UBUNTU16.64
Contact:

Client host rejected: Access denied

Postby imanudin11 » Tue Feb 10, 2015 6:51 am

Hi BharathS,


What email client you are using? if using Microsoft Outlook, don't forget to checklist on My outgoing server (SMTP).


**

Best Regards,
Ahmad Imanudin - Sharing is Beautiful !
Personal Blog [EN] :http://www.imanudin.net
BharathS
Posts: 46
Joined: Wed Nov 26, 2014 12:42 am

Client host rejected: Access denied

Postby BharathS » Tue Feb 10, 2015 10:05 am

I am using asp.net netmail smtpclient...i got around the problem, it seems i had to put this line of code "UseDefaultCredentials = false" before "smtpClient.Credentials = new System.Net.NetworkCredential("username", "password"); otherwise it just tries to do a anonymous login and was getting relay client rejected from the server.
User avatar
jorgedlcruz
Zimbra Alumni
Zimbra Alumni
Posts: 2769
Joined: Thu May 22, 2014 4:47 pm

Client host rejected: Access denied

Postby jorgedlcruz » Tue Feb 10, 2015 8:10 pm

Hi BharathS,


I´m not 100% sure, but please try with this link - http://www.codeproject.com/Articles/667518/Send-email-with-smtp-authentication-using-ASP-NET


In any case the issue looks related to the app, or code that you are working for, not with Zimbra itself, if your server with the ASP are in the same Network like the Zimbra one, you can try to add the IP of the ASP server into the mynetworks, and should relay the email, even without authentication, but my advice is don't do it, auth in the Zimbra server is much clean and elegant.



Best regards

Jorge de la Cruz https://jorgedelacruz.es
Technical Marketing Manager at Zimbra/Synacor https://www.zimbra.com/
BharathS
Posts: 46
Joined: Wed Nov 26, 2014 12:42 am

Client host rejected: Access denied

Postby BharathS » Tue Feb 10, 2015 9:19 pm

Jorge, I had been battling this problem for many days.

Zimbra MTA(postfix) was configured to relay authentication only for 127.0.0.1 and its local bind IP address, rest of the authentication required permit_ssasl_authenticated -->this to work the asp.net code requires defaultcredentials to be false which has to be put before you call the smtpCredentials(username, password) otherwise it skips the require authentication and went straight to send as anonymous and boom it gets rejected by the MTA with an exception 554 5.7.1 relay access denied or 554 5.7.1 client host rejected(under ssl).

User avatar
jorgedlcruz
Zimbra Alumni
Zimbra Alumni
Posts: 2769
Joined: Thu May 22, 2014 4:47 pm

Client host rejected: Access denied

Postby jorgedlcruz » Wed Feb 11, 2015 6:10 am

Tell us where and how you change the value, please :)



Best regards
Jorge de la Cruz https://jorgedelacruz.es
Technical Marketing Manager at Zimbra/Synacor https://www.zimbra.com/
BharathS
Posts: 46
Joined: Wed Nov 26, 2014 12:42 am

Client host rejected: Access denied

Postby BharathS » Wed Feb 11, 2015 7:44 am

Sure!, this was a case where mails could send/receive without any problem as long as this option "My outgoing smtp server requires authentication" is checked in the mail client which i'm using to send or mails. Suddenly the client has hosted a native/web application and to send mails they are using Microsoft .Net's Net.Mail SmtpClient, they set all the properties like host/ip, port, passing credentials...but keep getting "554 5.7.1 Relay Access Denied or Client Host Rejected with same error code" the way to fix this problem is to include this code "client.UseDefaultCredentials = false;" which tells the smtp client to send username/password to the server to authenticate to get accepted by the MTA's allowed authentication methods in postfix it is sasl_authentication" the problem here was the above line of code was put after this line of code "smtpClient.Credentials = new System.Net.NetworkCredential("username", "password");" so when the application was run it just connected to smtpserver and simply attempted to send mail and failed, from server side log there was no sign logon attempts using username/password...then all i did was moved the "client.UseDefaultCredentials = false;" above the "NetworkCredentials", now the code actually evaluated the "client.UseDefaultCredentials = false;" first and then it went to next line where NetworkCredential are passed and finally it was accepted by server and mail was sent!.

Return to “General Questions”

Who is online

Users browsing this forum: No registered users and 5 guests