Milter support for chgfrom.

This commit is contained in:
Stuart Gathman
2008-11-23 03:06:47 +00:00
parent f12bcf9af9
commit 368ffd5374
2 changed files with 9 additions and 3 deletions
+5 -2
View File
@@ -112,8 +112,8 @@ class Milter:
def chgheader(self,field,idx,value): def chgheader(self,field,idx,value):
return self.__ctx.chgheader(field,idx,value) return self.__ctx.chgheader(field,idx,value)
def addrcpt(self,rcpt): def addrcpt(self,rcpt,params=None):
return self.__ctx.addrcpt(rcpt) return self.__ctx.addrcpt(rcpt,params)
def delrcpt(self,rcpt): def delrcpt(self,rcpt):
return self.__ctx.delrcpt(rcpt) return self.__ctx.delrcpt(rcpt)
@@ -121,6 +121,9 @@ class Milter:
def replacebody(self,body): def replacebody(self,body):
return self.__ctx.replacebody(body) return self.__ctx.replacebody(body)
def chgfrom(self,sender,params=None):
return self.__ctx.chgfrom(sender,params)
# When quarantined, a message goes into the mailq as if to be delivered, # When quarantined, a message goes into the mailq as if to be delivered,
# but delivery is deferred until the message is unquarantined. # but delivery is deferred until the message is unquarantined.
def quarantine(self,reason): def quarantine(self,reason):
+4 -1
View File
@@ -35,6 +35,9 @@ $ python setup.py help
libraries=["milter","smutil","resolv"] libraries=["milter","smutil","resolv"]
* $Log$ * $Log$
* Revision 1.12 2008/11/21 20:42:52 customdesigned
* Support smfi_chgfrom and smfi_addrcpt_par.
*
* Revision 1.11 2007/09/25 02:26:29 customdesigned * Revision 1.11 2007/09/25 02:26:29 customdesigned
* Update license. * Update license.
* *
@@ -1031,7 +1034,7 @@ milter_chgfrom(PyObject *self, PyObject *args) {
SMFICTX *ctx; SMFICTX *ctx;
PyThreadState *t; PyThreadState *t;
if (!PyArg_ParseTuple(args, "sz:chgfrom", &sender, &params)) if (!PyArg_ParseTuple(args, "s|z:chgfrom", &sender, &params))
return NULL; return NULL;
ctx = _find_context(self); ctx = _find_context(self);
if (ctx == NULL) return NULL; if (ctx == NULL) return NULL;