You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add config option to reject incoming deliveries with an error during the smtp transaction
useful when a catchall is configured, and messages to some address need to be
rejected.
would have been nicer if this could be part of a ruleset. but evaluating a
ruleset requires us to have the message (so we can match on headers, etc). but
we can't reject messages to individual recipients during the DATA command in
smtp. that would reject the entire delivery attempt.
for issue #156 by ally9335
Copy file name to clipboardExpand all lines: config/config.go
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -455,13 +455,18 @@ type JunkFilter struct {
455
455
}
456
456
457
457
typeDestinationstruct {
458
-
Mailboxstring`sconf:"optional" sconf-doc:"Mailbox to deliver to if none of Rulesets match. Default: Inbox."`
459
-
Rulesets []Ruleset`sconf:"optional" sconf-doc:"Delivery rules based on message and SMTP transaction. You may want to match each mailing list by SMTP MailFrom address, VerifiedDomain and/or List-ID header (typically <listname.example.org> if the list address is [email protected]), delivering them to their own mailbox."`
460
-
FullNamestring`sconf:"optional" sconf-doc:"Full name to use in message From header when composing messages coming from this address with webmail."`
458
+
Mailboxstring`sconf:"optional" sconf-doc:"Mailbox to deliver to if none of Rulesets match. Default: Inbox."`
459
+
Rulesets []Ruleset`sconf:"optional" sconf-doc:"Delivery rules based on message and SMTP transaction. You may want to match each mailing list by SMTP MailFrom address, VerifiedDomain and/or List-ID header (typically <listname.example.org> if the list address is [email protected]), delivering them to their own mailbox."`
460
+
SMTPErrorstring`sconf:"optional" sconf-doc:"If non-empty, incoming delivery attempts to this destination will be rejected during SMTP RCPT TO with this error response line. Useful when a catchall address is configured for the domain and messages to some addresses should be rejected. The response line must start with an error code. Currently the following error resonse codes are allowed: 421 (temporary local error), 550 (user not found). If the line consists of only an error code, an appropriate error message is added. Rejecting messages with a 4xx code invites later retries by the remote, while 5xx codes should prevent further delivery attempts."`
461
+
FullNamestring`sconf:"optional" sconf-doc:"Full name to use in message From header when composing messages coming from this address with webmail."`
461
462
462
463
DMARCReportsbool`sconf:"-" json:"-"`
463
464
HostTLSReportsbool`sconf:"-" json:"-"`
464
465
DomainTLSReportsbool`sconf:"-" json:"-"`
466
+
// Ready to use in SMTP responses.
467
+
SMTPErrorCodeint`sconf:"-" json:"-"`
468
+
SMTPErrorSecodestring`sconf:"-" json:"-"`
469
+
SMTPErrorMsgstring`sconf:"-" json:"-"`
465
470
}
466
471
467
472
// Equal returns whether d and o are equal, only looking at their user-changeable fields.
0 commit comments