Snapshot release 20030306-1524

Charles Cazabon <[email protected]> 6 Mar 2003 21:25:20 -0000
Newsgroups gmane.mail.bikini.devel
Message-ID <[email protected]>

Snapshot 20030306-1524 released and uploaded.  From the CHANGELOG:

2003-03-06

  Whitespace normalization only.


Diff follows.

diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030306-1521/bikini/__init__.py bikini-20030306-1524/bikini/__init__.py
--- bikini-20030306-1521/bikini/__init__.py	Thu Mar  6 15:21:33 2003
+++ bikini-20030306-1524/bikini/__init__.py	Thu Mar  6 15:24:50 2003
@@ -1,7 +1,7 @@
 #!/usr/bin/python2.2
-'''bikini - example/research implementation of the BikINI (BikINI Is Not IMAP) 
-protocol server and client.  Note that this is /not/ a reference implementation; 
-not all of the specification is implemented, and there may be bugs in this 
+'''bikini - example/research implementation of the BikINI (BikINI Is Not IMAP)
+protocol server and client.  Note that this is /not/ a reference implementation;
+not all of the specification is implemented, and there may be bugs in this
 software which cause it to behave in ways not permitted by the specification.
 
 Copyright (C) 2003 Charles Cazabon <bikini @ discworld.dyndns.org>
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030306-1521/bikini/client.py bikini-20030306-1524/bikini/client.py
--- bikini-20030306-1521/bikini/client.py	Thu Mar  6 15:21:33 2003
+++ bikini-20030306-1524/bikini/client.py	Thu Mar  6 15:24:50 2003
@@ -1,7 +1,7 @@
 #!/usr/bin/python2.2
-'''client.py - example/research implementation of the BikINI (BikINI Is Not 
-IMAP) protocol client.  Note that this is /not/ a reference implementation; not 
-all of the specification is implemented or used, and there may be bugs in this 
+'''client.py - example/research implementation of the BikINI (BikINI Is Not
+IMAP) protocol client.  Note that this is /not/ a reference implementation; not
+all of the specification is implemented or used, and there may be bugs in this
 software which cause it to behave in ways not permitted by the specification.
 
 Copyright (C) 2003 Charles Cazabon <bikini @ discworld.dyndns.org>
@@ -10,7 +10,7 @@
 http://www.qcc.ca/~charlesc/software/bikini/
 .
 
-This software is intended to run under a network-connection-providing utility 
+This software is intended to run under a network-connection-providing utility
 such as  superserver such ucspi-tcp's tcpclient, netpipe, netcat, or similar.
 An example tcpclient shell script is included with the software.
 
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030306-1521/bikini/config.py bikini-20030306-1524/bikini/config.py
--- bikini-20030306-1521/bikini/config.py	Thu Mar  6 15:21:33 2003
+++ bikini-20030306-1524/bikini/config.py	Thu Mar  6 15:24:50 2003
@@ -12,7 +12,7 @@
     'newdirmode'    : string.atoi (os.environ.get ('TIMEOUT', '0700'), 0),
     'maxauthtries'  : int (os.environ.get ('TIMEOUT', 5)),
     'serverpath'    : '/usr/lib/python2.2/site-packages/bikini/server.py',
-    'sendmethod'    : sendmessage.qmailqueue,
+    'sendmethod'    : sendmessage.newinject,
 
     'anonymous-mailstore' : '/tmp/bikini-mail/',
     'anonymous-user' : 'nobody',
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030306-1521/bikini/sasl.py bikini-20030306-1524/bikini/sasl.py
--- bikini-20030306-1521/bikini/sasl.py	Thu Mar  6 15:21:33 2003
+++ bikini-20030306-1524/bikini/sasl.py	Thu Mar  6 15:24:50 2003
@@ -17,7 +17,7 @@
 
         # Password validation through external checkpassword interface
         self.pwchecker.check (self.username, self.password)
-        
+
         self.uid = pw[2]
         self.gid = pw[3]
         self.fullname = pw[4]
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030306-1521/bikini/sendmessage.py bikini-20030306-1524/bikini/sendmessage.py
--- bikini-20030306-1521/bikini/sendmessage.py	Thu Mar  6 15:21:33 2003
+++ bikini-20030306-1524/bikini/sendmessage.py	Thu Mar  6 15:24:50 2003
@@ -22,58 +22,6 @@
     raise PermanentCommandError, 'SEND prohibited'
 
 #######################################
