mirror of
https://github.com/decke/smtprelay.git
synced 2026-11-06 16:01:35 -06:00
Discard mail if remote_host is not set
This is useful for test environments.
This commit is contained in:
1 parent
d1933a2e35
commit
20ca816160
3 files changed
+13
-2
No files matched your search
@@ -180,6 +180,12 @@ func mailHandler(peer smtpd.Peer, env smtpd.Envelope) error {
|
||||
"host": *remoteHost,
|
||||
"uuid": generateUUID(),
|
||||
})
|
||||
|
||||
if (*remoteHost == "") {
|
||||
logger.Warning("remote_host not set; discarding mail")
|
||||
return nil
|
||||
}
|
||||
|
||||
logger.Info("delivering mail from peer using smarthost")
|
||||
|
||||
var auth smtp.Auth
|
||||
|
||||
Reference in new issue
Block a user