Salmon commandline interface

salmon

Python mail server

salmon [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

blast

Given a Maildir, this command will go through each email and blast it at your server. It does nothing to the message, so it will be real messages hitting your server, not cleansed ones.

salmon blast [OPTIONS] MAILBOX

Options

--port <port>

port to connect to

--host <host>

address to connect to

--lmtp
--debug

debug mode

Arguments

MAILBOX

Required argument

cleanse

Uses Salmon mail cleansing and canonicalization system to take an input Maildir (or mbox) and replicate the email over into another Maildir. It’s used mostly for testing and cleaning.

salmon cleanse [OPTIONS] IN_MAILBOX OUT_MAILBOX

Arguments

IN_MAILBOX

Required argument

OUT_MAILBOX

Required argument

gen

Generates various useful things for you to get you started.

salmon gen [OPTIONS] PATH

Options

-f, --force

overwrite existing directories

Arguments

PATH

Required argument

log

Runs a logging only server on the given hosts and port. It logs each message it receives and also stores it to the run/queue so that you can make sure it was received in testing.

salmon log [OPTIONS]

Options

--port <port>

port to listen on

--host <host>

address to listen on

--chroot <chroot>

path to chroot

--chdir <chdir>

change to this directory when daemonising

--umask <umask>

set umask on server

--pid <pid>

path to pid file

-f, --force

force server to run, ignoring pid file

--debug

debug mode

--uid <uid>

run with this user id

--gid <gid>

run with this group id

--daemon, --no-daemon

start server as daemon (default)

queue

Lets you do most of the operations available to a queue.

salmon queue [OPTIONS] PATH

Options

--pop

pop a message from queue

--get <get>

get key from queue

--remove <remove>

remove chosen key from queue

--count

count messages in queue

--clear

clear queue

--keys

print queue keys

Arguments

PATH

Optional argument

routes

Prints out valuable information about an application’s routing configuration after everything is loaded and ready to go. Helps debug problems with messages not getting to your handlers. Path has the search paths you want separated by a ‘:’ character, and it’s added to the sys.path.

MODULE should be a configureation module and can be given multiple times.

salmon routes [OPTIONS] MODULE

Options

--path <path>

search path for modules

--test <test>

address to test against routing configuration

Arguments

MODULE

Required argument(s)

send

Sends an email to someone as a test message. See the sendmail command for a sendmail replacement.

salmon send [OPTIONS]

Options

--port <port>

Port to connect to

--host <host>

Host to connect to

--username <username>

SMTP username

--password <password>

SMTP password

--sender <sender>
--to <to>
--subject <subject>
--body <body>
--attach <attach>
--lmtp <lmtp>
--ssl <ssl>
--starttls <starttls>

sendmail

Used as a testing sendmail replacement for use in programs like mutt as an MTA. It reads the email to send on the stdin and then delivers it based on the port and host settings.

salmon sendmail [OPTIONS] RECIPIENTS...

Options

--port <port>

Port to connect to

--host <host>

Address to connect to

--lmtp

Use LMTP rather than SMTP

--debug

Debug mode

Arguments

RECIPIENTS

Required argument(s)

start

Runs a salmon server out of the current directory

salmon start [OPTIONS]

Options

--boot <boot>

module with server definition

--chroot <chroot>

path to chroot

--chdir <chdir>

change to this directory when daemonising

--umask <umask>

set umask on server

--pid <pid>

path to pid file

-f, --force

force server to run, ignoring pid file

--debug

debug mode

--uid <uid>

run with this user id

--gid <gid>

run with this group id

--daemon, --no-daemon

start server as daemon (default)

status

Prints out status information about salmon useful for finding out if it’s running and where.

salmon status [OPTIONS]

Options

--pid <pid>

path to pid file

stop

Stops a running salmon server

salmon stop [OPTIONS]

Options

--pid <pid>

path to pid file

-f, --force

force stop server

--all <all_pids>

stops all servers with .pid files in the specified directory