"Jason R. Mastaler" <[EMAIL PROTECTED]> writes:

>> File "./TMDA/AutoResponse.py", line 243, in record
>> IOError: [Errno 36] File name too long: 
>
> Yes, indeed.  I'll get back to you soon with a fix.  Thanks.

You can apply the attached patch, which will also be part of the TMDA
1.0.1 release.

Index: Util.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Util.py,v
retrieving revision 1.110.2.1
diff -u -r1.110.2.1 Util.py
--- Util.py	9 Jan 2004 19:21:50 -0000	1.110.2.1
+++ Util.py	25 Jan 2004 17:31:11 -0000
@@ -48,6 +48,7 @@
 MODE_READ = 04
 MODE_WRITE = 02
 NL = '\n'
+POSIX_NAME_MAX = 255                    # maximum length of a file name
 
 
 def gethostname():
@@ -449,10 +450,14 @@
       outside the directory.
     - Spaces are replaced with underscores.
     - The address is lowercased.
+    - Truncate sender at 233 chars to insure the full filename
+    (including time, pid, and two dots) fits within the POSIX limit of
+    255 chars for a filename.
     """
     sender = sender.replace(' ', '_')
     sender = sender.replace('/', ':')
-    return sender.lower()
+    sender = sender.lower()
+    return sender[:POSIX_NAME_MAX - 22]
 
 
 def confirm_append_address(xp, rp):
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users
  • Bug? Rob Penrose
    • Re: Bug? Jason R. Mastaler
      • Jason R. Mastaler

Reply via email to