
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3533 fd906abe-77d9-0310-91a1-e0d9ade77398
47 lines
9.2 KiB
Python
47 lines
9.2 KiB
Python
#
|
|
# Copyright (c) 2009 Helmut Merz helmutm@cy55.de
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
#
|
|
|
|
"""
|
|
Fake access to system libraries for testing.
|
|
|
|
$Id$
|
|
"""
|
|
|
|
data = [('1 (RFC822 {7785}', 'Return-Path: <ceo-bounces@mailman.www15.antenna.nl>\r\nX-Original-To: helmutm@cy55.de\r\nDelivered-To: helmutm@cy55.de\r\nReceived: from www15.antenna.nl (www15.antenna.nl [83.172.148.36])\r\n\tby cy05.de (Postfix) with ESMTP id 29A71478009\r\n\tfor <helmutm@cy55.de>; Mon, 8 Dec 2008 19:30:10 +0100 (CET)\r\nReceived: from www15.antenna.nl (www15.antenna.nl [127.0.0.1])\r\n\tby www15.antenna.nl (8.13.1/8.13.1) with ESMTP id mB8IHtFo019781;\r\n\tMon, 8 Dec 2008 19:24:45 +0100\r\nReceived: from www14.antenna.nl (www14.antenna.nl [83.172.146.59])\r\n\tby www15.antenna.nl (8.13.1/8.13.1) with ESMTP id mB8GJ0bt023578\r\n\tfor <ceo@www15.antenna.nl>; Mon, 8 Dec 2008 17:19:00 +0100\r\nReceived: from archive.antenna.nl (quisana.antenna.nl [217.149.221.25])\r\n\tby www14.antenna.nl (8.13.1/8.13.1) with ESMTP id mB8GIvbR003499\r\n\tfor <ceo@www14.antenna.nl>; Mon, 8 Dec 2008 17:18:57 +0100\r\nReceived: from antivir4.antenna.nl (antivir4.antenna.nl [83.172.148.32])\r\n\tby archive.antenna.nl (8.13.7/8.13.7) with ESMTP id mB8G5ANa032075\r\n\tfor <ceo@quisana.antenna.nl>; Mon, 8 Dec 2008 17:06:02 +0100\r\nReceived: from mail7.antenna.nl (mail7.antenna.nl [83.172.146.44])\r\n\tby antivir4.antenna.nl (8.13.1/8.13.1) with ESMTP id mB8GIGoo018354\r\n\tfor <ceo@quisana.antenna.nl>; Mon, 8 Dec 2008 17:18:16 +0100\r\nReceived: (qmail 21597 invoked from network); 8 Dec 2008 17:17:45 +0100\r\nReceived: from localhost (127.0.0.1)\r\n\tby localhost with SMTP; 8 Dec 2008 17:17:45 +0100\r\nReceived: from corporateeurope.xs4all.nl (corporateeurope.xs4all.nl\r\n\t[80.126.57.222]) by webmail.corporateeurope.org (Horde MIME library)\r\n\twith HTTP; Mon, 8 Dec 2008 17:17:45 +0100\r\nMessage-ID: <20081208171745.e4ce2xm96cco80cg@webmail.corporateeurope.org>\r\nDate: Mon, 8 Dec 2008 17:17:45 +0100\r\nFrom: ceo@corporateeurope.org\r\nTo: ceo@quisana.antenna.nl\r\nMIME-Version: 1.0\r\nUser-Agent: Internet Messaging Program (IMP) H3 (4.1.1)\r\nX-Virus-Scanned: ClamAV 0.94.2/8731/Mon Dec 8 05:31:15 2008 on\r\n\tantivir4.antenna.nl\r\nX-Virus-Status: Clean\r\nX-Spam-Status: No, score=-9.8 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE,\r\n\tIP_OK41z,REPORTDOMAINHIT_PLUGIN,SARE_ADULT2,URL_SPAM26z autolearn=ham\r\n\tversion=3.2.5\r\nX-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on antivir4.antenna.nl\r\nX-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0\r\n\t(www14.antenna.nl [83.172.146.59]);\r\n\tMon, 08 Dec 2008 17:18:57 +0100 (CET)\r\nX-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0\r\n\t(antivir4.antenna.nl [83.172.148.32]);\r\n\tMon, 08 Dec 2008 17:18:18 +0100 (CET)\r\nX-Mailman-Approved-At: Mon, 08 Dec 2008 19:17:54 +0100\r\nSubject: [CEO] Blogging from Poznan and Brussels\r\nX-BeenThere: ceo@mailman.www15.antenna.nl\r\nX-Mailman-Version: 2.1.11\r\nPrecedence: list\r\nList-Id: CEO Mailing List <ceo.mailman.www15.antenna.nl>\r\nList-Unsubscribe: <http://mailman.www15.antenna.nl/mailman/options/ceo>,\r\n\t<mailto:ceo-request@mailman.www15.antenna.nl?subject=unsubscribe>\r\nList-Archive: <http://mailman.www15.antenna.nl/mailman/private/ceo>\r\nList-Post: <mailto:ceo@mailman.www15.antenna.nl>\r\nList-Help: <mailto:ceo-request@mailman.www15.antenna.nl?subject=help>\r\nList-Subscribe: <http://mailman.www15.antenna.nl/mailman/listinfo/ceo>,\r\n\t<mailto:ceo-request@mailman.www15.antenna.nl?subject=subscribe>\r\nContent-Type: multipart/mixed;\r\n boundary="===============0371775080=="\r\nSender: ceo-bounces@mailman.www15.antenna.nl\r\nErrors-To: ceo-bounces@mailman.www15.antenna.nl\r\nX-Bogosity: Spam, tests=bogofilter, spamicity=0.999999, version=1.0.1\r\nX-UID: \r\nStatus: RO\r\nX-Status: RPC\r\nX-KMail-EncryptionState: N\r\nX-KMail-SignatureState: N\r\nX-KMail-MDN-Sent: \r\n\r\nThis message is in MIME format.\r\n\r\n--===============0371775080==\r\nContent-Type: multipart/alternative;\r\n\tboundary="=_gtkn1bgzg6g"\r\nContent-Transfer-Encoding: 7bit\r\n\r\nThis message is in MIME format.\r\n\r\n--=_gtkn1bgzg6g\r\nContent-Type: text/plain;\r\n\tcharset=ISO-8859-1;\r\n\tDelSp="Yes";\r\n\tformat="flowed"\r\nContent-Description: Plaintext Version of Message\r\nContent-Disposition: inline\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n\r\n\r\n BLOGGING FROM POZNAN\r\nCEO\'s Yiorgos Vassalos reports from Poznan, where the UN climate\r\nsummit reaches its climax in the end of this week. More than 1400\r\nindustry lobbyists are present at the summit, representing over 80\r\ncorporate groupings. One of the biggest corporate players in Poznan\r\nis the World Business Council for Sustainable Development (WBCSD),\r\nwith 65 lobbyists. The WBCSD hopes to avoid mandatory emission\r\nreduction schemes by pushing for voluntary, industry-driven\r\nagreements for steel, cement and other energy-intensive sectors. The\r\nWBCSD also wants government support for \'clean\' coal and nuclear\r\nenergy - it wants 700 new nuclear power stations - and insists on an\r\neven bigger role for big business in UN climate talks. Read more\r\nhere:\r\n http://climatecrashers.blogspot.com/[1]\r\n\r\n BLOGGING FROM INSIDE THE BRUSSELS BUBBLE\r\nCEO\'snew blog with reflections on remarkable events happening in the\r\nBrussels EU quarter starts with a report on the European Agenda Summit\r\n2008 which took place last week. More than 200 professional lobbyists\r\ngathered to "discuss with the EU\'s elite and be inspired by America\'s\r\nbest" about how most effectively to steer corporate lobby demands\r\nthrough the decision-making process. Read more here:\r\n http://brusselsbubble.blogspot.com/[2]\r\n\r\n\r\n\r\nLinks:\r\n------\r\n[1] http://climatecrashers.blogspot.com\r\n[2] http://brusselsbubble.blogspot.com\r\n\r\n\r\n--=_gtkn1bgzg6g\r\nContent-Type: text/html;\r\n\tcharset=ISO-8859-1\r\nContent-Description: HTML Version of Message\r\nContent-Disposition: inline\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n<p><b>Blogging from Poznan</b><br />\r\nCEO\'s Yiorgos Vassalos reports from Poznan, where the UN climatesummit\r\nreaches its climax in the end of this week. More than 1400 industry\r\nlobbyists are present at the summit, representing over 80 corporate\r\ngroupings. One of the biggest corporate players in Poznan is the World\r\nBusiness Council for Sustainable Development (WBCSD), with 65\r\nlobbyists. The WBCSD hopes to avoid mandatory emission reduction\r\nschemes by pushing for voluntary, industry-driven agreements for steel,\r\ncement andother energy-intensive sectors. The WBCSD also wants\r\ngovernment support for \'clean\'coal and nuclear energy - it wants 700\r\nnew nuclear power stations - and insists on aneven bigger role for big\r\nbusiness in UN climate talks. Read more here:<br /><a\r\nhref=3D"http://climatecrashers.blogspot.com">\r\nhttp://climatecrashers.blogspot.com/</a><br/>\r\n<br /><b>\r\nBlogging from inside the Brussels Bubble</b><br />\r\nCEO\'s new blogwith reflections on remarkable events happening in the\r\nBrussels EU quarter starts with a report on the European Agenda Summit\r\n2008 which took place last week. More than 200 professional lobbyists\r\ngathered to "discuss with the EU\'s elite and be inspired by America\'s\r\nbest" about how most effectively to steer corporate lobby demands\r\nthrough the decision-making process. Read more here: <br /><a\r\nhref=3D"http://brusselsbubble.blogspot.com">\r\nhttp://brusselsbubble.blogspot.com/</a></p><a\r\nhref=3D"http://brusselsbubble.blogspot.com"></a><p></p>\r\n--=_gtkn1bgzg6g--\r\n\r\n\r\n--===============0371775080==\r\nContent-Type: text/plain; charset="us-ascii"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\nContent-Disposition: inline\r\n\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nCorporate Europe Observatory (CEO)\r\nDe Wittenstraat 25\r\n1052 AK Amsterdam\r\nNetherlands\r\ntel: +31-20-612-7023\r\ne-mail: ceo@corporateeurope.org\r\nhttp://www.corporateeurope.org\r\nhttp://www.eulobbytours.org\r\nhttp://www.waterjustice.org\r\n\r\n\r\n________________________________________\r\nCEO mailing list\r\nCEO@mailman.www15.antenna.nl\r\nhttp://mailman.www15.antenna.nl/mailman/listinfo/ceo\r\n--===============0371775080==--\r\n\r\n'), ')']
|
|
|
|
|
|
class IMAP4(object):
|
|
|
|
def __init__(self, host=None):
|
|
pass
|
|
|
|
def login(self, user, password):
|
|
pass
|
|
|
|
def select(self, mailbox):
|
|
return 1
|
|
|
|
def search(self, charset, criterion):
|
|
return 'OK', ['1']
|
|
|
|
def fetch(self, idx, parts):
|
|
return 'OK', data
|
|
|
|
|
|
from loops.integrator.mail import system
|
|
system.IMAP4 = IMAP4
|