コード例 #1
0
def createDatabase(s):
    """
    Create an account in the given store and install a MailTransferAgent on
    both the given store and the substore for that account.
    """
    loginSystem = LoginSystem(store=s)
    loginSystem.installOn(s)

    mta = MailTransferAgent(store=s)
    mta.installOn(s)
コード例 #2
0
def main():
    s, userStore = initializeStore()

    MailTransferAgent(store=userStore).installOn(userStore)
    MailTransferAgent(store=s, portNumber=12345).installOn(s)

    StoppingMessageFilter(store=userStore,
                          totalMessages=TOTAL_MESSAGES).installOn(userStore)

    smtpclient = FilePath(__file__).sibling('smtpclient.tac')
    system("SMTP_SERVER_PORT=%d "
           "SMTP_MESSAGE_COUNT=%d "
           "SMTP_RECIPIENT_ADDRESS=%s "
           "twistd -y %s" %
           (12345, TOTAL_MESSAGES, "testuser@localhost", smtpclient.path))
    start()
    system("axiomatic -d wholesystem.axiom start -n")
    stop()
    system("kill `cat twistd.pid`")
コード例 #3
0
def createDatabase(store):
    """
    Create a MailTransferAgent with both SMTP and SMTP/SSL configured in the
    given Store.
    """
    mta = MailTransferAgent(store=store,
                            portNumber=5025,
                            securePortNumber=5465,
                            certificateFile='server.pem',
                            messageCount=432,
                            domain='example.net')
    store.dbdir.child('server.pem').setContent('--- PEM ---\n')
    installOn(mta, store)
コード例 #4
0
def createDatabase(s):
    """
    Create an account in the given store and install a MailTransferAgent on
    both the given store and the substore for that account.
    """
    Scheduler(store=s).installOn(s)

    loginSystem = LoginSystem(store=s)
    loginSystem.installOn(s)

    mta = MailTransferAgent(store=s)
    mta.installOn(s)

    account = loginSystem.addAccount(u'testuser', u'localhost', None)
    subStore = account.avatars.open()
    SubScheduler(store=subStore).installOn(subStore)
    mda = MailTransferAgent(store=subStore)
    mda.installOn(subStore)
コード例 #5
0
ファイル: stub_mta1to2.py プロジェクト: pombredanne/quotient
def createDatabase(s):
    """
    Create an account in the given store and install a MailTransferAgent on
    both the given store and the substore for that account.
    """
    Scheduler(store=s).installOn(s)

    loginSystem = LoginSystem(store=s)
    loginSystem.installOn(s)

    mta = MailTransferAgent(store=s)
    mta.installOn(s)

    account = loginSystem.addAccount(u'testuser', u'localhost', None)
    subStore = account.avatars.open()
    SubScheduler(store=subStore).installOn(subStore)
    mda = MailTransferAgent(store=subStore)
    mda.installOn(subStore)