summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a843c3d)
raw | patch | inline | side by side (parent: a843c3d)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 13 Apr 2004 04:19:56 +0000 (04:19 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 13 Apr 2004 04:19:56 +0000 (04:19 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2281 57a73879-2fb5-44c3-a270-3262357dd7e2
doc/index.txt | patch | blob | history | |
doc/installation.txt | patch | blob | history | |
roundup/mailgw.py | patch | blob | history | |
roundup/scripts/roundup_mailgw.py | patch | blob | history |
diff --git a/doc/index.txt b/doc/index.txt
index c5d4355bbbfc86f4c2dee9236445276b17070215..6d77d5987d9e566d587a1ea021db0fe4d7f59e78 100644 (file)
--- a/doc/index.txt
+++ b/doc/index.txt
Andrey Lebedev,
Henrik Levkowetz,
Gordon McMillan,
+John F Meinel Jr,
Patrick Ohly,
Luke Opperman,
Will Partain,
diff --git a/doc/installation.txt b/doc/installation.txt
index 17573c1597e5f7f631ca0ad0df60c3aab0ea844e..4fada5d489336796a4c10cb32445f69bea7eda93 100644 (file)
--- a/doc/installation.txt
+++ b/doc/installation.txt
Installing Roundup
==================
-:Version: $Revision: 1.72 $
+:Version: $Revision: 1.73 $
.. contents::
On windows, you would set up the command using the windows scheduler.
+As a regular job using an IMAP source
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To retrieve from an IMAP mailbox, use a *cron* entry similar to the
+POP one::
+
+ 0,10,20,30,40,50 * * * * /usr/local/bin/roundup-mailgw /opt/roundup/trackers/support imap <imap_spec>
+
+where imap_spec is "``username:password@server``" that specifies the roundup
+submission user's IMAP account name, password and server. You may
+optionally include a mailbox to use other than the default ``INBOX`` with
+"``imap username:password@server mailbox``".
+
+If you have a secure (ie. HTTPS) IMAP server then you may use ``imaps``
+in place of ``imap`` in the command to use a secure connection.
+
+As with the POP job, on windows, you would set up the command using the
+windows scheduler.
+
UNIX Environment Steps
----------------------
diff --git a/roundup/mailgw.py b/roundup/mailgw.py
index 35cc90248470b73aedc5cd2bacaa1d232c0bf1b6..1435e0316c4f08bec842af74ae623f7e515ebc92 100644 (file)
--- a/roundup/mailgw.py
+++ b/roundup/mailgw.py
an exception, the original message is bounced back to the sender with the
explanatory message given in the exception.
-$Id: mailgw.py,v 1.147 2004-04-13 04:11:06 richard Exp $
+$Id: mailgw.py,v 1.148 2004-04-13 04:16:36 richard Exp $
"""
__docformat__ = 'restructuredtext'
try:
if not mailbox:
- #print 'Using INBOX'
(typ, data) = server.select()
else:
- #print 'Using mailbox' , mailbox
(typ, data) = server.select(mailbox=mailbox)
if typ != 'OK':
- print 'Failed to get mailbox "%s": %s' % (mailbox, data)
+ print 'Failed to get mailbox "%s": %s'%(mailbox, data)
return 1
try:
numMessages = int(data[0])
- #print 'Found %s messages' % numMessages
- except ValueError:
- print 'Invalid return value from mailbox'
+ except ValueError, value:
+ print 'Invalid message count from mailbox %r'%data[0]
return 1
for i in range(1, numMessages+1):
- #print 'Processing message ', i
(typ, data) = server.fetch(str(i), '(RFC822)')
- #This marks the message as deleted.
+
+ # mark the message as deleted.
server.store(str(i), '+FLAGS', r'(\Deleted)')
- #This is the raw text of the message
+
+ # process the message
s = cStringIO.StringIO(data[0][1])
s.seek(0)
self.handle_Message(Message(s))
index 33633ad632c6c317c9bf2c0905d64b02b76d4db6..d9b4bbfcbad944b3736dc8609a9058af72d2ff4d 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: roundup_mailgw.py,v 1.13 2004-04-13 04:11:06 richard Exp $
+# $Id: roundup_mailgw.py,v 1.14 2004-04-13 04:14:03 richard Exp $
"""Command-line script stub that calls the roundup.mailgw.
"""
-v: print version and exit
-C / -S: see below
-The roundup mail gateway may be called in one of three ways:
+The roundup mail gateway may be called in one of four ways:
. with an instance home as the only argument,
. with both an instance home and a mail spool file, or
- . with both an instance home and a pop server account.
+ . with both an instance home and a POP/APOP server account.
+ . with both an instance home and a IMAP/IMAPS server account.
It also supports optional -C and -S arguments that allows you to set a
fields for a class created by the roundup-mailgw. The default class if
apop username:password@server
IMAP:
- Connect to an IMAP server. This supports the same notation as that of POP mail.
+ Connect to an IMAP server. This supports the same notation as that of
+ POP mail.
imap username:password@server
- It also allows you to specify a specific mailbox other than INBOX using this format:
+ It also allows you to specify a specific mailbox other than INBOX using
+ this format:
imap username:password@server mailbox
IMAPS:
# take the argv array and parse it leaving the non-option
# arguments in the args array.
try:
- optionsList, args = getopt.getopt(argv[1:], 'vC:S:', ['set=', 'class='])
+ optionsList, args = getopt.getopt(argv[1:], 'vC:S:', ['set=',
+ 'class='])
except getopt.GetoptError:
# print help information and exit:
usage(argv)
return handler.do_imap(m.group('server'), m.group('user'),
m.group('pass'), mailbox, ssl)
- return usage(argv, _('Error: The source must be either "mailbox", "pop" or "apop"'))
+ return usage(argv, _('Error: The source must be either "mailbox",'
+ ' "pop", "apop", "imap" or "imaps"'))
finally:
db.close()