Browse Source

add config options for HELO

tags/v0.9.99
Unknwon 9 years ago
parent
commit
c47afdff58
7 changed files with 61 additions and 47 deletions
  1. 1
    0
      .gopmfile
  2. 4
    0
      conf/app.ini
  3. 1
    1
      gogs.go
  4. 39
    39
      modules/bindata/bindata.go
  5. 11
    6
      modules/mailer/mailer.go
  6. 4
    0
      modules/setting/setting.go
  7. 1
    1
      templates/.VERSION

+ 1
- 0
.gopmfile View File

github.com/macaron-contrib/toolbox = commit:acbfe36e16 github.com/macaron-contrib/toolbox = commit:acbfe36e16
github.com/mattn/go-sqlite3 = commit:e28cd440fa github.com/mattn/go-sqlite3 = commit:e28cd440fa
github.com/microcosm-cc/bluemonday = commit:fcd0f5074e github.com/microcosm-cc/bluemonday = commit:fcd0f5074e
github.com/msteinert/pam =
github.com/nfnt/resize = commit:53e9ca890b github.com/nfnt/resize = commit:53e9ca890b
github.com/russross/blackfriday = commit:6928e11ecd github.com/russross/blackfriday = commit:6928e11ecd
github.com/shurcooL/go = commit:bc30a0bd33 github.com/shurcooL/go = commit:bc30a0bd33

+ 4
- 0
conf/app.ini View File

; QQ: smtp.qq.com:25 ; QQ: smtp.qq.com:25
; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used. ; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used.
HOST = HOST =
; Disable HELO operation when hostname are different.
DISABLE_HELO =
; Custom hostname for HELO operation, default is from system.
HELO_HOSTNAME =
; Do not verify the certificate of the server. Only use this for self-signed certificates ; Do not verify the certificate of the server. Only use this for self-signed certificates
SKIP_VERIFY = SKIP_VERIFY =
; Use client certificate ; Use client certificate

+ 1
- 1
gogs.go View File

"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"
) )


const APP_VER = "0.6.1.0327 Beta"
const APP_VER = "0.6.1.0703 Beta"


func init() { func init() {
runtime.GOMAXPROCS(runtime.NumCPU()) runtime.GOMAXPROCS(runtime.NumCPU())

+ 39
- 39
modules/bindata/bindata.go
File diff suppressed because it is too large
View File


+ 11
- 6
modules/mailer/mailer.go View File

return err return err
} }


hostname, err := os.Hostname()
if err != nil {
return err
}
if !setting.MailService.DisableHelo {
hostname := setting.MailService.HeloHostname
if len(hostname) == 0 {
hostname, err = os.Hostname()
if err != nil {
return err
}
}


if err = client.Hello(hostname); err != nil {
return err
if err = client.Hello(hostname); err != nil {
return err
}
} }


// If not using SMTPS, alway use STARTTLS if available // If not using SMTPS, alway use STARTTLS if available

+ 4
- 0
modules/setting/setting.go View File

Host string Host string
From string From string
User, Passwd string User, Passwd string
DisableHelo bool
HeloHostname string
SkipVerify bool SkipVerify bool
UseCertificate bool UseCertificate bool
CertFile, KeyFile string CertFile, KeyFile string
Host: sec.Key("HOST").String(), Host: sec.Key("HOST").String(),
User: sec.Key("USER").String(), User: sec.Key("USER").String(),
Passwd: sec.Key("PASSWD").String(), Passwd: sec.Key("PASSWD").String(),
DisableHelo: sec.Key("DISABLE_HELO").MustBool(),
HeloHostname: sec.Key("HELO_HOSTNAME").String(),
SkipVerify: sec.Key("SKIP_VERIFY").MustBool(), SkipVerify: sec.Key("SKIP_VERIFY").MustBool(),
UseCertificate: sec.Key("USE_CERTIFICATE").MustBool(), UseCertificate: sec.Key("USE_CERTIFICATE").MustBool(),
CertFile: sec.Key("CERT_FILE").String(), CertFile: sec.Key("CERT_FILE").String(),

+ 1
- 1
templates/.VERSION View File

0.6.1.0327 Beta
0.6.1.0703 Beta

Loading…
Cancel
Save