Saturday, December 7, 2013

UPS Can Only Carry So Much (Without Help From You)

I have a love/hate relationship with SharePoint's User Profile Synchronization Service App.  I LOVE it when I get it working but I hate it when the deployment doesn't work as MS would like you to believe it should go.  I was going to say "doesn't go as expected" but anybody who has wrestled with UPS knows that it's almost expected it won't work.  In all fairness, the more I've done it, the better my success rate (our of the gate) has become.  It really comes down to be meticulous about doing each and every step along the way.  See this earlier post for the references you MUST read when messing with the full FIM-based UPS deployment/configuration/re-configuration:

http://derondilger.blogspot.com/2013/05/configuring-sharepoint-2010-ups-these.html


Anyway, here is another reference I also spend more time looking for than I should.  Thus this entry so I have my scratchpad to refer to.

When trying to determine which AD/User object properties get imported or can be set for bi-directional sync (using full FIM-based UPS, not the 2007/2013 AD-basic one-way-only sync!), this is the reference:

http://technet.microsoft.com/en-us/library/hh147510(v=office.14).aspx

So when certain fields in your users' profiles aren't populating and you've confirmed they ARE filled in on the user object in your domain's Active Directory, make sure that this list confirms they actually are carried over into SharePoint profiles by UPS.

Thursday, May 16, 2013

Erratic or Totally Missing eMails with Windows SMTP Server

