mac-osx

  • Whining

    [Security experts say that Apple isn’t ready for enterprise prime-time.][1]
    Quit whining. All you seem to care about is that Apple didn’t give you any advance notice. You spent the entire article about it without even addressing the fixes or whether OS X and/or QuickTime, etc. are now more secure. Grow up. Apple doesn’t need to have a press conference to tell you they’re working on security.
    [1]: http://blogs.zdnet.com/security/?p=1941

  • iCal – Exchange Time Zone Fix – Chapter 2

    It was a few months ago that I originally wrote the first incarnation of the MailExchange2iCal script. Since then I’ve been in contact with a few users trying to make it work for them and I’ve found a number of peculiarities in the types of email invites sent by Exchange/Outlook. The biggest problem was that the time zone data for the event was improperly formatted. This caused all sorts of problems for Mac users.
    Let’s start at the beginning. Sometimes integration of a Mac in the corporate environment is a bit difficult and takes a bit of ingenuity. This is especially true when dealing with Exchange. The current versions of iCal and iCal Server are CalDAV and iCalendar compliant. Only Outlook 2007 is said to be CalDAV and iCalendar compliant. Previous versions of Outlook are not compliant and don鈥檛 play well with other calendar applications. Here鈥檚 the actual time zone (TZID) spec and the spec for how it should be formatted. You can see by looking at it that the TZID that Outlook produces is non-compliant.
    A quick Google search shows an article or two that explain this very well.
    I’ve found that there are at least 3 different types of invites that can be sent by Exchange/Outlook.

    1. METHOD:REQUEST – This is the usual email requesting that you attend a meeting.
    2. METHOD:PUBLISH – This is essentially a publication notice for an event. It doesn’t ask you to reply.
    3. METHOD:CANCEL – This is a cancellation notice for an event.

    Additionally, I’ve found that the emails that contain these invites are formated in at least 3 different ways. Sometimes the calendar event is within the body of the message and is encoded with Content-Transfer-Encoding in either 8bit or quoted-printable. Always the .ics file is attached.
    My script does the following:

    1. It parses the message to either extract the calendar data from the body of the message or from the .ics attachment.
    2. It then figures out if the invite is of type METHOD:REQUEST, METHOD:PUBLISH or METHOD:CANCEL.
    3. If the invite is one of the first 2 types. The time zone is fixed and the event is imported into iCal. You might have to select into which calendar the event will be imported.
    4. If the invite is of type METHOD:CANCEL then the script will locate the corresponding event and set it’s status to cancelled.
    • You will have to manually delete the event. It will appear in iCal to have a white strike-through font style.
    • Repeating events all seem to have the same UID (Unique IDentifier).

    I don’t know why. Every repeating event will be thusly marked as cancelled. You will then manually delete the specific event and manually run the script again while the cancellation message is selected. This will reset the remaining repeating events back to confirmed. Yes, I know this is a bit of a kludge but I don’t have a better method.

    1. It will parse the message to allow for invites from multiple Exchange servers.

    My script, now re-named iCal-Invite-Fix.scpt, will need to be customized for each Exchange server from which you receive invites. There are 3 properties at the beginning of the script. They are exchange_fragment, ical_tzid and myCalendar. These first two properties are lists and the order of the items is crucial. The specific item (position in list) of each list must correspond to each other.

    • exchange_fragment is a unique fragment of the TZID that your Exchange server sends.
    • ical_tzid is the time zone of the Exchange server in proper format.
    • This means no spaces, though spaces are replaced automatically with the underscore ‘_’.
    • For instance, I’m in Southern California and the correct time zone should be written as US/Pacific or America/Los_Angeles. You can find this information by selecting the time zone drop down menu in the upper right corner of your iCal window and select Other.... If you look in iCal’s upper right corner for the time zone menu bar the last example will appear as America/Los Angeles.
    • myCalendar is the name of the calendar that normally receives the events. It is needed for the cancellation to function.


    ical-fix-properties2.jpg
    Save the script and either set it up to run from a mail rule or as I do call it from the System AppleScript menu. You will need to save the script in ~/Library/Scripts/Applications/Mail/ folder. Create this folder if it doesn鈥檛 exist.
    To set the script up to run automatically you will need to create a new Mail rule as follows.

    1. Mail -> Preferences -> Rules -> Add Rule
    2. Description “iCal Invite Fix”
    3. If “any” of the following conditions are met:
      • “Any Attachment Name” “ends with” “.ics”
    4. Perform the following actions:
      • Run AppleScript “~/Library/Scripts/Applications/Mail/iCal-Invite-Fix.scpt”
    5. Click “OK” and then “Apply”

    ical-fix-rule.jpg
    You can also run the script manually from the system-wide script menu. To install this menu. Open up the /Applications/AppleScript/AppleScript Utility.app and check the Show Script menu in menu bar box. If you put the script in the folder location indicated above it will now be visible when Mail.app is the current application.
    Download the iCal-Invite-Fix script.
    Please let me know if there are any problems or you need help setting this up. The script was not entirely my creation and credit also goes to others. I鈥檓 quite certain any errors are likely mine. 馃槈
    Updated: Now produces CalDAV-compliant TZIDs, no quotes.
    Updated again: Now will move the .ics files from /tmp to the Trash.
    Update 12/03/2008: Fixed the METHOD:PUBLISH invite to no longer ask to select which calendar to add event. It will automatically select the first local calendar, like it does with METHOD:REQUEST.
    Updated 12/28/2008: Added ability to use single script with multiple Exchange servers. The trade-off is a slightly more complex set up.

  • iCal – Exchange Time Zone Fix – Part 2

    I’ve come across a problem with the original MailExchange2iCal-TZ-fix script. It seems if the .ics invite was only listed as an attachment or in base64 encoding then the script would fail. I’ve subsequently revised the script to handle this and to more gracefully ask into which calendar you want the event imported.
    I’ve also fixed the script so that it runs successfully from a rule.
    Note: The ical_TZID property cannot have any spaces. Replace all spaces with underscores “_“. In iCal America/Los_Angeles will look like America/Los Angeles in the iCal dropdown menu.
    Let me know if there are any problems.
    As always you can download the MailExchange2iCal-TZ-fix script here.

  • iCal – Exchange Time Zone Fix

    As any Mac user who deals with Microsoft Exchange invites will tell you Exchange screws up the time zone information. What this means is that you will likely miss your meetings. Not a good thing.
    Justin Hartman has recently given you his solution to this problem. I haven’t tested it but in looking at it I’m certain it works just fine. I say this because he’s fixing the problem is a similar manner. It’s just that he’s using a combination of shell scripts and AppleScripts. I’ve got it down to a single AppleScript.
    There is one property at the head of the script that needs to be fixed depending upon the location of your Exchange server. What you need to do is copy in the correct property from what iCal expects to see as time zone information.
    ical-tzid.png
    You can find this information by selecting the time zone drop down menu in the upper right corner of your iCal window and select Other....
    Once there find the location of your Exchange server and see what the resultant time zone information looks like in iCal. In my case, I live in California and my time zone is US/Pacific or America/Los_Angeles but the Exchange server in question lives in Dallas. So I set the property to US/Central.
    Note: The ical_TZID property cannot have any spaces. Replace all spaces with underscores “_“. In iCal America/Los_Angeles will look like America/Los Angeles in the iCal dropdown menu.
    I think I’ve built in the enough logic to grab any twisted time zone information out of the Exchange invite that Exchange can produce. If I’m wrong let me know.
    Save the script and either set it up to run from a mail rule or as I do call it from the System AppleScript menu. You will need to save the script in ~/Library/Scripts/Applications/Mail/ folder. Create this folder if it doesn’t exist.
    The script was not entirely my creation and credit also goes to others. I’m quite certain any errors are likely mine. 馃槈
    If it works for you let me know. If it doesn’t work let me know that too and I’ll see if it can be fixed.
    You will likely need a different copy of the script for each Exchange server that send you invites.
    Update – 5 August 2008
    To set the script up to run automatically you will need to create a new Mail rule as follows.

    1. Mail -> Preferences -> Rules -> Add Rule
    2. Description “Fix Exchange Invites”
    3. If “any” of the following conditions are met:
      • “Content-Class” “Contains” “urn:content-classes:calendarmessage”
        Note that the Content-Class header is not in the default list of headers on which you can set a rule action, but you can add it. This hint originally here.
      • “Any Attachment Name” “ends with” “.ics”
    4. Perform the following actions:
      • “Run AppleScript” “~/Library/Scripts/Applications/Mail/MailExchange2iCal-TZ-fix.scpt”
    5. Click “OK” and then “Apply”

    Update – 11 August 2008
    I found a glaring problem that I believe I’ve fixed. Apparently if the invite is only sent as an attachment the previous version of the script wouldn’t parse out the .ics attachment. This new version will. Please download it.
    Update – 18 August 2008
    I re-wrote the script making it better and more versatile. Please go to it’s new post home.

  • Apple USB Ethernet Adapter – solution

    Peter Sichel of [Sustainable Softworks][1] is a genius. Seriously. He’s not only just updated his [USB to Ethernet Adapters for Mac OS X][2] to work with the recently released Apple-branded USB Ethernet adapter, but he sent me a comment letting me know.
    I’ve just installed the `USBAx8817x 1.0.3b10` release and it seems to be working.
    Peter emailed me to let me know his sources inside Apple report that the driver in 10.5.2 should correctly with Apple’s adapter. You will have to remove Peter’s driver to see if this works. I’ll try it when I get the server back from repair as I’ll have to re-install the OS anyway.
    [1]: http://www.sustworks.com/site/index.html
    [2]: http://www.sustworks.com/site/news_usb_ethernet.html

  • Apple USB Ethernet part 2

    Well, after spending several hours on the phone with AppleCare is seems that my mini’s ethernet port went belly up at the exact same time I tried to install the Apple USB Ethernet adapter.
    It seems my ethernet port recognizes a connection but just doesn’t transfer data. I did boot from an external firewire drive and confirmed this. Crap, now I have to take my server in for repairs.
    Out of curiosity I created a bootable backup of the drive and was able to boot it from G5 mini where the install is on an Intel mini. Curious, but lucky.
    Now I have to figure out and try to document all the _extras_ that I put into my server install to replicate. I was told by AppleCare that I should re-install the server OS after.