Documentation ¶
Index ¶
- Constants
- func AcceptMailFromAddresses(whitelist []string) msmtpd.SenderChecker
- func AcceptMailFromDomains(whitelist []string) msmtpd.SenderChecker
- func AcceptMailFromDomainsOrAddresses(whitelistedDomains, whitelistedAddresses []string) msmtpd.SenderChecker
- func IsResolvable(opts IsResolvableOptions) msmtpd.SenderChecker
- type IsResolvableOptions
Constants ¶
const IsNotResolvableComplain = "Seems like i cannot find your sender address mail servers using DNS, please, try again later"
IsNotResolvableComplain is human-readable thing we say to client with imaginary email address
Variables ¶
This section is empty.
Functions ¶
func AcceptMailFromAddresses ¶
func AcceptMailFromAddresses(whitelist []string) msmtpd.SenderChecker
AcceptMailFromAddresses is filter to accept emails only from predefined whilelist of addresses, it is more strict version of AcceptMailFromDomains which can accept email from every mailbox of domain
func AcceptMailFromDomains ¶
func AcceptMailFromDomains(whitelist []string) msmtpd.SenderChecker
AcceptMailFromDomains allows all senders from domain list provided
func AcceptMailFromDomainsOrAddresses ¶
func AcceptMailFromDomainsOrAddresses(whitelistedDomains, whitelistedAddresses []string) msmtpd.SenderChecker
AcceptMailFromDomainsOrAddresses allows senders either from one of whilelisted domain, or from one of whitelisted addresses. It is more complicated version of AcceptMailFromDomains and AcceptMailFromAddresses.
func IsResolvable ¶
func IsResolvable(opts IsResolvableOptions) msmtpd.SenderChecker
IsResolvable is msmtpd.SenderChecker checker that performs DNS validations to proof we can send answer back to sender's email address
Types ¶
type IsResolvableOptions ¶
type IsResolvableOptions struct { // FallbackToAddressRecord allows to delivery to 25th port of address resolved by A or AAAA // queries if MX records are not present // See https://en.wikipedia.org/wiki/MX_record#Fallback_to_the_address_record FallbackToAddressRecord bool // AllowLocalAddresses means we accept email from domains, which MX records are resolved // into local IP addresses according to https://rfc-editor.org/rfc/rfc1918.html (IPv4 addresses) and // https://rfc-editor.org/rfc/rfc4193.html (IPv6 addresses). // For example, MX for something.example.org are `mx.something.example.org 10`, and // A record for mx.something.example.org is 192.168.1.3 - it is unusual case for // internet, but common for local networks. AllowLocalAddresses bool // AllowMxRecordToBeIP allows MX records to contain bare IP addresses, its unsafe, but still used AllowMxRecordToBeIP bool // DomainsToTrust is whitelist of domains you consider resolvable - for example, this is // local domain of your company with MX server having local IP in local network, and // on the same time, they are reachable from external network by white IPs. // So, IsResolvable should allow senders from this domains to be used for MAIL FROM DomainsToTrust []string }
IsResolvableOptions are options for IsResolvable plugin, default values are recommended