Example #1
0
def test_cleanse_incoming():
    msg = mail.MailRequest('fakepeer', from_marketroid['from'],
                           from_marketroid['to'], str(from_marketroid))

    reply = filter.cleanse_incoming(msg, user_id, host).to_message()
    assert_equal(reply['from'], marketroid)
    assert_equal(reply['to'], user)
    assert_equal(reply['reply-to'], mk_anon_addr)
Example #2
0
def test_cleanse_incoming():
    msg = mail.MailRequest('fakepeer', from_marketroid['from'],
                           from_marketroid['to'], str(from_marketroid))

    reply = filter.cleanse_incoming(msg, user_id, host).to_message()
    assert_equal(reply['from'], marketroid)
    assert_equal(reply['to'], user)
    assert_equal(reply['reply-to'], mk_anon_addr)
Example #3
0
def START(message, user_id=None, host=None):
    if user_id:
        market_anon = addressing.mapping(message['from'], 'marketroid', host)

        reply = filter.cleanse_incoming(message, user_id, host, market_anon)
        relay.deliver(reply)

        return DEMARKETING
    else:
        CONFIRM.send(relay, "start", message, "mail/start_confirm.msg", locals())
        return CONFIRMING
Example #4
0
def START(message, user_id=None, host=None):
    if user_id:
        market_anon = addressing.mapping(message['from'], 'marketroid', host)

        reply = filter.cleanse_incoming(message, user_id, host, market_anon)
        relay.deliver(reply)

        return DEMARKETING
    else:
        CONFIRM.send(relay, "start", message, "mail/start_confirm.msg",
                     locals())
        return CONFIRMING
Example #5
0
def DEMARKETING(message, user_id=None, host=None):
    reply = filter.cleanse_incoming(message, user_id, host)
    relay.deliver(reply)
    return DEMARKETING
Example #6
0
def DEMARKETING(message, user_id=None, host=None):
    reply = filter.cleanse_incoming(message, user_id, host)
    relay.deliver(reply)
    return DEMARKETING