thomas: utils/testing test-invitation-forwarding-issue3192.py, NONE, 1.1
cvs at kolab.org
cvs at kolab.org
Mon Feb 23 16:58:21 CET 2009
Author: thomas
Update of /kolabrepository/utils/testing
In directory doto:/tmp/cvs-serv10100
Added Files:
test-invitation-forwarding-issue3192.py
Log Message:
Test script to trigger kolab/issue3192 (Forwarding an invitation with Outlook failed)
--- NEW FILE: test-invitation-forwarding-issue3192.py ---
#!/usr/bin/env python
"""Forwarded iTIP invitation trying to trigger kolab/issue3192
(Forwarding an invitation with Outlook failed)
Usage $progname <recipientemailaddress>
This script is Free Software under the GNU General Public License >=v2.
thomas at intevation.de (initial 20090223)
"""
__version__="$Revision: 1.1 $"
# $Source: /kolabrepository/utils/testing/test-invitation-forwarding-issue3192.py,v $
import sys
import os
import pwd
msg = """From: User1 <%(user1)s>
Sender: User2 <%(user2)s>
To: <%(user3)s>
Subject: kolab/issue3192
Date: Mon, 23 Feb 2009 15:16:14 +0100
Message-ID: <000001c995c1$49c4a2a0$140ba8c0 at invalid>
MIME-Version: 1.0
Content-Type: text/calendar; method=REQUEST;
charset="utf-8"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
Thread-Index: AcmVuGgcYR9Pp2HUSHalFjSgcQETAwAAAq8gAAIyVwA=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:%(user3)s
DTSTART:20090223T140000Z
DTEND:20090223T150000Z
TRANSP:OPAQUE
SEQUENCE:0
UID:libkcal-910600374.601
DTSTAMP:20090223T131221Z
DESCRIPTION:Zeit: Montag\, 23. Februar 2009 15:00-16:00 (GMT+01:00)
Amsterdam\, Berlin\, Bern\, Rom\, Stockholm\,
Wien.\n\n*~*~*~*~*~*~*~*~*~*\n\n\n\n>_____________________________________
________\n>Von: User1 \n>Gesendet: Montag\, 23. Februar 2009
14:12\n>An: User1\; %(user2)s\n>Betreff: kolab/issue3192\n>Zeit:
Montag\, 23. Februar 2009 15:00-16:00 (GMT+01:00) Amsterdam\, Berlin\,
Bern\, Rom\, Stockholm\, Wien.\n>Ort: \n>\n>\n
SUMMARY:WG: kolab/issue3192
PRIORITY:5
X-MICROSOFT-CDO-IMPORTANCE:1
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR
"""
cmd = '/kolab/bin/php -c /kolab/etc/apache/php.ini -f /kolab/bin/kolabfilter -- --host=kolab.example.com --sender=%(user2)s --recipient=%(user3)s --client=192.0.2.1 --user=%(user2)s --config=/kolab/etc/kolab/kolabfilter.conf'
users = {
'user1': "user1 at example.org",
'user2': "user2 at example.org",
'user3': "user3 at example.org",
}
if pwd.getpwuid(os.getuid())[0] != 'kolab-n':
sys.stderr.write("Run me as user kolab-n\n")
sys.exit(1)
kolabfilter = os.popen(cmd % users, 'w')
kolabfilter.write(msg % users)
code = kolabfilter.close()
if os.WIFEXITED(code):
sys.stderr.write("exited with status %d\n" % os.WEXITSTATUS(code))
elif os.WIFSIGNALED(code):
sys.stderr.write("killed by signal %d\n" % os.WTERMSIG(code))
elif os.WIFSTOPPED(code):
sys.stderr.write("stopped by signal %d\n" % os.WSTOPSIG(code))
else:
sys.stderr.write("invalid exit code %d\n" % code)
More information about the commits
mailing list