Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/protocols/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyc


[XMc@sdZddlZddlZddlZddlmZddlmZddlmZm	Z	ddl
mZdZdZ
d	ejejfd
YZdejejfdYZd
ejfdYZdS(s1
Postfix mail transport agent related protocols.
iN(tbasic(tpolicies(tprotocoltdefer(tlogcCs
tj|S(N(turllibtquote(ts((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyRscCs
tj|S(N(Rtunquote(R((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyRstPostfixTCPMapServercBs\eZdZdZdZdZddZdZdZdZ	d	Z
d
ZRS(szPostfix mail transport agent TCP map protocol implementation.

    Receive requests for data matching given key via lineReceived,
    asks it's factory for the data with self.factory.get(key), and
    returns the data to the requester. None means no entry found.

    You can use postfix's postmap to test the map service::

    /usr/sbin/postmap -q KEY tcp:localhost:4242

    iXs
cCs|j|jdS(N(t
setTimeoutttimeout(tself((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pytconnectionMade*stcCs!|jd||pdfdS(s&Send an SMTP-like code with a message.s%3.3d %sRN(tsendLine(Rtcodetmessage((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pytsendCode-scCs|jy|jdd\}}Wntk
rE|}d}nXyt|d|}Wn!tk
r|jddn=Xy||Wn+|jdd|tjdfnXdS(Nitdo_isunknown commandsCommand %r failed: %s.(	tresetTimeouttsplittNonet
ValueErrortgetattrtAttributeErrorRtsystexc_info(Rtlinetrequesttparamstf((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pytlineReceived1s



cCse|dkr#|jdddn>tj|jj|}|j|j|j|j	t
jdS(NisCommand %r takes 1 parameters.tget(RRRt
maybeDeferredtfactoryR!taddCallbackst_cbGott_cbNott
addErrbackRterr(Rtkeytd((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pytdo_getBs
cCs|jd|jdS(Ni(RtgetErrorMessage(Rtfail((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyR&JscCs6|dkr|jdn|jdt|dS(Nii(RRR(Rtvalue((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyR%MscCs{|dkr#|jdddnTy|jdd\}}Wn%tk
rf|jdddnX|jdddS(NisCommand %r takes 2 parameters.tputiisput is not implemented yet.(RRRR(RtkeyAndValueR)R.((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pytdo_putSs
(t__name__t
__module__t__doc__Rt	delimiterR
RR R+R&R%R1(((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyR	s					tPostfixTCPMapDictServerFactorycBseZdZeZRS(s8An in-memory dictionary factory for PostfixTCPMapServer.(R2R3R4R	R(((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyR6_st'PostfixTCPMapDeferringDictServerFactorycBs)eZdZeZddZdZRS(s8An in-memory dictionary factory for PostfixTCPMapServer.cCs,i|_|dk	r(|jj|ndS(N(tdataRtupdate(RR8((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyt__init__js	cCstj|jj|S(N(RtsucceedR8R!(RR)((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyR!osN(R2R3R4R	RRR:R!(((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyR7es(R4RtUserDictRttwisted.protocolsRRttwisted.internetRRttwisted.pythonRRRtLineReceivertTimeoutMixinR	t
ServerFactoryR6R7(((s=/usr/lib/python2.7/dist-packages/twisted/protocols/postfix.pyt<module>s		E