Currently we have a postfix relay Linux server hosted on GCP and it is connected to proofpoint.
My Python application is on another vm. I am wondering how can I setup my app to send out email using the postfix relay server?
For example, mailgun provides smtp credentials or api keys. The credentials can be used in application for authentication and send out emails.
Any feedback is appreciated
Related
I want to deploy a flask app with http.server (ngnix not installed by admin). I want any user who logs into the cluster to access it. Is it possible?
HTTP server interfaces are visible to all users that are connected to a machine that has direct network access to the machine your server is running on.
If you need them to access the interface just provide the ip address and port where the server is running and the will be able to access it as users of the Flask app you are running. Just make sure you allow the users to access the needed resources.
We are using Elasticemail for our SMTP server and running in issues where our server would fail to connect to the SMTP server for various reasons. Currently, we only find out about the issue when a user complains.
We want to monitor the connection to the server on a regular interval and notify Admin if there is a connection failure.
Is there any way to test the connection to the server without sending an actual email using Python3?
I have created a Python application to send emails. I am running Python 3.8, Postfix, and Opendkim all on the same Ubuntu 20.04 machine. I have successfully configured Postfix and Opendkim to sign outgoing emails. My Python script is using smtplib to send the emails. This portion is working as expected, and all emails sent from this Python application are signed by Opendkim.
Now, I have created a web API using Flask to send emails. I send some json with a post request to the end point, and the Flask application sends an email. Outside of using Flask, this setup is identical to the one outlined above. Emails do send, but they are not being signed by Opendkim. Emails sent with a Python script running from the terminal on the same machine that the Flask application is running on are getting signed by Opendkim. So, I know that Postfix and Opendkim are working, it just does not want to sign an email originating from the Flask application.
I cannot figure this out. Flask is running on 127.0.0.0.1:5000. I have also tried running it on 0.0.0.0:5000. I have tried sending post requests using a Python scrip running on the same machine. They all work, in that an email is sent, but i cannot get Opendkim to sign them.
Any help would be appreciated.
I have my splunk instance hosted azure and i wanted to connect to it via splunkSDK but it is giving timeout error for 8089 port and 443 it is giving connection reset.
import splunklib.client as client
service = client.connect(host='IP-Address', port=8089,
username='admin', password='...')
I have checked firewall and also tried executing this in azure databricks, still issue is present and HTTPS on 443 is also enabled in azure hosted splunk instance.
In web browser the ip is accessible via https like.. https://ip-address But http://ip-address:443 is giving no response. Can someone help solve this issue.
Try https://ip-address:8089 . If its not accessible, you will need to contact Splunk Cloud support and request they enable port 8089 access.
Refer to https://docs.splunk.com/Documentation/Splunk/7.3.1/RESTREF/RESTsystem#Splunk_Cloud_URL_for_REST_API_access
Managed Splunk Cloud deployments
https://deployment-name.splunkcloud.com:8089
Self-service Splunk Cloud deployments
To get the required credentials, submit a support case on the Support Portal. After installing the credentials, use the following URL.
https://input-deployment-name.cloud.splunk.com:8089
I'm trying to send emails using python smtp library but get the following an error message when trying to send to external email addresses (internal email works):
smtplib.SMTPRecipientsRefused: {'test#gmail.com': (550, ' Relaying denied')}
This is because we have rules setup on our exchange that prevent relaying from client machines.
What I don't understand is how come I can send emails over SMTP with an SSIS package without getting the relay error.
Is there a setting I need to enable in my python to bypass this or is SSIS sending the email to SQL Server to send on its behalf.
I believe you are getting this due to authentication. SSIS is probably passing your windows credentials through but when you are trying to send with python your credentials are being denied.
Not 100% sure that is your issue. But a thought.