Make receiver hostname configurable via --receiver-hostname flag
Remove the package-level global hostname from parser.go. Adds a log warning when the last Received hop doesn't match the expected receiver hostname. Bug: https://github.com/happyDomain/happydeliver/issues/11
This commit is contained in:
parent
71e0832416
commit
76ee50a100
18 changed files with 53 additions and 40 deletions
|
|
@ -43,6 +43,7 @@ type ReportGenerator struct {
|
|||
|
||||
// NewReportGenerator creates a new report generator
|
||||
func NewReportGenerator(
|
||||
receiverHostname string,
|
||||
dnsTimeout time.Duration,
|
||||
httpTimeout time.Duration,
|
||||
rbls []string,
|
||||
|
|
@ -50,7 +51,7 @@ func NewReportGenerator(
|
|||
checkAllIPs bool,
|
||||
) *ReportGenerator {
|
||||
return &ReportGenerator{
|
||||
authAnalyzer: NewAuthenticationAnalyzer(),
|
||||
authAnalyzer: NewAuthenticationAnalyzer(receiverHostname),
|
||||
spamAnalyzer: NewSpamAssassinAnalyzer(),
|
||||
rspamdAnalyzer: NewRspamdAnalyzer(),
|
||||
dnsAnalyzer: NewDNSAnalyzer(dnsTimeout),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue