[prev in list] [next in list] [prev in thread] [next in thread]
List: tmda-cvs
Subject: CVS: tmda/TMDA ChangeLog,1.77,1.78 Defaults.py,1.69,1.70 MTA.py,1.7,1.8
From: "Jason R. Mastaler" <jasonrm () users ! sourceforge ! net>
Date: 2001-10-31 23:48:40
[Download RAW message or body]
Update of /cvsroot/tmda/tmda/TMDA
In directory usw-pr-cvs1:/tmp/cvs-serv9953/TMDA
Modified Files:
ChangeLog Defaults.py MTA.py
Log Message:
Add support for Philip Hazel's Exim MTA (http://www.exim.org/).
Although some changes need to be made to the Exim configuration file
before using TMDA, very few TMDA changes were required. Documentation
updates to follow shortly.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/ChangeLog,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- ChangeLog 2001/10/29 20:46:41 1.77
+++ ChangeLog 2001/10/31 23:48:38 1.78
@@ -1,3 +1,14 @@
+2001-10-31 Jason R. Mastaler <jasonrm@nightshade.la.mastaler.com>
+
+ * Defaults.py: Add 'exim' as another option for
+ MAIL_TRANSFER_AGENT, and change BOUNCE_ENV_SENDER default if MTA
+ is Exim.
+
+ * MTA.py: Move the Postfix instance variables and methods up to
+ the MTA superclass. Subclasses automatically inherit this
+ functionality. The Qmail subclass then overrides all of it since
+ it's unique. Also, add an Exim subclass.
+
2001-10-29 Jason R. Mastaler <jasonrm@nightshade.la.mastaler.com>
* Util.py (findmatch): Downcase each address for case-insensitive
Index: Defaults.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Defaults.py,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- Defaults.py 2001/10/25 21:49:04 1.69
+++ Defaults.py 2001/10/31 23:48:38 1.70
@@ -84,7 +84,7 @@
# MAIL_TRANSFER_AGENT
# Defines which mail transfer agent (MTA) software you are running.
-# Possible choices are "postfix" or "qmail"
+# Possible choices are "exim", "postfix" or "qmail"
# Default is qmail
if not vars().has_key('MAIL_TRANSFER_AGENT'):
MAIL_TRANSFER_AGENT = "qmail"
@@ -172,10 +172,14 @@
BOUNCE_REVOKED_CC = None
# BOUNCE_ENV_SENDER
-# The envelope sender of the bounce message. For a normal bounce, this
-# should be an empty string.
+# The envelope sender of the bounce message.
+# Default is an empty envelope sender <>.
if not vars().has_key('BOUNCE_ENV_SENDER'):
- BOUNCE_ENV_SENDER = ''
+ # Exim doesn't like -f ''
+ if MAIL_TRANSFER_AGENT == 'exim':
+ BOUNCE_ENV_SENDER = '<>'
+ else:
+ BOUNCE_ENV_SENDER = ''
# CONFIRM_ACCEPT_NOTIFY
# Set this variable to 0 if you do not want to generate confirmation
Index: MTA.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/MTA.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- MTA.py 2001/10/15 16:01:26 1.7
+++ MTA.py 2001/10/31 23:48:38 1.8
@@ -11,19 +11,12 @@
class MTA:
- """Methods and instance variables common to all MTAs. """
+ """Non-qmail methods and instance variables. """
def __init__(self):
- pass
-
-
-class Postfix(MTA):
- """Postfix-specific methods and instance variables."""
- def __init__(self):
- MTA.__init__(self)
- # Postfix exit status codes; see /usr/include/sysexits.h
+ # Exit status codes; see /usr/include/sysexits.h
self.EX_HARD = 77 # permission denied; bounce message
self.EX_OK = 0 # successful termination; exit
- self.EX_STOP = None # Postfix doesn't have such an exit code
+ self.EX_STOP = None # Non-qmail MTAs don't have such an exit code
self.EX_TEMPFAIL = 75 # temporary failure; defer delivery
# Define the four states of a message.
@@ -63,6 +56,18 @@
self.defer()
+class Exim(MTA):
+ """Exim-specific methods and instance variables."""
+ def __init__(self):
+ MTA.__init__(self)
+
+
+class Postfix(MTA):
+ """Postfix-specific methods and instance variables."""
+ def __init__(self):
+ MTA.__init__(self)
+
+
class Qmail(MTA):
"""qmail-specific methods and instance variables."""
def __init__(self):
@@ -91,7 +96,9 @@
"""Factory function which determine what MTA we are running and
instantiates the corresponding MTA subclass."""
my_mta = string.capitalize(Defaults.MAIL_TRANSFER_AGENT)
- if my_mta == 'Postfix':
+ if my_mta == 'Exim':
+ return Exim()
+ elif my_mta == 'Postfix':
return Postfix()
elif my_mta == 'Qmail':
return Qmail()
_______________________________________________
tmda-cvs mailing list
http://libertine.org/lists/listinfo/tmda-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic