trigat / suricata-alert

Parse through Suricata log and send email alerts using Python.
5 stars 1 forks source link

Use without Gmail email server #1

Open robmorin opened 2 years ago

robmorin commented 2 years ago

Hello... I use a local linux server to relay emails to anywhere out of our LAN. How would I change the script to use a local server on port 2 with no auth?

I am not a python person. :(

Thanks and have a great day!

trigat commented 2 years ago

You might be able to get away with changing the:

port = 587 to port = 2

Then change the line:

with smtplib.SMTP("smtp.gmail.com", port) as server:

to point to the IP address of your relay server instead of smtp.gmail.com.

You could try removing the server.login(send_address, password) line so that no authentication is used.

Here is an example: https://stackoverflow.com/questions/55672983/how-to-send-an-email-without-login-to-server-in-python

This script is using the Python smtplib module. The following will give you other options if needed:https://docs.python.org/3/library/smtplib.html ------- Original Message ------- On Thursday, April 28th, 2022 at 3:53 PM, Rob VE2XTC @.***> wrote:

Hello... I use a local linux server to relay emails to anywhere out of our LAN. How would I change the script to use a local server on port 2 with no auth?

I am not a python person. :(

Thanks and have a great day!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

robmorin commented 2 years ago

Thanks very much, I'll give that a try today and let you know how it goes.

Thanks for the prompt reply!

Have a great day.

Rob Morin Montreal, Canada HTTP://1RADIO.CA


From: Trigat @.> Sent: Monday, May 2, 2022 12:04:43 PM To: trigat/suricata-alert @.> Cc: Rob Morin @.>; Author @.> Subject: Re: [trigat/suricata-alert] Use without Gmail email server (Issue #1)

You might be able to get away with changing the:

port = 587 to port = 2

Then change the line:

with smtplib.SMTP("smtp.gmail.com", port) as server:

to point to the IP address of your relay server instead of smtp.gmail.com.

You could try removing the server.login(send_address, password) line so that no authentication is used.

Here is an example: https://stackoverflow.com/questions/55672983/how-to-send-an-email-without-login-to-server-in-python

This script is using the Python smtplib module. The following will give you other options if needed:https://docs.python.org/3/library/smtplib.html ------- Original Message ------- On Thursday, April 28th, 2022 at 3:53 PM, Rob VE2XTC @.***> wrote:

Hello... I use a local linux server to relay emails to anywhere out of our LAN. How would I change the script to use a local server on port 2 with no auth?

I am not a python person. :(

Thanks and have a great day!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/trigat/suricata-alert/issues/1#issuecomment-1115070342, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOJC7V5LD5IDQ2HHFMXKRDVH74JXANCNFSM5US6HEVA. You are receiving this because you authored the thread.Message ID: @.***>