Skip to content
Snippets Groups Projects
Commit 900b7ef3 authored by Stuart Gathman's avatar Stuart Gathman
Browse files

Setreply for rejectvirus.

parent d07e536f
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python #!/usr/bin/env python
# A simple milter that has grown quite a bit. # A simple milter that has grown quite a bit.
# $Log$ # $Log$
# Revision 1.11 2005/06/17 02:07:20 customdesigned
# Release 0.8.1
#
# Revision 1.10 2005/06/16 18:35:51 customdesigned # Revision 1.10 2005/06/16 18:35:51 customdesigned
# Ignore HeaderParseError decoding header # Ignore HeaderParseError decoding header
# #
...@@ -1181,6 +1184,8 @@ class bmsMilter(Milter.Milter): ...@@ -1181,6 +1184,8 @@ class bmsMilter(Milter.Milter):
if defanged: if defanged:
if self.rejectvirus and not self.hidepath: if self.rejectvirus and not self.hidepath:
self.log("REJECT virus from",self.mailfrom) self.log("REJECT virus from",self.mailfrom)
self.setreply('550','5.7.1','Attachment type not allowed.',
'You attempted to send an attachment with a banned extension.')
self.tempname = None self.tempname = None
return Milter.REJECT return Milter.REJECT
self.log("Temp file:",self.tempname) self.log("Temp file:",self.tempname)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment