fix sa hook
This commit is contained in:
parent
58cc8c2365
commit
d3ca9dfa33
@ -8,6 +8,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"os/user"
|
"os/user"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ErrSpamFilterNotEnabled = errors.New("spam filter access attempted when disabled")
|
var ErrSpamFilterNotEnabled = errors.New("spam filter access attempted when disabled")
|
||||||
@ -53,8 +54,9 @@ func (sp *SpamFilter) Rewrite(msg io.Reader, out io.WriteCloser) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
l = strings.TrimSpace(l)
|
||||||
log.Println("SpamFilter:", l)
|
log.Println("SpamFilter:", l)
|
||||||
if l == "\n" {
|
if l == "" {
|
||||||
_, err = io.CopyBuffer(out, r, buff[:])
|
_, err = io.CopyBuffer(out, r, buff[:])
|
||||||
c.Close()
|
c.Close()
|
||||||
out.Close()
|
out.Close()
|
||||||
|
Reference in New Issue
Block a user