diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index ba5f3ae..7986723 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -159,7 +159,7 @@ ping.path = /ping ; does not stop script execution for some reason. A value of '0' means 'off'. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) ; Default Value: 0 -request_terminate_timeout = 120s +request_terminate_timeout = 700s ; The timeout for serving a single request after which a PHP backtrace will be ; dumped to the 'slowlog' file. A value of '0s' means 'off'. @@ -241,3 +241,7 @@ catch_workers_output = yes php_value[upload_max_filesize] = 50M php_value[post_max_size] = 50M php_value[mail.add_x_header] = Off +php_value[max_execution_time] = 600 +php_value[max_input_time] = 300 +php_value[memory_limit] = 256M + diff --git a/sources/backend/imap/mime_calendar.php b/sources/backend/imap/mime_calendar.php index c3e9689..2f83e62 100644 --- a/sources/backend/imap/mime_calendar.php +++ b/sources/backend/imap/mime_calendar.php @@ -158,8 +158,25 @@ function parse_meeting_calendar($part, &$output, $is_sent_folder) { $uid = $props[0]->Value(); } - if (isset($part->ctype_parameters["method"])) { - switch (strtolower($part->ctype_parameters["method"])) { + $method = false; + $props = $ical->GetPropertiesByPath("VCALENDAR/METHOD"); + if (count($props) > 0) { + $method = strtolower($props[0]->Value()); + ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendIMAP->parse_meeting_calendar(): Using method from vcalendar object: %s", $method)); + } + else { + if (isset($part->ctype_parameters["method"])) { + $method = strtolower($part->ctype_parameters["method"]) + ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendIMAP->parse_meeting_calendar(): Using method from mime part object: %s", $method)); + } + } + + if ($method === false) { + ZLog::Write(LOGLEVEL_WARN, sprintf("BackendIMAP->parse_meeting_calendar() - No method header, please report it to the developers")); + $output->messageclass = "IPM.Appointment"; + } + else { + switch ($method) { case "cancel": $output->messageclass = "IPM.Schedule.Meeting.Canceled"; $output->meetingrequest->disallownewtimeproposal = 1; @@ -227,10 +244,6 @@ function parse_meeting_calendar($part, &$output, $is_sent_folder) { break; } } - else { - ZLog::Write(LOGLEVEL_WARN, sprintf("BackendIMAP->parse_meeting_calendar() - No method header, please report it to the developers")); - $output->messageclass = "IPM.Appointment"; - } $props = $ical->GetPropertiesByPath('VEVENT/DTSTAMP'); if (count($props) == 1) { diff --git a/sources/testing/samples/meeting_reply_rim.txt b/sources/testing/samples/meeting_reply_rim.txt new file mode 100644 index 0000000..b0eb1eb --- /dev/null +++ b/sources/testing/samples/meeting_reply_rim.txt @@ -0,0 +1,43 @@ +BEGIN:VCALENDAR +PRODID:-//Research In Motion//RIM App//EN +VERSION:2.0 +CALSCALE:GREGORIAN +METHOD:REPLY +BEGIN:VTIMEZONE +TZID:Europe/London +BEGIN:STANDARD +DTSTART:20001029T020000 +RRULE:FREQ=YEARLY;BYDAY=4SU;BYMONTH=10 +TZNAME:GMT +TZOFFSETFROM:+0100 +TZOFFSETTO:+0000 +END:STANDARD +BEGIN:DAYLIGHT +DTSTART:20000326T010000 +RRULE:FREQ=YEARLY;BYDAY=4SU;BYMONTH=3 +TZNAME:BST +TZOFFSETFROM:+0000 +TZOFFSETTO:+0100 +END:DAYLIGHT +END:VTIMEZONE +BEGIN:VEVENT +ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CN=User1;PARTSTAT=ACCEPTED:mailto:user1 + @domain1.tld +COMMENT:ok for me +CREATED:20150823T184526Z +DTEND;TZID=Europe/London:20150823T220000 +DTSTAMP:20150823T184527Z +DTSTART;TZID=Europe/London:20150823T210000 +ORGANIZER:mailto:user3@domain3.tld +SEQUENCE:0 +STATUS:CONFIRMED +SUMMARY:Test of meeting with Z-push +TRANSP:OPAQUE +UID:f503ce50-49c6-11e5-9533-693764eab43f +BEGIN:VALARM +ACTION:DISPLAY +DESCRIPTION:Test of meeting with Z-push in 15 minutes. +TRIGGER;RELATED=START:-PT15M +END:VALARM +END:VEVENT +END:VCALENDAR diff --git a/sources/testing/testing-imap_meeting_method.php b/sources/testing/testing-imap_meeting_method.php new file mode 100644 index 0000000..5c45dab --- /dev/null +++ b/sources/testing/testing-imap_meeting_method.php @@ -0,0 +1,25 @@ +ParseFrom($body); + + $props = $ical->GetPropertiesByPath("VCALENDAR/METHOD"); + if (count($props) > 0) { + printf("METHOD %s\n", $props[0]->Value()); + } +} + + +testing_get_method('testing/samples/meeting_request.txt'); +testing_get_method('testing/samples/meeting_request_rim.txt'); +testing_get_method('testing/samples/meeting_reply_rim.txt'); \ No newline at end of file