putmail.py(1)

NAME

putmail.py - SMTP client

SYNTAX

putmail.py [option...] recipient...

DESCRIPTION

putmail.py is a very lightweight MTA or SMTP client that may replace the sendmail command when used by MUAs that lack SMTP support.

Usually, putmail.py is not called directly from the command line. Instead, programs are configured to deliver mail using putmail.py. It accepts all the options sendmail does, but ignores most of them. You can find all the options in the COMMAND LINE OPTIONS section.

The program reads an e-mail message from standard input and tries to deliver it to the specified recipients using the apropiate configuration file, which is

    $HOME/.putmail/putmailrc

by default. As you see, configuration files are per-user. For security reasons, you may want to set permissions so only you have access to the configuration directory.

The exact configuration file name is chosen according to the address used in the From header of the e-mail message, which allows you to have several configuration files and bind SMTP servers to e-mail addresses.

For example, if the e-mail message looks like:

    (headers...)
    From: Joe User <juser@example.com>
    (headers...)

    (message contents...)

The program will try to use the file

    $HOME/.putmail/juser@example.com

If that file is not available, it will fall back to the default one.

Any errors and warnings are printed to standard error and also to the log file named

    $HOME/.putmail/putmail.log

except for the error message about the HOME environment variable not present, for obvious reasons.

CONFIGURATION FILE

Configuration files have the same format as INI files. They must have a section named config and, at least, two options: server and email. Those set the SMTP server to use and the envelope from address used when contacting the server. It is a good idea to set this to the same address you use in the From header of the e-mail message, but not strictly necessary. putmail.py will not change the From header. Example:

    [config]
    server = smtp.example.com
    email = user@example.com

Please note that the text indentation in the example should not be present in the real file, where all the lines should start at column number 1. You can authenticate to the SMTP server and use TLS indicating more options. This is the complete list:

server
    The SMTP server to use.

email
    The envelope from address used when contacting with the server.

username
    The username used when authenticating to the SMTP server. You must, then, indicate a password with the password option. By default no authentication is used.

password
    The password used when authenticating to the SMTP server.

port
    The server port. The default value is 25.

tls Boolean option to enable or disable TLS. It is disabled by default or when its value is no, 0, off or false. Set it to yes, 1, on or true to enable TLS.

quiet
    Boolean option, disabled by default. When active, errors and warnings related to communication with the SMTP server will not be printed on screen. See the tls option for possible values. Use it with care and once you know your configuration works. In most cases this will not be needed. However, sometimes warnings about improper connection shutdown can get really annoying. Errors related to malformed configuration files, absence of message recipients and others will still be printed.

COMMAND LINE OPTIONS

--  Marks end of options. Remaining arguments are recipients.

-t  Take recipients from the To, Cc and Bcc message headers.

-f from_address
    Use this address as the SMTP protocol envelope from address, replacing the email option in the configuration file.

And the following options are accepted but ignored:

-Ac
-Am
-ba
-bm
-bs
-bt
-bv
-bv
-G
-i
-n
-v
-bd
-bD
-bh
-bH
-bi
-bp
-bP
-q
-Q
-qf
-B argument
-C argument
-d argument
-D argument
-F argument
-h argument
-L argument
-N argument
-O argument
-p argument
-Q argument
-R argument
-r argument
-V argument
-X argument
-qG argument
-qI argument
-qQ argument
-qR argument
-qS argument
-q!I argument
-q!Q argument
-q!R argument
-q!S argument
-qtext
-qptext
-otext text

FILES

$HOME/.putmail/
    Configuration directory

$HOME/.putmail/putmailrc
    Default configuration file

$HOME/.putmail/putmail.log
    Log file for errors and warnings

ENVIRONMENT VARIABLES

HOME
    Specifies the home directory of the invoking user.

AUTHORS

Ricardo Garcia Gonzalez: http://sourceforge.net/users/rg3/

SEE ALSO

mutt(1) muttrc(5) nail(1) mail(1) sendmail(1)