[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Add support for servers to have non-advertised exit cap...
Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria:/tmp/cvs-serv11492/lib/mixminion/server
Modified Files:
Modules.py
Log Message:
Add support for servers to have non-advertised exit capabilities.
Index: Modules.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/Modules.py,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- Modules.py 31 May 2004 15:09:02 -0000 1.75
+++ Modules.py 8 Dec 2005 06:56:46 -0000 1.76
@@ -1050,7 +1050,7 @@
...
When we receive a message send to 'addr', we deliver it to smtpaddr.
- """
+ """
##
# Fields:
# addresses: a map from address to SMTP address
@@ -1078,7 +1078,8 @@
'RemoveContact' : ('ALLOW', None, None),
'SMTPServer' : ('ALLOW', None, None),
'SendmailCommand' : ('ALLOW', "command", None),
- }
+ 'Advertise' : ('ALLOW', "boolean", "yes")
+ }
cfg.update(MailBase.COMMON_OPTIONS)
return { "Delivery/MBOX" : cfg }
@@ -1108,6 +1109,7 @@
return
sec = config['Delivery/MBOX']
+ self.advertise = sec.get('Advertise') #DOCDOC
self.cfgSection = sec.copy() #DOCDOC
self.addressFile = sec['AddressFile']
self.returnAddress = sec['ReturnAddress']
@@ -1155,6 +1157,9 @@
moduleManager.enableModule(self)
def getServerInfoBlock(self):
+ if not self.advertise:
+ return ""
+
if self.allowFromAddr:
allowFrom = "yes"
else:
@@ -1197,6 +1202,8 @@
def __init__(self):
DeliveryModule.__init__(self)
def getServerInfoBlock(self):
+ if not self.advertise:
+ return ""
if self.allowFromAddr:
allowFrom = "yes"
else:
@@ -1229,6 +1236,7 @@
def getConfigSyntax(self):
cfg = { 'Enabled' : ('REQUIRE', "boolean", "no"),
+ 'Advertise' : ('ALLOW', "boolean", "yes"),
'Retry': ('ALLOW', "intervalList",
"7 hours for 6 days"),
'BlacklistFile' : ('ALLOW', "filename", None),
@@ -1263,6 +1271,7 @@
manager.disableModule(self)
return
+ self.advertise = sec.get('Advertise') #DOCDOC
self.cfgSection = sec.copy() #DOCDOC
self.retrySchedule = sec['Retry']
if sec['BlacklistFile']: