After spending several hours of googling and decompiling, I found a solution:
public void OnSiteMailBoxMenuClick(IRibbonControl control)
{
Folder folder = control.Context as Folder;
if (folder != null)
{
string containerProp = folder.PropertyAccessor.GetProperty(@"http://schemas.microsoft.com/mapi/proptag/0x3613001E");
if (containerProp == "IPF.ShortcutFolder")
{
string sharePointSite = folder.PropertyAccessor.GetProperty(@"http://schemas.microsoft.com/mapi/proptag/0x6647001E");
}
}
}