Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement Request - Option to pass domain (fqdn) to build methods for message-id generation #50

Closed
robincsamuel opened this issue Mar 3, 2022 · 3 comments

Comments

@robincsamuel
Copy link
Contributor

it'd be nice if a domain can be an optional argument to the message & mdn build methods. Because the socket.getfqdn() returns the local IP.

Please let me know what do you think. I'll be happy to raise a PR :)

Thanks!

@abhishek-ram
Copy link
Owner

Maybe I am missing something here, but I do not see a domain in the build methods.
Can you point me to that part of the code?

@robincsamuel
Copy link
Contributor Author

robincsamuel commented Mar 4, 2022

Ah, sorry! I should have mentioned it's about the message-id generation.

The email_utils.make_msgid() method call here accepts an optional domain argument, and fallbacks to socket.getfqdn() as default.

This makes the message-id like 64632159294.1.58385612484174113@ip-172-23-3-37.ec2.internal, but I'm trying to make it like 64632159294.1.58385612484174113@mydomain.com.

So what I am suggesting is, If we can accept an optional domain argument in the build methods, it can be passed to the email_utils.make_msgid() method and the generated message-id will have the custom domain name instead of the local IP address.

@robincsamuel robincsamuel changed the title Enhancement Request - Option to pass domain to build method (fqdn) Enhancement Request - Option to pass domain to build method (fqdn) for message-id generation Mar 4, 2022
@robincsamuel robincsamuel changed the title Enhancement Request - Option to pass domain to build method (fqdn) for message-id generation Enhancement Request - Option to pass domain (fqdn) to build methods for message-id generation Mar 4, 2022
@robincsamuel
Copy link
Contributor Author

@abhishek-ram I've also raised a PR with suggested changes. Please check and share your thoughts :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants