smtpRelay

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: MIT Imports: 7 Imported by: 0

README

smtpRelay

small SMTP relay

Go Report Card

Download binary

example config.ini

# Db for queue emails
QueueDbDialect = "mssql"
QueueDbConnect = "server=127.0.0.1;user id=SmtpRelayLog;password=pa55w0rd;database=SmtpRelayLog;connection timeout=300"

# Db for log
StatusDbDialect = "mssql"
StatusDbConnect = "server=127.0.0.1;user id=SmtpRelayLog;password=pa55w0rd;database=SmtpRelayLog;connection timeout=300"

Hostname = "localhost" # hostname for HELO, if blank, then get mashine hostname

AllowIP = ["127.0.0.1", "192.168.1.20"] # allow sender IP

AllowDomains = ["dmbasis.ru"] # allow send email domain

SMTPListenAddr = ":2500" # SMTP server listen on (example: "127.0.0.1:2500")

SendStream = 10
ResendStream = 2

MaxRepeatSend = 2
RepeatIntervalMinutes = 5

Debug = false

execute with default config file ./config ini

./smtpRelay

or change config file path

./smtpRelay -c /path/to/youconfig.ini

For run as service in Windows use NSSM

in log database create table "statuses" structure

id queued_at sending_at from rcpt message_type message_id status

message_type is string from "X-Postmaster-Msgtype" header

message_id is string from "Message-Id" header

in queue database create table "queues" structure

id created_at updated_at message_type message_id from from_hostname rcpt rcpt_hostname data repeat later_status

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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