Using Amazon SES to send emails from NetBox #9044

Closed
opened 2025-12-29 20:44:44 +01:00 by adam · 5 comments
Owner

Originally created by @llamafilm on GitHub (Jan 4, 2024).

NetBox version

v3.7.0

Feature type

New functionality

Proposed functionality

In addition to SMTP, offer a way to send emails using Amazon SES.

Example code available here: https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/python/example_code/ses/ses_email.py#L66

Use case

My organization strongly prefers SES APIs over SMTP. This allows you to authenticate by EC2 instance role, without creating any passwords.

Database changes

maybe a new field to store email method preference

External dependencies

https://pypi.org/project/boto3/

Originally created by @llamafilm on GitHub (Jan 4, 2024). ### NetBox version v3.7.0 ### Feature type New functionality ### Proposed functionality In addition to SMTP, offer a way to send emails using [Amazon SES](https://aws.amazon.com/ses/). Example code available here: https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/python/example_code/ses/ses_email.py#L66 ### Use case My organization strongly prefers SES APIs over SMTP. This allows you to authenticate by EC2 instance role, without creating any passwords. ### Database changes maybe a new field to store email method preference ### External dependencies https://pypi.org/project/boto3/
adam added the type: feature label 2025-12-29 20:44:44 +01:00
adam closed this issue 2025-12-29 20:44:44 +01:00
Author
Owner

@markkuleinio commented on GitHub (Jan 4, 2024):

Just an idea, how I do it:

  • I run postfix on the NetBox EC2 instance, listening only on localhost, configured to send everything via SES
  • I configure NetBox to use localhost for SMTP email (duh just realized that your problem is using SMTP in general, not just using SES SMTP in NetBox configuration, leaving this here anyway...)
@markkuleinio commented on GitHub (Jan 4, 2024): Just an idea, how I do it: - I run postfix on the NetBox EC2 instance, listening only on localhost, configured to send everything via SES - I configure NetBox to use localhost for SMTP email (duh just realized that your problem is using SMTP in general, not just using SES SMTP in NetBox configuration, leaving this here anyway...)
Author
Owner

@llamafilm commented on GitHub (Jan 4, 2024):

Thanks for the relay idea. That got me thinking, maybe I could set it up with this: https://github.com/loopingz/smtp-relay

@llamafilm commented on GitHub (Jan 4, 2024): Thanks for the relay idea. That got me thinking, maybe I could set it up with this: https://github.com/loopingz/smtp-relay
Author
Owner

@jeffgdotorg commented on GitHub (Jan 5, 2024):

Thanks for your interest in helping improve NetBox!

We've reviewed your issue and would like to get more details to help understand it in depth. Please revise the original report to address the following:

  1. In use case, identify the problem you're trying to solve – you've stated a preference around how emails should be sent, but provided no context around why you're sending emails from NetBox.
  2. In external dependencies, please explain what role you think the boto3 library might play in the solution.
@jeffgdotorg commented on GitHub (Jan 5, 2024): Thanks for your interest in helping improve NetBox! We've reviewed your issue and would like to get more details to help understand it in depth. Please revise the original report to address the following: 1. In *use case*, identify the problem you're trying to solve – you've stated a preference around how emails should be sent, but provided no context around _why_ you're sending emails from NetBox. 2. In *external dependencies*, please explain what role you think the `boto3` library might play in the solution.
Author
Owner

@llamafilm commented on GitHub (Jan 5, 2024):

To be honest, I'm pretty new at Netbox and don't know exactly what email is used for here. I read it can be used to alert on critical events but I haven't been able to test this yet. Perhaps there's a better solution, maybe webhooks?

boto3 is Amazon's Python library which is used to authenticate and send SES email.

@llamafilm commented on GitHub (Jan 5, 2024): To be honest, I'm pretty new at Netbox and don't know exactly what email is used for here. I read it can be used to alert on critical events but I haven't been able to test this yet. Perhaps there's a better solution, maybe webhooks? boto3 is Amazon's Python library which is used to authenticate and send SES email.
Author
Owner

@jeffgdotorg commented on GitHub (Jan 24, 2024):

Thanks for the candor, @llamafilm. I'm still getting my NetBox legs too. And I learned something today – I've used boto3 before to wrangle S3 objects but never looked at the other services it supports.

I think there's value in continuing this conversation, so I'm going to convert this issue to a discussion and generalize the subject a little bit. Maybe it will come back around to a more fully-formed feature request down the road.

@jeffgdotorg commented on GitHub (Jan 24, 2024): Thanks for the candor, @llamafilm. I'm still getting my NetBox legs too. And I learned something today – I've used boto3 before to wrangle S3 objects but never looked at the other services it supports. I think there's value in continuing this conversation, so I'm going to convert this issue to a discussion and generalize the subject a little bit. Maybe it will come back around to a more fully-formed feature request down the road.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9044