question

MITRADebarthaGECoreTechCyber-2843 avatar image
0 Votes"
MITRADebarthaGECoreTechCyber-2843 asked ·

Outbound SMTP email issue

I have built a solution using python flask and created the web app for that in azure. The solution will send smtp email using port 25 to GE emails.
The solution is working fine in my IDE but, failing on azure as, it cant send email to GE outlook and throwing error of “[Errno -5] No address associated with hostname”
Is the issue related to azure outbound restriction on smtp?
if, yes then how can I lift up the restriction please, let me know and for what whom should I contact.

azure-webapps
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ManuPhilip avatar image
0 Votes"
ManuPhilip answered ·

Hi,
I guess, your email administrator can help on this. Here the relay request is coming form Azure which has a public IP. You can provide the IP to your email administrator. They can create the connector for this purpose. Note that, email systems can't authenticate from unknown sources. Here Azure email relay request is an unknown source and to be resolved


Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion

Regards,

Manu

· 11 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your quick reply. If, you are mentioning about the ip of python flask app then, I already have made it publicly available by configuring the host ip to '0.0.0.0'. Are you mentioning about this ? which IP should I provide to my email administrator ?

0 Votes 0 ·
ManuPhilip avatar image ManuPhilip MITRADebarthaGECoreTechCyber-2843 ·

Hi,

I assume that you run the Python app in Azure Web application. The Web Application should have a public IP address so that the application can be accessed from outside world. You have to provide the same IP for relay request configuration

Thanks,
Manu

1 Vote 1 ·

Thank you, yes I have provided '0.0.0.0' ip in my flask app(Which means the app is publicly available). So, I should provide this ip to email admin right ? or anything else please, let me know.

0 Votes 0 ·
Show more comments
ManuPhilip avatar image
0 Votes"
ManuPhilip answered ·

Hello,

The mail server you use for relaying the emails should have an associated connector created with required permissions. The mail server you are trying to connect can't understand the mails you are initiating from azure. So, create the required connector and fix it


Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion

Regards,

Manu

· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your reply, can you tell me how will I create the required connector. Currently, I am using my company smtp server and the email is the shared one which is working in the IDE. So, can you give some overview how will I create the required connector ?


0 Votes 0 ·
ManuPhilip avatar image ManuPhilip MITRADebarthaGECoreTechCyber-2843 ·

Hello,
Here is my blog covering the required connector creation for an Exchange server for the same purpose. I hope, you will get an idea about the permissions etc. from the blog and follow it for your purpose. I am sure that your email admin can understand it better

http://exchangeonline.in/smtp-server-error-5-7-1-unable-relay/

Thanks,
Manu

0 Votes 0 ·
AndyDavid1608 avatar image
0 Votes"
AndyDavid1608 answered ·

Unauthenticated outbound SMTP on port 25 is blocked in Azure.
See: https://docs.microsoft.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity




See the Pay as you Go section for how to remove the restriction or use a service that supports authenticated mail.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.