You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks more complicated than it is because both styles of header need to be specified (in the message file and the mime headers). It may work with just the one in some curl versions. It also requires listening on port 465.
Any unrecognized flag, such as --help, will show the help.
smtprelay --help
Usage of smtprelay:
-allowed_nets string
Networks allowed to send mails (default "127.0.0.0/8 ::1/128")
-allowed_recipients string
Regular expression for valid TO EMail addresses
-allowed_sender string
Regular expression for valid FROM EMail addresses
-allowed_users string
Path to file with valid users/passwords
-command string
Path to pipe command
-config string
Path to config file (ini format)
-data_timeout string
Socket timeout for DATA command (default "5m")
-hostname string
Server hostname (default "localhost.localdomain")
-listen string
Address and port to listen for incoming SMTP (default "127.0.0.1:25 [::1]:25")
-local_cert string
SSL certificate for STARTTLS/TLS
-local_forcetls
Force STARTTLS (needs local_cert and local_key)
-local_key string
SSL private key for STARTTLS/TLS
-log_format string
Log output format (default "default")
-log_level string
Minimum log level to output (default "info")
-logfile string
Path to logfile
-max_connections int
Max concurrent connections, use -1 to disable (default 100)
-max_message_size int
Max message size in bytes (default 10240000)
-max_recipients int
Max RCPT TO calls for each envelope (default 100)
-read_timeout string
Socket timeout for read operations (default "60s")
-remotes string
Outgoing SMTP servers
-strict_sender
Use only SMTP servers with Sender matches to From
-version
Show version information
-welcome_msg string
Welcome message for SMTP session
-write_timeout string
Socket timeout for write operations (default "60s")
error: error parsing commandline arguments: flag provided but not defined: -help
Since this doesn't have docs on godoc, or usage in the README, I'm just adding some here while I figure out how to use this.
smtprelay -config ~/.config/smtprelay/smtprelay.ini
Test with curl
This looks more complicated than it is because both styles of header need to be specified (in the message file and the mime headers). It may work with just the one in some curl versions. It also requires listening on port 465.
Help
Any unrecognized flag, such as
--help
, will show the help.Config File / ENVs
This is the example config file:
https://github.com/decke/smtprelay/blob/master/smtprelay.ini
It can be converted to a the more webdev-friendly ENV format simply by using
SMTPRELAY_*
with the config options in upper case.Build
git clone pushd ./ go build -o ./smtprelay ./
Bcrypt Passwords
There's a bcrypt hasher in
./cmd/hasher.go
Simple Example
Moved to #149
The text was updated successfully, but these errors were encountered: