~sambuddhabasu1/mailman/fix_mailman_run_error

« back to all changes in this revision

Viewing changes to src/mailman/mta/postfix.py

  • Committer: Barry Warsaw
  • Date: 2012-03-26 12:04:00 UTC
  • Revision ID: barry@list.org-20120326120400-jfezy6cg60ygod7k
Architecture
------------
 * 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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
import os
29
29
import logging
30
 
import datetime
31
30
 
32
31
from flufl.lock import Lock
33
32
from operator import attrgetter
38
37
from mailman.interfaces.listmanager import IListManager
39
38
from mailman.interfaces.mta import (
40
39
    IMailTransportAgentAliases, IMailTransportAgentLifecycle)
 
40
from mailman.utilities.datetime import now
41
41
 
42
42
 
43
43
log = logging.getLogger('mailman.error')
124
124
# file.  YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what you're
125
125
# doing, and can keep the two files properly in sync.  If you screw it up,
126
126
# you're on your own.
127
 
""".format(datetime.datetime.now().replace(microsecond=0))
 
127
""".format(now().replace(microsecond=0))
128
128
        sort_key = attrgetter('list_name')
129
129
        for domain in sorted(by_domain):
130
130
            print >> fp, """\