iCal file not importing - icalendar

I made a function in a python script that returns an ical file, but when I try to import it into busycal, it says "no events imported". I have checked and doublechecked, yet I can't find anything wrong with it. Here is a (short) example of such iCal file that doesn't work:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Ben//classtoical
X-WR-CALNAME:Classes
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-50157600408285#mydomain.com
DTSTART;TZID=Europe/Berlin:20131204T18000
DTEND;TZID=Europe/Berlin:20131204T20000
SUMMARY:Contemporary Philosophy
LOCATION:F.4.113
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-79836541033229#mydomain.com
DTSTART;TZID=Europe/Berlin:20131202T18000
DTEND;TZID=Europe/Berlin:20131202T20000
SUMMARY:Logic and Philosophy of Science
LOCATION:E.2.01
END:VEVENT
END:VCALENDAR

I discovered the cause of the problem; the DTSTART and DTEND dates had only 1 zero to represent seconds instead of the required 2.
Original file:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Ben//classtoical
X-WR-CALNAME:Classes
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-50157600408285#mydomain.com
DTSTART;TZID=Europe/Berlin:20131204T18000
DTEND;TZID=Europe/Berlin:20131204T20000
SUMMARY:Contemporary Philosophy
LOCATION:F.4.113
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-79836541033229#mydomain.com
DTSTART;TZID=Europe/Berlin:20131202T18000
DTEND;TZID=Europe/Berlin:20131202T20000
SUMMARY:Logic and Philosophy of Science
LOCATION:E.2.01
END:VEVENT
END:VCALENDAR
Working file:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Ben//classtoical
X-WR-CALNAME:Classes
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-50157600408285#mydomain.com
DTSTART;TZID=Europe/Berlin:20131204T180000
DTEND;TZID=Europe/Berlin:20131204T200000
SUMMARY:Contemporary Philosophy
LOCATION:F.4.113
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-79836541033229#mydomain.com
DTSTART;TZID=Europe/Berlin:20131202T180000
DTEND;TZID=Europe/Berlin:20131202T200000
SUMMARY:Logic and Philosophy of Science
LOCATION:E.2.01
END:VEVENT
END:VCALENDAR

Related

how to host and export my availability ics calendar and sync it to other hosts like booking.com or homeaway?

