(accountName string, rcptTo string, msgMeta *module.MsgMetadata, hdr textproto.Header, body buffer.Buffer)
| 51 | } |
| 52 | |
| 53 | func (c *Check) IMAPFilter(accountName string, rcptTo string, msgMeta *module.MsgMetadata, hdr textproto.Header, body buffer.Buffer) (folder string, flags []string, err error) { |
| 54 | cmd, args := c.expandCommand(msgMeta, accountName, rcptTo, hdr) |
| 55 | |
| 56 | var buf bytes.Buffer |
| 57 | _ = textproto.WriteHeader(&buf, hdr) |
| 58 | bR, err := body.Open() |
| 59 | if err != nil { |
| 60 | return "", nil, err |
| 61 | } |
| 62 | |
| 63 | return c.run(cmd, args, io.MultiReader(bytes.NewReader(buf.Bytes()), bR)) |
| 64 | } |
| 65 | |
| 66 | func New(c *container.C, _, instName string) (module.Module, error) { |
| 67 | chk := &Check{ |
nothing calls this directly
no test coverage detected