From 8f2a331e49e144fcb20f2a17c555a08754dbcf79 Mon Sep 17 00:00:00 2001 From: Seb <70687089+seb36273@users.noreply.github.com> Date: Sun, 15 May 2022 17:36:47 +0200 Subject: [PATCH 1/4] Update sendmail.go Hey guys, great job! I found a small type in the environment variable `SMTP_VERITY_CERT`. Additionally, I would suggest to rename the variable to `SMTP_SKIP_VERIFY_CERT` because the action in `tlsconfig` can be more clearly understood, I think. What so you mean? --- sendmail.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sendmail.go b/sendmail.go index e58c098..e85ceb2 100644 --- a/sendmail.go +++ b/sendmail.go @@ -78,7 +78,7 @@ func (m *SendMailRequest) Execute() error { // TLS config tlsconfig := &tls.Config{ - InsecureSkipVerify: viper.GetBool("SMTP_VERITY_CERT"), + InsecureSkipVerify: viper.GetBool("SMTP_SKIP_VERIFY_CERT"), ServerName: smtpServerHost, } From fb1a21d77d2538ac971eb10ebb145b3743c8e1d9 Mon Sep 17 00:00:00 2001 From: Seb <70687089+seb36273@users.noreply.github.com> Date: Sun, 15 May 2022 18:03:12 +0200 Subject: [PATCH 2/4] Update app.yaml.sample --- app.yaml.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.yaml.sample b/app.yaml.sample index 3c5533a..3b73b88 100644 --- a/app.yaml.sample +++ b/app.yaml.sample @@ -12,7 +12,7 @@ env_variables: TEMPLATE_DEMO_REQUEST_REPLY: templates/template_reply_demo_request.html TEMPLATE_CONTACT_REQUEST_REPLY: templates/template_reply_contact_request.html SMTP_SERVER_ADDR: "smtp.mailgun.org:587" - SMTP_VERITY_CERT: true + SMTP_SKIP_VERIFY_CERT: false SMTP_AUTHENTICATION_ENABLED: true SMTP_CLIENT_USERNAME: "postmaster@example.com" SMTP_CLIENT_PASSWORD: "postmasterSecretPassWord" From bc787433d6a9b3fc231bb410fb529109686b14b9 Mon Sep 17 00:00:00 2001 From: Sebastian Kriechenbauer Date: Sun, 15 May 2022 18:11:51 +0200 Subject: [PATCH 3/4] Updated docs and values.yaml to match the previous behaviour. --- docs/configuration-variables.md | 2 +- docs/deployment-on-docker.md | 2 +- helm/values.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configuration-variables.md b/docs/configuration-variables.md index 53acf33..2153722 100644 --- a/docs/configuration-variables.md +++ b/docs/configuration-variables.md @@ -3,7 +3,7 @@ Regardless of the deployment platform (Google App Engine, Kubernetes, Docker), the following configuration parameters must be provided when deploying hugo-mx-gateway. * `SMTP_SERVER_ADDR`: Set the address of the SMTP server in the form of `host:port`. It's required that the SMTP server being supporting TLS. -* `SMTP_VERITY_CERT`: Tell whether the SMTP certificate should be validated against top level authorities. If you're using a self-signed certificate on the SMTP server, this value must be set to `false`. +* `SMTP_SKIP_VERIFY_CERT`: Tell whether the SMTP certificate should be validated against top level authorities. If you're using a self-signed certificate on the SMTP server, this value should be set to `false`. * `SMTP_AUTHENTICATION_ENABLED`: Boolean (default: `true`) indicating whether SMTP authentication is required or not. If true, the variables `SMTP_CLIENT_USERNAME` and `SMTP_CLIENT_PASSWORD` are used the perform the authentication. * `SMTP_CLIENT_USERNAME`: Set the username to connect to the SMTP server. * `SMTP_CLIENT_PASSWORD`: Set the password to connect to the SMTP server. diff --git a/docs/deployment-on-docker.md b/docs/deployment-on-docker.md index e859b55..97d47ba 100644 --- a/docs/deployment-on-docker.md +++ b/docs/deployment-on-docker.md @@ -11,7 +11,7 @@ Then apply the following command while setting the configuration variables appro --publish 8080:8080 \ --name 'hugo-mx-gateway' \ -e SMTP_SERVER_ADDR="smtp.example.com:465" \ - -e SMTP_VERITY_CERT=true \ + -e SMTP_SKIP_VERIFY_CERT=false \ -e SMTP_CLIENT_USERNAME="postmaster@example.com" \ -e SMTP_CLIENT_PASSWORD="postmasterSecretPassWord" \ -e CONTACT_REPLY_EMAIL="noreply@example.com" \ diff --git a/helm/values.yaml b/helm/values.yaml index 5b1c120..4a80441 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -2,7 +2,7 @@ replicaCount: 1 envs: SMTP_SERVER_ADDR: "smtp.mailgun.org:587" - SMTP_VERITY_CERT: true + SMTP_SKIP_VERIFY_CERT: false SMTP_CLIENT_USERNAME: "postmaster@example.com" SMTP_CLIENT_PASSWORD: "postmasterSecretPassWord" ALLOWED_ORIGINS: "127.0.0.1,example.com" From 7016296efa54191e55f96701170a01a54872c144 Mon Sep 17 00:00:00 2001 From: Rodrigue Chakode Date: Sun, 15 May 2022 23:25:22 +0200 Subject: [PATCH 4/4] Updated docs related to SMTP_SKIP_VERIFY_CERT SMTP_SKIP_VERIFY_CERT should be likely set to false for self-signed certificate --- docs/configuration-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration-variables.md b/docs/configuration-variables.md index 2153722..79f32f7 100644 --- a/docs/configuration-variables.md +++ b/docs/configuration-variables.md @@ -3,7 +3,7 @@ Regardless of the deployment platform (Google App Engine, Kubernetes, Docker), the following configuration parameters must be provided when deploying hugo-mx-gateway. * `SMTP_SERVER_ADDR`: Set the address of the SMTP server in the form of `host:port`. It's required that the SMTP server being supporting TLS. -* `SMTP_SKIP_VERIFY_CERT`: Tell whether the SMTP certificate should be validated against top level authorities. If you're using a self-signed certificate on the SMTP server, this value should be set to `false`. +* `SMTP_SKIP_VERIFY_CERT`: Tell whether the SMTP certificate should be validated against top level authorities. If you're using a self-signed certificate on the SMTP server, this value should be set to `true`. * `SMTP_AUTHENTICATION_ENABLED`: Boolean (default: `true`) indicating whether SMTP authentication is required or not. If true, the variables `SMTP_CLIENT_USERNAME` and `SMTP_CLIENT_PASSWORD` are used the perform the authentication. * `SMTP_CLIENT_USERNAME`: Set the username to connect to the SMTP server. * `SMTP_CLIENT_PASSWORD`: Set the password to connect to the SMTP server.