I am using my own selfmade php calendar. Every time I update the calendar, an ics file is created and placed in the "ical" directory on my server under the name "24633.ics". I can import the file into my Google calendar, but it fails on other booking websites. The file complies with the ics standards. What went wrong? What are the requirements for the calendar or server to import the file from booking websites?
Address: https://www.fewo4rent.de/ical/24633.ics
The calendar itself:
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//fewo4rent.de//DE
BEGIN:VEVENT
UID:1667560674-20221105-74919
DTSTAMP:20221104T121754Z
DTSTART;VALUE=DATE:20221105
DTEND;VALUE=DATE:20221112
SUMMARY:Belegt
END:VEVENT
BEGIN:VEVENT
UID:1667560674-20221127-59384
DTSTAMP:20221104T121754Z
DTSTART;VALUE=DATE:20221127
DTEND;VALUE=DATE:20221203
SUMMARY:Belegt
END:VEVENT
BEGIN:VEVENT
UID:1667560674-20221210-96485
DTSTAMP:20221104T121754Z
DTSTART;VALUE=DATE:20221210
DTEND;VALUE=DATE:20221224
SUMMARY:Belegt
END:VEVENT
BEGIN:VEVENT
UID:1667560674-20230715-55753
DTSTAMP:20221104T121754Z
DTSTART;VALUE=DATE:20230715
DTEND;VALUE=DATE:20230805
SUMMARY:Belegt
END:VEVENT
END:VCALENDAR
The headers:
header('Content-type: text/calendar charset=UTF-8');
header('Content-Disposition: attachment; filename='24633.ics')
or
header('Content-Disposition: inline; filename='24633.ics');
One website answers: "No reaction from the URL"

Thunderbird+Lightning is rendering an ics invitation inappropriately

Using sabre/vobject library I am creating an ics file like this one:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.1.2//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:sabre-vobject-d4b1ccb3-2197-4ee4-aab8-7bc2516adbf8
DTSTAMP:20170123T182612Z
SUMMARY:testev2
DESCRIPTION:
DTSTART;TZID=Europe/Athens:20170214T090000
DTEND;TZID=Europe/Athens:20170215T170000
LOCATION:
ORGANIZER;CN=Organizer Name:mailto:organizer#example.com
ATTENDEE;CN=Test User:MAILTO:test.user#somewhere.com
END:VEVENT
END:VCALENDAR
Then using phpmailer, I am attaching the file generated to an e-mail message and send it to the users who are participating on the event. Users who are using thunderbird (with Lightning extension - which is by default on) receive the e-mail message in the following format:
As you see in the picture the ics file is parsed and rendered in the table at the bottom of the e-mail. However the table header (the one marked in red) is not displaying correct information. Test user has not ever cofirmed his/her presence, and if he does, the ics file does not provide any info about it.
Am I formatting the ics file wrong?
Is it a known bug of thunderbird / Lightning ?
UPDATE
The e-mail headers of the message:
Return-Path: <XXXXXXXXXXXXXXXX>
Received: from deliver ([unix socket])
by mail (Cyrus v2.3.16-Fedora-RPM-2.3.16-13.el6_6) with LMTPA;
Tue, 24 Jan 2017 12:48:10 +0200
X-Sieve: CMU Sieve 2.3
Received: from [XXX.XXX.XXX.XXX] (XXXXXXXXXXXXXX [XXX.XXX.XXX.XXX
(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))
(No client certificate requested)
by XXXXXXXXXXXXXX (Postfix) with ESMTPSA id 6F18C1BE0305
for <XXXXXXXXXXXXXX>; Tue, 24 Jan 2017 12:48:10 +0200 (EET)
Subject: Fwd: Event invitation: testev2
To: "XXXXXXXX" <XXXXXXXXXXXXXX>
From: XXXXXXXXXXXXXX <XXXXXXXXXXXXXX>
X-Forwarded-Message-Id:
Message-ID: <bac7749e-9699-1b50-9de5-27a510c663a4#XXXXXXXX>
Date: Tue, 24 Jan 2017 12:48:09 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.6.0
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="------------79DD2A1D49F1A57579125B45"
This is a multi-part message in MIME format.
--------------79DD2A1D49F1A57579125B45
Content-Type: multipart/alternative;
boundary="------------72E56459CD6D794D0DF5AC4B"
--------------72E56459CD6D794D0DF5AC4B
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
> ------- Forwarded Message --------
Forward message content
> --------------72E56459CD6D794D0DF5AC4B
> Content-Type: text/html; charset=windows-1252
> Content-Transfer-Encoding: 8bit
>
HTML Content
> --------------72E56459CD6D794D0DF5AC4B--
>
> --------------79DD2A1D49F1A57579125B45
> Content-Type: text/calendar;
> name="invitation.ics"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: attachment;
> filename="invitation.ics"
>
ICS Content
> --------------79DD2A1D49F1A57579125B45--
You should make the Content-Type of the ics attachment something like:
Content-Type: text/calendar; charset="utf-8"; method=REQUEST
The method option is the magic word. I'm not completely sure this works, but it is at least closer to the spec. I'm happy to update my answer if it doesn't work.

Is there a legitimate reason Amazon probes /admin

From my raw server logs, I found these:
52.42.136.103 02/Aug/2016:17:58:12 GET /administrator/
54.234.186.225 03/Aug/2016:16:48:55 GET /administrator/
54.149.57.2 04/Aug/2016:18:40:55 GET /administrator/
52.40.119.32 06/Aug/2016:09:34:37 GET /administrator/
52.40.119.32 08/Aug/2016:06:02:45 GET /administrator/
The ip's all belong to Amazon Technologies (and I don't have an /admin directory).
I'm used to seeing that kind of random probe thing (/wp-admin, /wp-blog/, /dir, ... ) from Russia and Vietnam and so on, and I've always assumed there was some nefarious motive behind it. Is there? Why would Amazon be doing that? Is Jeff Bezos out of control?
Amazon itself is not crawling your site but more likely to be some of their EC2 users (i.e. rented servers on the cloud). See below for email address to contact Amazon if you think their users are doing something illegal or abusive
whois 52.40.119.32
#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/public/whoisinaccuracy/index.xhtml
#
#
# The following results may also be obtained via:
# https://whois.arin.net/rest/nets;q=52.40.119.32?showDetails=true&showARIN=false&showNonArinTopLevelNet=false&ext=netref2
#
NetRange: 52.32.0.0 - 52.63.255.255
CIDR: 52.32.0.0/11
NetName: AT-88-Z
NetHandle: NET-52-32-0-0-1
Parent: NET52 (NET-52-0-0-0-0)
NetType: Direct Allocation
OriginAS:
Organization: Amazon Technologies Inc. (AT-88-Z)
RegDate: 2015-09-02
Updated: 2015-09-02
Ref: https://whois.arin.net/rest/net/NET-52-32-0-0-1
OrgName: Amazon Technologies Inc.
OrgId: AT-88-Z
Address: 410 Terry Ave N.
City: Seattle
StateProv: WA
PostalCode: 98109
Country: US
RegDate: 2011-12-08
Updated: 2014-10-20
Comment: All abuse reports MUST include:
Comment: * src IP
Comment: * dest IP (your IP)
Comment: * dest port
Comment: * Accurate date/timestamp and timezone of activity
Comment: * Intensity/frequency (short log extracts)
Comment: * Your contact details (phone and email) Without these we will be unable to identify the correct owner of the IP address at that point in time.
Ref: https://whois.arin.net/rest/org/AT-88-Z
OrgTechHandle: ANO24-ARIN
OrgTechName: Amazon EC2 Network Operations
OrgTechPhone: +1-206-266-4064
OrgTechEmail: amzn-noc-contact#amazon.com
OrgTechRef: https://whois.arin.net/rest/poc/ANO24-ARIN
OrgAbuseHandle: AEA8-ARIN
OrgAbuseName: Amazon EC2 Abuse
OrgAbusePhone: +1-206-266-4064
OrgAbuseEmail: abuse#amazonaws.com
OrgAbuseRef: https://whois.arin.net/rest/poc/AEA8-ARIN
OrgNOCHandle: AANO1-ARIN
OrgNOCName: Amazon AWS Network Operations
OrgNOCPhone: +1-206-266-4064
OrgNOCEmail: amzn-noc-contact#amazon.com
OrgNOCRef: https://whois.arin.net/rest/poc/AANO1-ARIN

DKIM bad Signature. Expeted Body Hash is the same as the BH sended. Apache James

I made a lot of research about this topic. I have an Apache James 2.3.2.1 Mail Server. I'm configuring it as a production server. I got it running, and stable, but implementing jDKIM have been troublesome. I found these links to get it right.
http://www.nailedtothex.org/roller/kyle/entry/configuring-james-to-sign-dkim
https://github.com/smoradi/config/blob/master/noften/apache-james.txt
Until now, I verified the public and private keys repetitively. Mailets libraries. Java code and configuration for the Mailet.
But I'm stuck.
While testing with www.appmaildev.com/en/domainkeys/, I finally solve some errors over the themes named above. But now It's just toying with me.
In the DKIM Test result it says that the expected body hash must be
Expected Body Hash:
: frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN/XKdLCPjaYaY=
But in the Message Header says that the body hash is just that.
bh : frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN/XKdLCPjaYaY=
And It's just the same so this test should be OK.
Maybe I'm missing something over de DNS or in the Mailet configuration, I just dont know i have been trying to approach in different ways but this is were I get every time.
As a note, before getting this point, every time I send a mail over Outlook or Homail, it was getting to the Junk immediately, now is kind of random almost every 3 or 5 sends. While Gmail since the SPF got them always in the Inbox. And The server does not have an PTR record properly configured in the DNS.
This is the Mail from appmaildev.
I change my domain name over example.com
And change the IPs to xxx.xxx.xxx.xxx
this test in particular was made over telnet using ehlo
I marked the puzzling part of code with ** **.
================================================================
DKIM result: fail (bad signature)
Signed by: webmaster#example.com
**Expected Body Hash: frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN/XKdLCPjaYaY=**
PublicKey: selector._domainkey.example.com
IN TXT = "k=rsa; p=
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCtLBczKGEysTT6QuRgApyn6yvM
XOU9Sjkx6YMomuFujqPk2XgMuBbgafckRX+1F18h9G1rURmvc3EmPxegFxim6wrE
1RJGfddO+OHEjTBOsuXa7BK29P/bhCOehVeYG4o0L5DH8z3izfmvNuC3dC4N5G3R
8ZrNd7k/196TCZIaMwIDAQAB;"
---Original Message Header---
x-sender: webmaster#example.com
x-receiver: AAAA4AcCCxQA#appmaildev.com
Received: from james ([xxx.xxx.xxx.xxx]) by mail.appmaildev.com with Microsoft SMTPSVC(7.5.7600.16385);
Thu, 11 Feb 2016 22:05:19 -0500
DKIM-Signature: v=1; d=example.com; b=V9gPNU9Gjky7fFov5cYuTGN/gQEoBgaAkctwnME17pT/Uket4PDsVixMQbyiKvgQF3ADK8HTrKyd1L+9bBiesJAQaD1L1lH0ualjO/Ctf8jjzLyDUfB6cu4TEuAD+aVkIUVVbd0LNhcpxiOMsd5cADRBqZy60Mw9fQOaqyjh0QU=; s=selector; a=rsa-sha256; **bh=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN/XKdLCPjaYaY=;** h=from:to:received:received;
Message-ID: <1848510914.01455246317306.JavaMail.root#james>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-UserIsAuth: true
Received: from localhost.localdomain ([127.0.0.1])
by james (JAMES SMTP Server 2.3.2.1) with SMTP ID 101
for <AAAA4AcCCxQA#appmaildev.com>;
Fri, 12 Feb 2016 03:05:17 +0000 (UTC)
Date: Fri, 12 Feb 2016 03:05:17 +0000 (UTC)
From: webmaster#example.com
subject: prueba ehlo
ehlo.:
Bcc:
Return-Path: webmaster#example.com
X-OriginalArrivalTime: 12 Feb 2016 03:05:20.0069 (UTC) FILETIME=[34ED9F50:01D16542]
After more research and testing, I made it to work.
It seems that I had missing values in the DKIM-Signature.
This was my original tag in config.xml for Apache James in the DKIMSign mailet:
<signatureTemplate>v=1; s=selector; d=example.com;
h=from:to:received:received; a=rsa-sha256; bh=;
b=;</signatureTemplate>
I was missing the "c" and I made a change over the "h"
c=relaxed/relaxed;
h=Message-ID:Date:Subject:From:To:MIME-Version:Content-Type;
After the modification I got this:
<signatureTemplate>v=1; s=selector; d=example.com;
h=Message-ID:Date:Subject:From:To:MIME-Version:Content-Type;
a=rsa-sha256; bh=; b=;c=relaxed/relaxed;</signatureTemplate>
Another Detail, that I made several test about was the DNS Record. Mine was over Windows Server , so just for caution, I checked these details.
First , The escape char before the semicolon in the "k"
k=rsa\;
Second, That the "p" value, was the last value and that does not have a semicolon or escape char.
p=MIG...QAB
So that, after a host command I got something like
selector._domainkey.example.com descriptive text "k=rsa\;p=\010...QAB"
After those changes and checkings. It pass every test :)
Another link i found usefull for the configuration was this.
http://mail-archives.apache.org/mod_mbox/james-server-user/201410.mbox/%3C544FD474.2040906%40malcolms.com%3E

iCalendar Valarm doesn't work

I generate iCal file like this:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Splash//EN
BEGIN:VEVENT
DTSTART;VALUE=DATE:20150912
DTEND;VALUE=DATE:20150912
SUMMARY:test
DESCRIPTION:xxx
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:test
TRIGGER:-P0DT16H0M0S
END:VALARM
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:test
TRIGGER:-P1DT16H0M0S
END:VALARM
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:test
TRIGGER:-P2DT16H0M0S
END:VALARM
END:VEVENT
END:VCALENDAR
And when i import this file with google calendar import is successful but i don't have reminders so what i do wrong with VALARM and how can I fix this?
Your icalendar file does not validate, it is missing the UID at DTSTAMP properties. Try adding those properties and see if the alarms work.
iCalendar Validator