Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Make event emails sent from 10.6 iCal Server come from actual user OS X Server
In Server Admin, the iCal settings allow you to specify a single email from which event invitations will come. For a personal calendar though, you really want the email to come from your own email.

The script which sends invitations is found at:

/usr/share/caldavd/lib/python/twistedcaldav/mail.py

It appears that it tries to find the appropriate email address, but I could not figure out how to make a value ever be present where it was looking.

So, I modified the script as shown below.

Change:
 if organizer.startswith("mailto:"):
  orgEmail = fromAddr = organizer[7:]
 else:
  fromAddr = serverAddress
  orgEmail = None
 cn = calendar.getOrganizerProperty().params().get('CN', (None,))[0]
To:
 oemail = calendar.getOrganizerProperty().params().get('EMAIL', (None,))[0]
 if organizer.startswith("mailto:"):
   orgEmail = fromAddr = organizer[7:]
 elif oemail is not None:
   orgEmail = fromAddr = oemail
 else:
   fromAddr = serverAddress
   orgEmail = None
 cn = calendar.getOrganizerProperty().params().get('CN', (None,))[0]
After making this change, stop and restart the iCal service.

Maybe there is a way to do this without editing a script, but I could not find one.

[crarko adds: I haven't tested this one, but I do have a client with an iCal server and I may try this out. Obviously make sure you have a backup of the original script before modifying it.]
    •    
  • Currently 3.25 / 5
  You rated: 4 / 5 (4 votes cast)
 
[4,461 views]  

Make event emails sent from 10.6 iCal Server come from actual user | 5 comments | Create New Account
Click here to return to the 'Make event emails sent from 10.6 iCal Server come from actual user' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make event emails sent from 10.6 iCal Server come from actual user
Authored by: davester on Mar 29, '11 11:28:32AM

Um, isn't the idea that emailed events come from a calendarserver account, so the email user can reply [eg, yes, I can attend the meeting], and then the server can get responses in the calendarserver email account and apply them the appropriate calendar?



[ Reply to This | # ]
Make event emails sent from 10.6 iCal Server come from actual user
Authored by: dreness on Mar 29, '11 02:05:15PM

Yes, the above comment is correct. Performing this hint as written will break some features of iCal Server.



[ Reply to This | # ]
Make event emails sent from 10.6 iCal Server come from actual user
Authored by: mmblz on Mar 30, '11 02:13:41PM

I double checked and the system still works - it modifies events when attendees say whether they will attend. This is because the Reply-To is unchanged. Again, the script already attempts to set the From address to the email for the organizer - I just added a second way to determine what the organizer's email is. BTW, my method requires that an email is defined for the user in Workgroup Manager. I still don't know what would cause the info which the script looks for by default to be present.

Of course, I suppose someone could get the invite and instead of saying yes or no, hit reply to the email, expecting their reply to make it back to the organizer. But, having a recognizable "From" seems better than receiving an email from an obscure ("com.apple....") email address...



[ Reply to This | # ]
Make event emails sent from 10.6 iCal Server come from actual user
Authored by: mmblz on Mar 29, '11 06:40:58PM

The email still has a "Reply-To", which should let that part work. I will test some more tomorrow to be sure that nothing else is needed.
(And again, note that the mail.py script is already looking for an "organizer" specific email and is willing to use it as the From address...)



[ Reply to This | # ]
Make event emails sent from 10.6 iCal Server come from actual user
Authored by: ryanowich on Aug 23, '11 08:52:59AM

I'm on iCal server. And almost everything is working.

Except when I reply to an event invitation in iCal, the .ics created has a line saying:
ATTENDEE;CN="Ryan Grønborg";CUTYPE=INDIVIDUAL;EMAIL="ryan@mycompany.com";PARTSTAT=TENTATIVE:urn:uuid:38BCCE7F-D85C-4C17-872E-5C3CFFFB4838

When the event organizer receives my reply, their system sees it as urn:uuid:38BCCE7F-D85C-4C17-872E-5C3CFFFB4838 has replied.
That causes a confusion because urn:uuid:38BCCE7F-D85C-4C17-872E-5C3CFFFB4838 has not been invited.

The organizers system does not see my email ryan@mycompany.com.
I've tested on Mozillas Lightning calendar with my personal Gmail and also testet on an iCal account not connected to iCal Server.

I'd like to change the generated .ics so that urn:uuid:38BCCE7F-D85C-4C17-872E-5C3CFFFB4838 is replaced with mailto:ryan@mycompany.com

I want the new output to be:
ATTENDEE;CN="Ryan Grønborg";CUTYPE=INDIVIDUAL;EMAIL="ryan@mycompany.com";PARTSTAT=TENTATIVE:mailto:ryan@mycompany.com

Because: That's what iCal puts when it's not on iCal Server. And because it works that way.
If I change that line manually before Apple Mail sends the reply, then organizers is happy and gets my reply.

Question: Does anyone know which python file generates the .ics which is sent as reply to external event organizers?



[ Reply to This | # ]