opensmtpd-go-filter-prepend

command module
v0.0.0-...-5336a71 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

README

Quality Gate Status

opensmtpd-go-filter-prepend

OpenSMTPD filter which prepends a string on email's subject if not present.
Works with OpenSMTPD 6.6 and 6.7.

Usage

  • build the filter for your target platform
    env GOOS=openbsd GOARCH=amd64 go build filter-prepend.go
  • make OpenSMTPD use the filter
filter prepend proc-exec "filter-prepend-go --prefix='[*EXT*]' --extraprefix='[EXT]'"
listen on em0 tls pki "*" filter { senderscore, rspamd, prepend }
  • default prefix is [*EXT*] if not specified on the CLI
  • default extraprefix is [EXT] if not specified on the CLI
    Be warned that a too generic prefix could match legitimate wording and thus it won't be added to the Subject
  • option --encode forces prefix encoding whether the subject is encoded or not.

Known limitations

  1. if Subject is too long and spans between multiple datalines, only the begining will be analyzed for prefix token
  2. RFC2047 Subject won't be decoded if 1/ happens inside an encoded string

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL