コード例 #1
0
ファイル: maildir.py プロジェクト: katrinleinweber/songclub
    def __init__(self, root, postmaster=0):
        """Initialize

        The first argument is where the Domain directory is rooted.
        The second is whether non-existing addresses are simply
        forwarded to postmaster instead of outright bounce

        The directory structure of a MailddirDirdbmDomain is:

        /passwd <-- a dirdbm file
        /USER/inbox/{cur,new,del} <-- each user has these three directories
        """
        AbstractMaildirDomain.__init__(self, root)
        self.dbm = dirdbm.open(os.path.join(root, 'passwd'))
        self.postmaster = postmaster
コード例 #2
0
ファイル: maildir.py プロジェクト: seraph0017/twisted
    def __init__(self, service, root, postmaster=0):
        """
        @type service: L{MailService}
        @param service: An email service.

        @type root: L{bytes}
        @param root: The maildir root directory.

        @type postmaster: L{bool}
        @param postmaster: A flag indicating whether non-existent addresses
            should be forwarded to the postmaster (C{True}) or
            bounced (C{False}).
        """
        AbstractMaildirDomain.__init__(self, service, root)
        dbm = os.path.join(root, 'passwd')
        if not os.path.exists(dbm):
            os.makedirs(dbm)
        self.dbm = dirdbm.open(dbm)
        self.postmaster = postmaster
コード例 #3
0
ファイル: maildir.py プロジェクト: 0004c/VTK
    def __init__(self, service, root, postmaster=0):
        """
        @type service: L{MailService}
        @param service: An email service.

        @type root: L{bytes}
        @param root: The maildir root directory.

        @type postmaster: L{bool}
        @param postmaster: A flag indicating whether non-existent addresses
            should be forwarded to the postmaster (C{True}) or
            bounced (C{False}).
        """
        AbstractMaildirDomain.__init__(self, service, root)
        dbm = os.path.join(root, 'passwd')
        if not os.path.exists(dbm):
            os.makedirs(dbm)
        self.dbm = dirdbm.open(dbm)
        self.postmaster = postmaster
コード例 #4
0
ファイル: test_dirdbm.py プロジェクト: stjordanis/twisted
 def setUp(self):
     self.path = FilePath(self.mktemp())
     self.dbm = dirdbm.open(self.path.path)
     self.items = ((b"abc", b"foo"), (b"/lalal", b"\000\001"), (b"\000\012",
                                                                b"baz"))
コード例 #5
0
ファイル: test_dirdbm.py プロジェクト: ssilverek/kodb
 def setUp(self):
     self.path = self.mktemp()
     self.dbm = dirdbm.open(self.path)
     self.items = (("abc", "foo"), ("/lalal", "\000\001"), ("\000\012", "baz"))
コード例 #6
0
 def setUp(self):
     self.path = self.mktemp()
     self.dbm = dirdbm.open(self.path)
     self.items = (('abc', 'foo'), ('/lalal', '\000\001'), ('\000\012',
                                                            'baz'))
コード例 #7
0
ファイル: test_dirdbm.py プロジェクト: Almad/twisted
 def setUp(self):
     self.path = self.mktemp()
     self.dbm = dirdbm.open(self.path)
     self.items = (('abc', 'foo'), ('/lalal', '\000\001'), ('\000\012', 'baz'))
コード例 #8
0
ファイル: test_dirdbm.py プロジェクト: Adii78560/pythoncodes
 def setUp(self):
     self.path = FilePath(self.mktemp())
     self.dbm = dirdbm.open(self.path.path)
     self.items = ((b'abc', b'foo'), (b'/lalal', b'\000\001'), (b'\000\012', b'baz'))