summaryrefslogtreecommitdiff
path: root/src/mailman/runners/lmtp.py
Commit message (Collapse)AuthorAgeFilesLines
* Port to aiosmtpd 1.0a5Barry Warsaw2017-04-061-12/+8
|
* Handle PEP 475 fallout.Barry Warsaw2017-01-281-4/+7
| | | | | | | | | | | | | | | Closes #255 As of Python 3.5, PEP 475 gets in our way. Runners with long time.sleep()'s in their _snooze() method (e.g. the retry runner) will have their system call implemented time.sleep() automatically retried at the C layer. The only reliable way to prevent this is to raise an exception in the signal handler. The standard run() method automatically suppresses this exception, meaning, it's caught and ignored, but effectively breaks the run() loop, which is just what we want. The lmtp and rest runners implement their own run loops, so they also have to handle this exception, by ignoring it.
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Remove some unused imports.Barry Warsaw2016-11-301-2/+0
|
* Finish configuring flufl.testing.Barry Warsaw2016-11-301-4/+3
| | | | Also, use the better way to set the LMTP ident.
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* Use aiosmtpd 1.0a3 and add NEWS.Barry Warsaw2016-11-241-14/+3
|
* Replace smtpd with aiosmtpd.Barry Warsaw2016-11-241-60/+48
|
* Clean up the runners directory.Barry Warsaw2016-03-251-14/+7
|
* Super duper.Barry Warsaw2016-01-261-1/+1
| | | | | * Python 3-ify super() calls. * Remove a bunch of obsolete exception classes.
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Allow list names to have command suffixesAurélien Bompard2015-11-291-0/+6
| | | | | | Fixes #168 Minor style fixes and add another test.
* Don't decode bytes in smtpd. Pass them through to the email package so it canBarry Warsaw2015-09-071-3/+3
| | | | convert them from bytes to message objects.
* Vendorize Python 3.5's smtpd module, which properly handles non-UTF-8 byteBarry Warsaw2015-09-071-4/+13
| | | | input. Use this version only for Python 3.4.
* Turn off tying the -E test suite option to debugging the database logger.Barry Warsaw2015-08-181-1/+1
| | | | | | | SQLAlchemy is generally pretty chatty and usually not necessary to debug. Set use_poll=True in asyncore.loop() which improves Python 3.5 compatibility. We were getting OSErrors in stop() when using select under Python 3.5.
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-5/+1
|
* Fix mta and lmtp tests.Barry Warsaw2014-12-171-5/+5
|
* Use listid instead of (fqdn) listname in the metadata pickle.Barry Warsaw2014-12-151-4/+5
| | | | | | load_external() now always opens in utf-8 mode. More test repair.
* * Read the .cfg files not as bytes any more, but as UTF-8 encoding files.Barry Warsaw2014-12-151-3/+7
| | | | | | | | | * Revert LP: #1170347 to not .as_string() the message being added the mailbox, because Python 3.4 handles this properly by default. Fix up some lmtp code, though I don't thinkk it's quite right yet. Fix handler tests.
* Bump copyright years.Barry Warsaw2014-01-011-1/+1
|
* * `bin/runner` command has been simplified and its command line optionsBarry Warsaw2013-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | reduced. Now, only one `-r/--runner` option may be provided and the round-robin feature has been removed. * Fixed REST server crash on `reopen` command. Identification and test provided by Aurélien Bompard. (LP: #1184376) Also: * bin/runner now uses standard argparse instead of ScriptOptions. * The entire bin/runner machinery has bee reorganized and simplified. There * is no more Loop class. Signal setting is moved directly into the base Runner class and overrided in specific subclasses (e.g. RESTRunner which must cleanly shutdown its TCPServer). The runner exit status is now set directly on the Runner instance. * Fixed a few minor style issues. * In order to cleanly shutdown the RESTRunner's WSGI server, we must start a subthread which only watches for an Event and then calls the server's shutdown() method. It has to be this way because the WSGI server itself (due to interactions with SQLite), and the signal handlers (due to Python's signal handling semantics) must both run in the main thread. However, the shutdown() must be invoked from a subthread in order to prevent deadlock. * Refactor the RESTLayer to eliminate duplication of code.
* * Non-queue runners should not create ``var/queue`` subdirectories. Fixed byBarry Warsaw2013-01-201-0/+3
|\ | | | | | | Sandesh Kumar Agrawal. (LP: #1095422)
| * Test added to non_queue_runner bugSandesh Kumar Agrawal2013-01-171-3/+3
| |
| * LMTP runner will reject message with duplicate idsSandesh Kumar Agrawal2013-01-111-0/+5
|/
* Bump copyright years.Barry Warsaw2013-01-011-1/+1
|
* - Modernize the module by using future imports. Some byte literals areBarry Warsaw2012-04-221-8/+19
| | | | required due to the SMTP protocol.
* Rename mailman.database.transaction.txn to ...transactional. Modernize theBarry Warsaw2012-04-201-2/+2
| | | | module, and use it in another convenient place.
* ArchitectureBarry Warsaw2012-03-261-1/+5
| | | | | | | | | | | | | | | | | | | ------------ * Internally, all datetimes are kept in the UTC timezone, however because of LP: #280708, they are stored in the database in naive format. * `received_time` is now added to the message metadata by the LMTP runner instead of by `Switchboard.enqueue()`. This latter no longer depends on `received_time` in the metadata. * The `ArchiveRunner` no longer acquires a lock before it calls the individual archiver implementations, since not all of them need a lock. If they do, the implementations must acquire said lock themselves. Configuration ------------- * New configuration variables `clobber_date` and `clobber_skew` supported in every `[archiver.<name>]` section. These are used to determine under what circumstances a message destined for a specific archiver should have its `Date:` header clobbered.
* * The LMTP server now requires that the incoming message have a `Message-ID`,Barry Warsaw2012-03-131-5/+12
| | | | | | | | | | | otherwise it rejects the message with a 550 error. Also, the LMTP server adds the `X-Message-ID-Hash` header automatically. The `inject` cli command will also add the `X-Message-ID-Hash` header, but it will craft a `Message-ID` header first if one is missing from the injected text. Also, `inject` will always set the correct value for the `original_size` attribute on the message object, instead of trusting a possibly incorrect value if it's already set. The individual `IArchiver` implementations no longer set the `X-Message-ID-Hash` header.
* Fix header/footer interpolations when personalizing messages.Barry Warsaw2012-03-051-6/+7
| | | | | | | | | | | | | | | | | | - When doing individual deliveries, insert a 'member' key into the copy of the metadata dictionary for this recipient's delivery. This will contain the IMember of the recipient, if the recipient is a member of the mailing list. There will still be a 'recipient' key which will contain just the email address to deliver the message to. - Remove $user_password from header/footer placeholders. - Remove the 'personalize' key from the metadata dictionary and change decorate.process() to search only for the 'member' key. No need for both of them and the 'member' key contains more information. Plus, it allows us to do a more efficient member query in the delivery module some time in the future. - Move some of the LMTP log messages from mailman.runner to mailman.smtp.
* copybumpBarry Warsaw2012-01-011-1/+1
|
* Major terminology shift:Barry Warsaw2011-06-011-4/+4
| | | | | | | | | | | | | | | | | * Queue runners are now called just 'Runners' since several of them don't manage queue directories. * Ban the term 'qrunner' too. * The master queue runner watcher should now just be called the 'master' or the 'master runner'. * bin/qrunner -> bin/runner * mailman.qrunner log file -> mailman.runner * master-qrunner.lck -> master.lck * master-qrunner.pid -> master.pid Also: * Remove some obsolete files * Begin the .txt -> .rst renaming
* Rename 'queue' directory to 'runners' since not all subprocesses run a queue.Barry Warsaw2011-05-291-0/+236