mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-09 17:55:57 +00:00
smtpsrv: Use spf.CheckHostWithSender
The spf library has gained support for macros, but to process them properly, a new function needs to be called with the full sender address, spf.CheckHostWithSender. This patch updates chasquid's calls to the new API.
This commit is contained in:
@@ -439,8 +439,8 @@ func (c *Conn) checkSPF(addr string) (spf.Result, error) {
|
||||
}
|
||||
|
||||
if tcp, ok := c.conn.RemoteAddr().(*net.TCPAddr); ok {
|
||||
res, err := spf.CheckHost(
|
||||
tcp.IP, envelope.DomainOf(addr))
|
||||
res, err := spf.CheckHostWithSender(
|
||||
tcp.IP, envelope.DomainOf(addr), addr)
|
||||
|
||||
c.tr.Debugf("SPF %v (%v)", res, err)
|
||||
spfResultCount.Add(string(res), 1)
|
||||
|
||||
Reference in New Issue
Block a user