ohadschn / letsencrypt-webapp-renewer

[PLEASE USE FREE MS MANAGED CERTS INSTEAD] Simple WebJob-ready console application for renewing Azure Web App SSL certificates
https://www.ohadsoft.com/
Apache License 2.0
282 stars 51 forks source link

email from address non-configurable? #115

Open JohnnyPrimus opened 4 years ago

JohnnyPrimus commented 4 years ago

Completely possible I'm missing something or just not understanding fully, but is there a way to configure the from address for the sendgrid notifications? I've created an apikey and verified a sender but it looks like its hard coded to using letsencrypt-webapp-renewer@ohadsoft.com as the from address... Is that accurate?

ohadschn commented 4 years ago

Correct, it's currently hard coded: https://github.com/ohadschn/letsencrypt-webapp-renewer/blob/ad566151841b6d9a2ce20d1e0c4e9572a07365ef/src/OhadSoft.AzureLetsEncrypt.Renewal.WebJob/Email/SendGridNotifier.cs#L47

Curious, why would you want to configure the from address?

JohnnyPrimus commented 4 years ago

I don't have a burning desire to configure it. Maybe I am misunderstanding sendgrid? The webapp logs show it succeeds in sending an email but I never receive the email, and sendgrid doesn't increase the count of sent emails.

I had a suspicion that whatever was used as the from address needed to be a verified sender in sendgrid... is that not the case?

ohadschn commented 4 years ago

Not that I recall, maybe you could contact SendGrid support?

JohnnyPrimus commented 4 years ago

When I update the send address to an address that has been added to my sendgrid account as a verified sender, it completes. it seems to only want to send if the from address has been verified on that account....

ohadschn commented 4 years ago

You know that does ring a bell, but I set it up years ago and barely remember... Do you think you could add a short explanation to the README in a pull request?

ohadschn commented 4 years ago

it seems to only want to send if the from address has been verified on that account....

Not sure I understand that, my account doesn't have ohadsoft.com verified AFAIK.. are we talking about this? image

JohnnyPrimus commented 4 years ago

Do you have anything under single sender verification?

image

JohnnyPrimus commented 4 years ago

domain authentication gets rid of the "on behalf of" in the email (at least, in the gmail client)

but so far in my testing, single sender verification seems to be required for any email address you use as a from address

ohadschn commented 4 years ago

I can't find these settings in my account, maybe we have a different plan? I created a free/basic one via Azure a few years back. Could you provide the URL of that settings page and/or explain/show screenshot how I get to it ?

JohnnyPrimus commented 4 years ago

Sure, the url is here: https://app.sendgrid.com/settings/sender_auth

here is the docs about the single sender verification: https://sendgrid.com/docs/for-developers/sending-email/sender-identity/

There are two ways you can confirm send identities: 1) Create a single sender and verify the account (by receiving email at it and clicking a verification link) 2) Proving your ownership of a domain by creating CNAME records at that domain

If you verify domain ownership, you can send as any account @thatdomain.com without needing to verify them individually, however the perms don't extend to other domains.

If you don't have a domain, or you want to send from a domain that you don't own, you must verify that you have access to that account

Here's screencap I got after registering a new account and going to the sender page image

JohnnyPrimus commented 4 years ago

This is a really great webapp (thanks), and I wanted to get it deployed to my site so I made a change to add fromEmail, and to add the documentation stuff you recommended.

Pr is here (https://github.com/ohadschn/letsencrypt-webapp-renewer/pull/116) if you want to use any of it... (still learning so would love to learn if there are places I ought to have done something different)

Cheers!

ohadschn commented 4 years ago

I simply don't have those settings, I guess I'm on some legacy plan. Thanks for the PR! will take a look.