Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
9aa4f5c4
Commit
9aa4f5c4
authored
Sep 24, 2017
by
Carl Bergquist
Committed by
GitHub
Sep 24, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9341 from thz/smtp_ehlo_identity
introduce smtp config option for EHLO identity
parents
3fac31e8
af79d046
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
0 deletions
+13
-0
conf/defaults.ini
+1
-0
conf/sample.ini
+2
-0
docs/sources/http_api/admin.md
+1
-0
docs/sources/installation/configuration.md
+3
-0
pkg/services/notifications/mailer.go
+4
-0
pkg/setting/setting_smtp.go
+2
-0
No files found.
conf/defaults.ini
View file @
9aa4f5c4
...
@@ -318,6 +318,7 @@ key_file =
...
@@ -318,6 +318,7 @@ key_file =
skip_verify
=
false
skip_verify
=
false
from_address
=
admin@grafana.localhost
from_address
=
admin@grafana.localhost
from_name
=
Grafana
from_name
=
Grafana
ehlo_identity
=
[emails]
[emails]
welcome_email_on_sign_up
=
false
welcome_email_on_sign_up
=
false
...
...
conf/sample.ini
View file @
9aa4f5c4
...
@@ -295,6 +295,8 @@
...
@@ -295,6 +295,8 @@
;skip_verify = false
;skip_verify = false
;from_address = admin@grafana.localhost
;from_address = admin@grafana.localhost
;from_name = Grafana
;from_name = Grafana
# EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity = dashboard.example.com
[emails]
[emails]
;welcome_email_on_sign_up = false
;welcome_email_on_sign_up = false
...
...
docs/sources/http_api/admin.md
View file @
9aa4f5c4
...
@@ -161,6 +161,7 @@ Only works with Basic Authentication (username and password). See [introduction]
...
@@ -161,6 +161,7 @@ Only works with Basic Authentication (username and password). See [introduction]
"enabled":"false",
"enabled":"false",
"from_address":"admin@grafana.localhost",
"from_address":"admin@grafana.localhost",
"from_name":"Grafana",
"from_name":"Grafana",
"ehlo_identity":"dashboard.example.com",
"host":"localhost:25",
"host":"localhost:25",
"key_file":"",
"key_file":"",
"password":"************",
"password":"************",
...
...
docs/sources/installation/configuration.md
View file @
9aa4f5c4
...
@@ -593,6 +593,9 @@ Address used when sending out emails, defaults to `admin@grafana.localhost`
...
@@ -593,6 +593,9 @@ Address used when sending out emails, defaults to `admin@grafana.localhost`
### from_name
### from_name
Name to be used when sending out emails, defaults to
`Grafana`
Name to be used when sending out emails, defaults to
`Grafana`
### ehlo_identity
Name to be used as client identity for EHLO in SMTP dialog, defaults to instance_name.
## [log]
## [log]
### mode
### mode
...
...
pkg/services/notifications/mailer.go
View file @
9aa4f5c4
...
@@ -101,7 +101,11 @@ func createDialer() (*gomail.Dialer, error) {
...
@@ -101,7 +101,11 @@ func createDialer() (*gomail.Dialer, error) {
d
:=
gomail
.
NewDialer
(
host
,
iPort
,
setting
.
Smtp
.
User
,
setting
.
Smtp
.
Password
)
d
:=
gomail
.
NewDialer
(
host
,
iPort
,
setting
.
Smtp
.
User
,
setting
.
Smtp
.
Password
)
d
.
TLSConfig
=
tlsconfig
d
.
TLSConfig
=
tlsconfig
if
setting
.
Smtp
.
EhloIdentity
!=
""
{
d
.
LocalName
=
setting
.
Smtp
.
EhloIdentity
}
else
{
d
.
LocalName
=
setting
.
InstanceName
d
.
LocalName
=
setting
.
InstanceName
}
return
d
,
nil
return
d
,
nil
}
}
...
...
pkg/setting/setting_smtp.go
View file @
9aa4f5c4
...
@@ -9,6 +9,7 @@ type SmtpSettings struct {
...
@@ -9,6 +9,7 @@ type SmtpSettings struct {
KeyFile
string
KeyFile
string
FromAddress
string
FromAddress
string
FromName
string
FromName
string
EhloIdentity
string
SkipVerify
bool
SkipVerify
bool
SendWelcomeEmailOnSignUp
bool
SendWelcomeEmailOnSignUp
bool
...
@@ -25,6 +26,7 @@ func readSmtpSettings() {
...
@@ -25,6 +26,7 @@ func readSmtpSettings() {
Smtp
.
KeyFile
=
sec
.
Key
(
"key_file"
)
.
String
()
Smtp
.
KeyFile
=
sec
.
Key
(
"key_file"
)
.
String
()
Smtp
.
FromAddress
=
sec
.
Key
(
"from_address"
)
.
String
()
Smtp
.
FromAddress
=
sec
.
Key
(
"from_address"
)
.
String
()
Smtp
.
FromName
=
sec
.
Key
(
"from_name"
)
.
String
()
Smtp
.
FromName
=
sec
.
Key
(
"from_name"
)
.
String
()
Smtp
.
EhloIdentity
=
sec
.
Key
(
"ehlo_identity"
)
.
String
()
Smtp
.
SkipVerify
=
sec
.
Key
(
"skip_verify"
)
.
MustBool
(
false
)
Smtp
.
SkipVerify
=
sec
.
Key
(
"skip_verify"
)
.
MustBool
(
false
)
emails
:=
Cfg
.
Section
(
"emails"
)
emails
:=
Cfg
.
Section
(
"emails"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment