Queue ProcessingΒΆ

This package ships with a command line application to send all the messages stored in a queue directory. It can be invoked periodically (e.g., via cron) or run as a background process.

$ zope-sendmail --help
usage: zope-sendmail [-h] [--daemon] [--interval <#secs>]
                     [--hostname HOSTNAME] [--port PORT] [--username USERNAME]
                     [--password PASSWORD] [--force-tls | --no-tls]
                     [--config <inifile>]
                     [maildir]

positional arguments:
  maildir              The path to the mail queue directory.If not given, it
                       must be found in the --config file.If given, this
                       overrides a value in the --config file

options:
  -h, --help           show this help message and exit
  --daemon             Run in daemon mode, periodically checking queue and
                       sending messages. Default is to send all messages in
                       queue once and exit.
  --interval <#secs>   How often to check queue when in daemon mode. Default
                       is 3 seconds.
  --config <inifile>   Get configuration from specified ini file; it must
                       contain a section [app:zope-sendmail] that can contain
                       the following keys: interval, hostname, port, username,
                       password, force_tls, no_tls, queue_path. If you specify
                       the queue path in the ini file, you don't need to
                       specify it on the command line. With the exception of
                       the queue path, options specified in the ini file
                       override options on the command line.

SMTP Server:
  Connection information for the SMTP server

  --hostname HOSTNAME  Name of SMTP host to use for delivery. Default is
                       localhost.
  --port PORT          Which port on SMTP server to deliver mail to. Default
                       is 25.
  --force-tls          Do not connect if TLS is not available. Not enabled by
                       default.
  --no-tls             Do not use TLS even if is available. Not enabled by
                       default.

Authentication:
  Authentication information for the SMTP server. If one is provided, they
  must both be. One or both can be provided in the --config file.

  --username USERNAME  Username to use to log in to SMTP server. Default is
                       none.
  --password PASSWORD  Password to use to log in to SMTP server. Must be
                       specified if username is specified.