Ticket #5922: twistd-mail-usage-5922.patch

File twistd-mail-usage-5922.patch, 1.6 KB (added by Richard Wall, 8 years ago)

A slightly more verbose documentation update

  • twisted/mail/tap.py

    === modified file 'twisted/mail/tap.py'
     
    6666                               "certificate" : usage.CompleteFiles("*.pem")}
    6767                   )
    6868
    69     longdesc = "This creates a mail.tap file that can be used by twistd."
     69    longdesc = """
     70An SMTP / POP3 email server plugin for twistd.
     71
     72Examples:
     73
     741. SMTP and POP server
     75
     76   twistd mail -d example.com=/tmp/example.com -u joe=password
     77
     78   Starts an SMTP server that only accepts emails to joe@example.com
     79   and saves them to /tmp/example.com.
     80
     81   Also starts a POP mail server which will allow a client to log in
     82   using username: joe@example.com and password: password and collect
     83   any email that has been saved in /tmp/example.com.
     84
     85
     86
     872. SMTP relay
     88
     89   twistd mail --relay=/tmp/mail_queue
     90
     91   Starts an SMTP server that accepts emails to any email address and
     92   relays them to an appropriate remote SMTP server. Queued emails
     93   will be temporarily stored in /tmp/mail_queue.
     94"""
    7095
    7196    def __init__(self):
    7297        usage.Options.__init__(self)
     
    118143
    119144
    120145    def opt_maildirdbmdomain(self, domain):
    121         """generate an SMTP/POP3 virtual domain which saves to \"path\"
     146        """Generate an SMTP/POP3 virtual domain. This option requires
     147        an argument of the form 'NAME=PATH' where NAME is the DNS
     148        Domain Name for which email will be accepted and where PATH is
     149        a the filesystem path to a Maildir folder. [Example:
     150        'example.com=/tmp/example.com']
    122151        """
    123152        try:
    124153            name, path = domain.split('=')