Title: Available Lamson Commands

The following is also available by running *lamson help* and you can get the
help for each individual command with *lamson help -for COMMAND* replacing
COMMAND with one of these listed below.

The format for the printed options show default options as an actual setting,
and required options as a CAPITALIZED setting you must give.  For example, in the
*send* command:

<code>
lamson send -port 8825 -host 127.0.0.1 -debug 1 -sender EMAIL -to EMAIL -subject STR -body STR -file False
</code>

The options -port, -host, -debug, and -file have default settings, but -sender,
-to, -subject and -body require a STRing or EMAIL.  Notice also that -file
defaults to False which you can change by just including -file (that
toggles it true).


h3. start

Runs a lamson server out of the current directory:

<code>
lamson start -pid ./run/smtp.pid -FORCE False
</code>   
    
h3. send

Sends an email to someone as a test message.
See the sendmail command for a sendmail replacement.
    
<code>
lamson send -port 8825 -host 127.0.0.1 -debug 1 -sender EMAIL -to EMAIL -subject STR -body STR -file False
</code> 
    
h3. 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.

<code>
lamson sendmail -port 8825 -host 127.0.0.1 -debug 0 -- [recipients]
</code>   
    
h3. queue

Let's you do most of the operations available to a queue.

<code>
lamson queue (-pop | -get | -remove | -count | -clear | -keys) -name run/queue
</code>   
    
h3. restart

Simply attempts a stop and then a start command.  All options for both
apply to restart.

<code>
lamson restart -pid ./run/smtp.pid -FORCE False -KILL False
</code>   
    
h3. status

Prints out status information about lamson useful for finding out if it's
running and where.

<code>
lamson status -pid ./run/smtp.pid
</code>   
    
h3. gen

Generates various useful things for you to get you started.

<code>
lamson gen -project STR
</code>   
    
h3. deq

Runs a lamson dequeue server, which reads messages out of a queue and
processes them.

<code>
lamson deq -pid ./run/deq.pid -FORCE False -sleep 60
</code>   
    
h3. stop

Stops a running lamson server.  Give -KILL True to have it
stopped violently.  The PID file is removed after the 
signal is sent.  Give -ALL the name of a run directory and
it will stop all pid files it finds there.

<code>
lamson stop -pid ./run/smtp.pid -KILL False -ALL False
</code>   
    
h3. help

Prints out help for the commands. 

<code>
lamson help
</code>   

You can get help for one command with:

<code>
lamson help -for STR
</code>   
    
h3. syncdb

Creates the database and other stuff for Lamson.

<code>
lamson syncdb -create True
</code>
    
h3. log

Runs a logging only server on the given hosts and port

<code>
lamson log -port 8825 -host 127.0.0.1 -debug 1 -queue "" -pid ./run/log.pid
</code>   

Set -queue to the name of the queue to use.

