Versions in this module Expand all Collapse all v0 v0.1.0 Mar 3, 2020 Changes in this version + const MsgIDTTL + const RedisAcctHeaders + const RedisQueue + const SparkPostIngestBatchMaxAge + const SparkPostIngestMaxPayload + const SparkPostMessageIDHeader + const TrackingPrefix + const XRealIPHeader + var TransparentGif = []byte(...) + func AccountETL(f io.Reader) error + func ActionToType(a string) string + func ConsoleAndLogFatal(s ...interface{}) + func Contains(arr []string, val string) bool + func DecodePath(s string) ([]byte, error) + func EncodeLink(encodeTrackingURL, encodeAction, encodeMessageID, encodeRcptTo, ... string, ...) (string, error) + func EncodePath(data []byte) (string, error) + func FeedEvents(client *redis.Client, host string, apiKey string, maxAge time.Duration) error + func FeedForever(client *redis.Client, host string, apiKey string, maxAge time.Duration) + func GetenvDefault(k string, d string) string + func HostCleanup(host string) string + func MakeSession(c *smtpproxy.Client, bkd *Backend) smtpproxy.Session + func MyLogger(filename string) + func MyRedis() (client *redis.Client) + func PositionIn(arr []string, val string) (int, bool) + func SafeStringToInt(s string) int + func SparkPostEventNDJSON(eStr string, client *redis.Client) ([]byte, error) + func SparkPostIngest(ingestData []byte, client *redis.Client, host string, apiKey string) error + func StoreEvent(r []string, client *redis.Client) error + func StoreHeaders(r []string, client *redis.Client) error + func TrackingServer(w http.ResponseWriter, req *http.Request) + func UniqMessageID() string + type Backend struct + func NewBackend(outHostPort string, verbose bool, upstreamDataDebug *os.File, wrap *Wrapper, ...) *Backend + func (bkd *Backend) Init() (smtpproxy.Session, error) + func (bkd *Backend) SetVerbose(v bool) + func (bkd *Backend) SetWrapper(wrap *Wrapper) + type GeoIP struct + City string + Country string + Latitude float64 + Longitude float64 + PostalCode string + Region string + Zip int + type IngestResult struct + Errors []struct{ ... } + Results struct{ ... } + type Session struct + func (s *Session) Auth(expectcode int, cmd, arg string) (int, string, error) + func (s *Session) Data(r io.Reader, w io.WriteCloser) (int, string, error) + func (s *Session) DataCommand() (io.WriteCloser, int, string, error) + func (s *Session) Greet(helotype string) ([]string, int, string, error) + func (s *Session) Mail(expectcode int, cmd, arg string) (int, string, error) + func (s *Session) Passthru(expectcode int, cmd, arg string) (int, string, error) + func (s *Session) Quit(expectcode int, cmd, arg string) (int, string, error) + func (s *Session) Rcpt(expectcode int, cmd, arg string) (int, string, error) + func (s *Session) Reset(expectcode int, cmd, arg string) (int, string, error) + func (s *Session) StartTLS() (int, string, error) + func (s *Session) Unknown(expectcode int, cmd, arg string) (int, string, error) + type SparkPostEvent struct + EventWrapper struct{ ... } + type TimedBuffer struct + Content []byte + MaxAge time.Duration + TimeStarted time.Time + func (t *TimedBuffer) AgedContent() bool + type TrackEvent struct + IPAddress string + TimeStamp string + UserAgent string + WD WrapperData + type Wrapper struct + URL url.URL + func NewWrapper(URL string, trackOpen, trackInitialOpen, trackLink bool) (*Wrapper, error) + func (wrap *Wrapper) Active() bool + func (wrap *Wrapper) HandleMessagePart(dst io.Writer, part io.Reader, cType string, cte string) error + func (wrap *Wrapper) InitialOpenPixel() string + func (wrap *Wrapper) MailCopy(dst io.Writer, src io.Reader) error + func (wrap *Wrapper) OpenPixel() string + func (wrap *Wrapper) ProcessMessageHeaders(h mail.Header) error + func (wrap *Wrapper) SetMessageInfo(msgID string, rcpt string) + func (wrap *Wrapper) TrackHTML(w io.Writer, r io.Reader) (int, error) + func (wrap *Wrapper) WrapURL(url string) string + type WrapperData struct + Action string + MessageID string + RcptTo string + TargetLinkURL string + func DecodeLink(urlStr string) ([]byte, WrapperData, string, error)