Hi,
Nick wrote:
> I need two more things before I can apply it: - Documentation
> of how to use it, ideally as a patch to doc/mixminiond.conf.5,
> so that server admins can learn how the option works without
> reading the code.
Giving it a try:
===== Beginn =====
Index: mixminiond.conf.5
===================================================================
--- mixminiond.conf.5 (revision 1)
+++ mixminiond.conf.5 (working copy)
@@ -321,8 +321,12 @@
What should the X-Abuse header of outgoing messages contain?
.It Cm Comments
What should the Comments header of outgoing messages contain?
-.It Cm Message
+.It Cm MessageHeader
If provided, a message to put before the content of any outgoing messages.
+.It Cm MessageFooter
+If provided, a message to put after the content of any outgoing messages.
+.It Cm ArmorPlaintext
+Boolean: Do we want to armor printable ASCII messages in OpenPGP ASCII armor? Switching this off will turn off the "BEGIN TYPE III ANONYMOUS MESSAGE" wrapping for most outgoing messages.
.It Cm FromTag
What should the 'tag' portion of outgoing return addresses contain? Defaults
to "[Anon]".
@@ -368,7 +372,7 @@
.It Cm RemoveContact
A contact address that users can email to be removed from the address file.
.It Cm Retry, SendmailCommand, SMTPServer, MaximumSize, AllowFromAddress, \
-X-Abuse, Comments, Message, FromTag, ReturnAddress
+X-Abuse, Comments, MessageHeader, MessageFooter, ArmorPlaintext, FromTag, ReturnAddress
See the corresponding entries in the [Delivery/SMTP] section.
.El
.Ss The [Delivery/SMTP-Via-Mixmaster] Section
===== Ende =====
> - Fixes and cleanups to the unit tests to check for the new
> behavior. After I apply this and run "make test", I get 4 new
> unit test failures.
Agreed.
===== Beginn =====
Index: server/Modules.py
===================================================================
--- server/Modules.py (revision 13)
+++ server/Modules.py (revision 14)
@@ -1147,7 +1147,7 @@
self.contact = sec['RemoveContact']
self.retrySchedule = sec['Retry']
self.allowFromAddr = sec['AllowFromAddress']
- self.armorPlaintext = sec['ArmorPlaintext']
+ self.armorPlaintext = sec.get('ArmorPlaintext', 0)
# validate should have caught these.
assert (self.returnAddress and self.contact)
@@ -1279,7 +1279,7 @@
self.contact = sec['RemoveContact']
self.retrySchedule = sec['Retry']
self.allowFromAddr = sec['AllowFromAddress']
- self.armorPlaintext = sec['ArmorPlaintext']
+ self.armorPlaintext = sec.get('ArmorPlaintext', 0)
# validate should have caught these.
assert (self.addressFile and self.returnAddress and self.contact)
@@ -1451,7 +1451,7 @@
self.fromTag = sec.get('FromTag', "[Anon]")
self.subjectTag = sec.get('SubjectTag', "")
self.allowFromAddr = sec['AllowFromAddress']
- self.armorPlaintext = sec['ArmorPlaintext']
+ self.armorPlaintext = sec.get('ArmorPlaintext', 0)
self.initializeHeaders(sec)
@@ -1536,7 +1536,7 @@
self.fromTag = sec.get('FromTag', "[Anon]")
self.subjectTag = sec.get('SubjectTag', "")
self.allowFromAddr = sec['AllowFromAddress']
- self.armorPlaintext = sec['ArmorPlaintext']
+ self.armorPlaintext = sec.get('ArmorPlaintext', 0)
self.command = cmd[0]
self.options = tuple(cmd[1]) + ("-l", self.server)
self.returnAddress = "nobody"
Index: test.py
===================================================================
--- test.py (revision 13)
+++ test.py (revision 14)
@@ -5909,6 +5909,7 @@
'MixCommand' : ('ls', ['-z']),
"MaximumSize" : 32*1024,
"AllowFromAddress" : 1,
+ "ArmorPlaintext" : 1,
}},
manager)
queue = manager.queues['SMTP_MIX2']
@@ -5985,7 +5986,7 @@
Enabled: yes
SMTPServer: nowhere
BlacklistFile: %s
-Message: Avast ye mateys! Prepare to be anonymized!
+MessageHeader: Avast ye mateys! Prepare to be anonymized!
ReturnAddress: yo.ho.ho@xxxxxxxxxxxxx
SubjectLine: Arr! This be a Type III Anonymous Message
MaximumSize: 35K
@@ -6255,7 +6256,7 @@
manager = self.getManager("""[Delivery/SMTP]
Enabled: yes
SMTPServer: nowhere
-Message: Avast ye mateys! Prepare to be anonymized!
+MessageHeader: Avast ye mateys! Prepare to be anonymized!
ReturnAddress: yo.ho.ho@xxxxxxxxxxxxx
SubjectLine: Arr! This be a Type III Anonymous Message
MaximumSize: 1M
===== Ende =====
Ciao
Tobias
Attachment:
pgptELFID6ktN.pgp
Description: PGP signature