fix sa hook
This commit is contained in:
parent
58cc8c2365
commit
d3ca9dfa33
@ -8,6 +8,7 @@ import (
|
||||
"log"
|
||||
"net"
|
||||
"os/user"
|
||||
"strings"
|
||||
)
|
||||
|
||||
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 {
|
||||
return err
|
||||
}
|
||||
l = strings.TrimSpace(l)
|
||||
log.Println("SpamFilter:", l)
|
||||
if l == "\n" {
|
||||
if l == "" {
|
||||
_, err = io.CopyBuffer(out, r, buff[:])
|
||||
c.Close()
|
||||
out.Close()
|
||||
|
Reference in New Issue
Block a user