-def qmailqueue (path, envelope):
-    '''Queue message using qmail-queue.  Sends message exactly as is.
-    '''
-    log (TRACE, 'path %s envelope %s\n' % (path, envelope))
-    cmd = '/var/qmail/bin/qmail-queue'
-    try:
-        messagepipe = os.pipe ()
-        envelopepipe = os.pipe ()
-        child_pid = os.fork ()
-        if child_pid == 0:
-            # child
-            os.close (messagepipe[WRITE])
-            os.close (envelopepipe[WRITE])
-            os.close (0)
-            os.close (1)
-            os.close (2)
-            os.dup2 (messagepipe[READ], 0)
-            os.dup2 (envelopepipe[READ], 1)
-            os.execl (cmd, cmd)
-            raise TemporaryCommandError, 'exec failed'
-        # Parent
-        log (DEBUG, 'forked pid %i\n' % child_pid)
-        os.close (messagepipe[READ])
-        os.close (envelopepipe[READ])
-        # Write message
-        os.write (messagepipe[WRITE], open (path, 'rb').read ())
-        os.close (messagepipe[WRITE])
-        # Write envelope
-        parts = envelope.split ('\0')
-        os.write (envelopepipe[WRITE], 'F%s\0' % parts[0])
-        for recip in parts[1:-1]:
-            os.write (envelopepipe[WRITE], 'T%s\0' % recip)
-        os.write (envelopepipe[WRITE], '\0')
-        os.close (envelopepipe[WRITE])
-        tries = 0
-        while tries < 10:
-            pid, rc = os.waitpid (child_pid, os.WNOHANG)
-            log (TRACE, 'os.waitpid returned %i, %s\n' % (pid, rc))
-            if pid == child_pid and os.WIFEXITED (rc):
-                if os.WEXITSTATUS (rc) == 0:
-                    log (TRACE, 'message queued\n')
-                    return 'this is a receipt, should be a queue id or similar' # ???
-                log (TRACE, 'message not queued (exited %i)\n' % os.WEXITSTATUS (rc))
-                raise TemporaryCommandError, '%s exited %i' % (cmd, os.WEXITSTATUS (rc))
-            time.sleep (1)
-        log (ERROR, 'child never exited?\n')
-        raise TemporaryCommandError, '%s never exited' % cmd
-
-    except UnhandledException, txt:
-        raise TemporaryCommandError, 'failure queuing message: %s' % txt
-
-#######################################
 class sendmessageBase:
     '''Queue message using a command which takes the envelope as arguments and
     reads stdin for the message content, returning only an exit code.
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030306-1521/bikini/server.py bikini-20030306-1524/bikini/server.py
--- bikini-20030306-1521/bikini/server.py	Thu Mar  6 15:21:33 2003
+++ bikini-20030306-1524/bikini/server.py	Thu Mar  6 15:24:50 2003
@@ -1,7 +1,7 @@
 #!/usr/bin/python2.2
-'''server.py - example/research implementation of the BikINI (BikINI Is Not 
-IMAP) protocol server.  Note that this is /not/ a reference implementation; not 
-all of the specification is implemented, and there may be bugs in this software 
+'''server.py - example/research implementation of the BikINI (BikINI Is Not
+IMAP) protocol server.  Note that this is /not/ a reference implementation; not
+all of the specification is implemented, and there may be bugs in this software
 which cause it to behave in ways not permitted by the specification.
 
 Copyright (C) 2003 Charles Cazabon <bikini @ discworld.dyndns.org>
@@ -140,7 +140,7 @@
 
     ###################################
     def foldercontents (self, folder):
-        '''Read and cache, then return the contents of a maildir (folder).  Only 
+        '''Read and cache, then return the contents of a maildir (folder).  Only
         new/ and cur/ messages are shown.  Format is "message-identifier [space] flags:size",
         with size in bytes.  flags may be empty.
         '''
diff -urN --exclude=bikini.html --exclude=bikini.txt --exclude=CHANGELOG bikini-20030306-1521/bikini/serverauth.py bikini-20030306-1524/bikini/serverauth.py
--- bikini-20030306-1521/bikini/serverauth.py	Thu Mar  6 15:21:33 2003
+++ bikini-20030306-1524/bikini/serverauth.py	Thu Mar  6 15:24:50 2003
@@ -1,7 +1,7 @@
 #!/usr/bin/python2.2
-'''server-auth.py - example/research implementation of the BikINI (BikINI Is Not 
-IMAP) protocol server.  Note that this is /not/ a reference implementation; not 
-all of the specification is implemented, and there may be bugs in this software 
+'''server-auth.py - example/research implementation of the BikINI (BikINI Is Not
+IMAP) protocol server.  Note that this is /not/ a reference implementation; not
+all of the specification is implemented, and there may be bugs in this software
 which cause it to behave in ways not permitted by the specification.
 
 Copyright (C) 2003 Charles Cazabon <bikini @ discworld.dyndns.org>