This week I was doing configuration work on a client's new SharePoint Server 2010 farm to get inbound & outbound mail set-up.  This project had a slightly "one-off" requirement in that their business uses Microsoft Office365 for their employees' email and Office suite.  Ergo, there is no on-premise Exchange or other mail server and instead we needed to set-up SharePoint to route mail via their mail domain inside Office365.  Fortunately, John White has two great blog posts covering this topology (though it references Office365's "predecessor," BPOS):

http://whitepages.unlimitedviz.com/2010/09/integrating-sharepoint-on-premises-with-bpos-and-exchange-online-part-1outbound/

http://whitepages.unlimitedviz.com/2010/10/integrating-sharepoint-on-premises-with-bpos-and-exchange-online-part-2-inbound/

I had the configuration done and had started unit testing the setup.  Outbound email was working fine but as we completed more and more inbound email tests and confirmed the SharePoint site's mail-enabled document library was getting the emails it became apparent that not ALL emails were making it in.  Time to put on the troubleshooting faceshield, crap-waders, leather gloves and get out the proper tools for computer troubleshooting:

 

Spam filter folders/logs showed nothing amiss. Examination of the SMTP log files showed that each test message resulted in the Office365 mailservers connecting to our SMTP server and seemingly delivering the email messages successfully (e.g. 200-series status codes, bytes-transferred relative to the test email's attachments).  No error messages could be found in the SharePoint ULS nor the Windows Event Logs.  Then, looking in the SMTP server's Badmail folder (default location is C:\inetpub\mailroot\Badmail) we discovered where all the missing emails were going.

For each missing message sent, three files existed in the Badmail folder; a .bad, a .bdr, and a .bdp.

This MS KB article describes the three file types in more detail:  http://support.microsoft.com/kb/306043

But looking inside the .bdr files for an explanation gave only the following error information:


Unable to deliver this message because the follow error was encountered:This message is a delivery status notification that cannot be delivered.The specific error code was 0xC00402C7.

Sadly, that is a fairly generic error message and Googling it lead to many false leads (including the KB article above).


Over the course of several days we sent multiple messages from different email addresses (e.g. hotmail, gmail, internal to the client, etc.) and the puzzle only grew.  There seemed to be no absolute pattern to the failures. E.g. attachment v. no attachment, type of attachment, size of attachment, time of day, one sender v. another, one email service v. another, text in the body of the message.  Eventually, though, it started to seem that emails sent via corporate email servers (e.g. our Exchange server) had a higher failure rate.

So here is the short and skinny of it all:  The default setting in the MS SMTP Service (for IIS7.5...and probably all the way back to the first offering of SMTP Server) for the Maximum Hop Count is 15.

You can see that setting at the top of the Advanced Delivery tab as screenshotted in John White's coverage of SMTP configuration in his blog post (see URL above). Ignore his red circle around the Smart host parameter.....



In the old days, that was probably a pretty generous limit.  But, now days with outbound & inbound spam filters, corporate IP trackers, and global Web mail-provider networks (e.g. GMail), it seems it isn't that hard to have your email message passed through 15 machines on its zippity-do-da way around the big ole Internet as it goes to a server across the street from your office.  Depending on the gods-of-TCP/IP-routing and the current sum of the airspeed of all airborne English Sparrows, test messages that seemed to be identical tests resulted in different pass/fail results as some messages took slightly different (i.e. longer routes, they'd exceed the allowed Maximum Hop Count and the SMTP Server would do as configured and shove them into the Badmail folder.

 Raising the Maximum Hop Count to a more generous 99 (max allowed value is 255) solved the erratic-emails problem.


One other thing to note while your in the SMTP configuration is to ensure the message size and session limits on the Messages tab reflect modern email expectations...especially for a SharePoint server that will be accepting documents into a document library via email.  If nothing else, raise the "Limit Message Size To (KB)" parameter from its default value to something with real MB meat - e.g. 51200KB = 50MB (but don't forget that the default IIS & SharePoint file upload limits might still need to be addressed for your document library's needs, as well).


Sadly, the server never seemed to use the email address in the "Send Copy of Non-Delivery Report to:" parameter (aka Postmaster) to send an email notifying a human of the non-deliverable emails during our testing.

Oh, and here is a nice single-page overview sheet of the MS SMTP Server settings: http://www.tech-faq.com/understanding-and-managing-smtp-virtual-servers.html

Sunday, May 5, 2013

Configuring SharePoint 2010 UPS? These are must reads!

Are you sitting down to configure the User Profile Service in SharePoint Server 2010?  Of course you've read all the TechNet articles, but have you read these blog posts?  You simply must (and then distill them down to get the proper steps for what you're trying to do  - e.g Greg's steps are better suited for a demo enviro than with all the gritty details a real-world farm might entail).

Huge props to all the people who shared the info on these blogs as they sure kept my forehead from getting even more flat.

http://www.harbar.net/articles/sp2010ups.aspx

http://sharepointgeorge.com/2010/configuring-the-user-profile-service-in-sharepoint-2010/


And just in case you can't launch the Management page for your shiny, newly set up UPS service application:


http://social.technet.microsoft.com/Forums/en-US/sharepointadminprevious/thread/d5cde29d-cfe0-4b4d-92f7-86bac94c9041

http://social.technet.microsoft.com/Forums/en-US/sharepointadminprevious/thread/2e9b1a91-066f-41d6-a30f-2f7d25ad39f2/


Oh, and now I'm having a problem with the FIM Service not starting after a reboot.  This in turn (allegedly) is what caused my nightly incremental sync to fail...at least according to http://blogs.c5insight.com/Home/tabid/40/entryid/185/Resolve-an-TCP-10061-Error-with-the-SharePoint-2010-User-Profile-Service.aspx

So even though I'm not running an aliased SQL server for this latest farm, I'm trying the DTC "Allow Network Connections" mod as mentioned in this article (worthy for adding to the first two to make sure you have a good mix for your "distillation.")
http://kb4sp.wordpress.com/2011/06/03/setting-up-the-user-profile-servicequick-start-guide-2/

I'll let you know what happens after some more reboot tests.....

Thursday, May 2, 2013

Mexican (duh!) Fireworks - Dias de San Felipe del Agua


So the last week our town of San Felipe has been having one of its bigger celebrations.  The highlight of this week is the night with fireworks.  Every Mexican celebration has explosions (e.g. firecrackers, pop-bottle rockets, flash-bang mortars) but these are fireworks that are colorful.

Besides the carnival in the town square (with rides for kids and games such as "toss the ring on the bottle"), there are bands on the bandstand with couples dancing in the streets, and food & drink stands.  But mainly it's everybody getting together in the town square watching people and talking with friends and neighbors...and a heavy dose of passing around mezcal bottles....though not as much as during the winter celebrations it seemed.

We joined our neighbors in the square a bit after 7:30 pm and passed the time playing, eating, drinking and talking.  We were hoping they'd start the fireworks around midnight and we'd be home by 1am.  We ended up getting home around 4am.

Here are some videos from different celebrations years ago to give you an idea of what we watched once the fireworks started.

Around 1am they started the "dancing with the bulls and angels."  The crowd gathers around and people take turns putting these handmade contraptions on their heads.  The sparks fly everywhere, sometimes burning items shoot off into the crowd (as we are all gathered right around the "performance area"), and all the bulls and angels include whistles and explosions in addition to the colored sparkles.  In this video the crowd is nowhere as pressed in as last night. In addition, there was usually at least two figurines dancing while zero to six helpers danced with and taunted the "bulls" (as you'll see some do in this video). The bull & angel dancing went on here last night way too long.  Maybe 50-60 of these as we waited for the grand finale: El Castillo

https://www.youtube.com/watch?v=flmQBL6pliQ



This next video really doesn't do justice to seeing a castillo going off. It starts with more "bull dancing" and the castillo fires up at around 1:58min. The whole thing is on a tower maybe thirty to forty feet high with the crowd gathered around its base as close as they dare with all the falling sparks. For us that means they are maybe six to ten feet from it.  Kids on their parents' shoulders, babies sleeping against their mother's bosom, town drunks sleeping against a lamp-post base all right up in the mix of it all. As always in Mexico, there is zero concern for personal safety...life is short and God will decide if yours should be shorter (or completed sans eye or limb).

https://www.youtube.com/watch?v=D2QpL7iEh5E

Wednesday, February 13, 2013

Gilbert Construction's New Web Site

My cousin's residential remodeling business has a new Web site. Check it out. Gilbert Construction & Remodeling = www.GilbertRemodel.com