Skip to main content

tuna trigger smtp

Trigger command by incoming SMTP message.

The raw message is passed to the command's stdin, the envelope and headers are passed in environment variables:

TUNA_MAIL_FROM envelope sender (MAIL FROM)
TUNA_MAIL_TO envelope recipients (RCPT TO), comma separated
TUNA_MAIL_HEADER_<NAME> decoded header value, e.g. TUNA_MAIL_HEADER_SUBJECT
Usage
tuna trigger smtp [flags]
Examples
tuna trigger smtp /tmp/trigger.sh
tuna trigger smtp --listen-address 127.0.0.1:2525 /tmp/trigger.sh
FlagDescription
--api-key stringYour tuna.am api key with the tunnels:connect scope (env TUNA_API_KEY).
--cidr-allow stringReject connections that do not match the given CIDRs. Can be repeated.
--cidr-deny stringReject connections that match the given CIDRs. Can be repeated.
--listen-address stringLocal address of the SMTP server. Default: 127.0.0.1:1025.
--password stringPassword to use for authentication on SMTP server.
-p, --port stringPort for incoming connections.
--username stringUsername to use for authentication on SMTP server.
-l, --location stringDeprecated in 0.39: new names and ports are created in the global zone and need no location. If your name or port is reserved in the ru or nl zone, keep the location: the tunnel connects as before.
--token stringDeprecated in 0.39: use --api-key instead.

Global flags work too.

History​

0.39.0Added the --api-key flag.
Deprecated the --location flag: new names and ports are created in the global zone and need no location. If your name or port is reserved in the ru or nl zone, keep the location: the tunnel connects as before.
Deprecated the --token flag: use --api-key instead.
0.36.0Added the --listen-address flag.
0.25.0Added the --cidr-allow and --cidr-deny flags.