Monthly Archives: March 2012

Installing and Configuring Windows Server 2008 SMTP

Installing SMTP Server Feature on Windows 2008 is an easy process requiring only few steps to complete. On this article we will describe a step by step configuration and installation of the SMTP Server feature and how to enable the smtp to relay from local server.

Step 1:

Opening Server Manager Console and under Features select Add Features

Step 2:

Selecting SMTP Server option

Step 3:

Click on Install wait until finish and click close

Step 4:

Waiting for installation to finish and clicking on Close

Step 5:

Opening IIS 6.0 Manager under Administrative Tools -> Internet Information Services 6.0

Step 6:

Under [SMTP Virtual Server] second mouse click and properties

Step 7:

Select Relay under Access Tab

Step 8:

Select Only the list below and click on Add button

Step 9:

Enter IP Address 127.0.0.1 for relay

Step 10:

Sending a manual email through telnet to confirm everything working successfully. Telnet localhost 25 or telnet yourpublicip 25 and make sure you open the specific port on your firewall to be available to public.

http://www.itsolutionskb.com/2008/11/installing-and-configuring-windows-server-2008-smtp-server/

Setting up a Local Mail Server for a SharePoint Virtual Machine on Server 2008

The only way to do software development for SharePoint is really a Virtual Machine. Yes, with SharePoint 2010 you can install it on Windows 7 and Vista and with some hacking you can get SharePoint 2007 to run on Vista. However I’m talking about real development for real men (and women!). For that we setup virtual machines (VMs) and usually run the whole SharePoint stack on it (SharePoint, SQL Server, Visual Studio, SharePoint Designer, Office, etc.).

One of the key advantages of running in a VM is the ability to run your SharePoint server as a domain controller (or at least connected to one) where you have ultimate control over it. This allows you to practice safe installs, spin up an environment with exactly the same OUs as your production environment, use the same account names, etc. all without having to peeve off your friendly neighbourhood domain admin.

The last piece of the isolated puzzle is getting mail working. SharePoint supports both mail out (alerts, etc.) and mail in (email enabled document libraries). However for this trick you need a mail server, or an incredible simulation of one. Very often people go to the trouble of installing a copy of Microsoft Exchange which falls into the bazooka-to-swat-a-fly realm. Exchange is big and heavy and a bugger to configure and run, all for what? A few emails that trickle into your VM and to an administrators mailbox?

Here are two options that will prevent you from setting up an Exchange server, which should only be left for those with a desire to hurt themselves.

Do you really want to hurt you?

Server 2008 SMTP Server

First up is the Windows Server 2008 SMTP services. If you’ve installed Server 2003 you know that it came with a SMTP server and it was pretty easy to setup (here’s a great walkthrough). With Windows Server 2008, there’s no longer a Mail Server role but you can still install the SMTP services.

SMTP services are now a “Feature” (not to be confused with SharePoint Features). Open up Server Manager and under Features select Add Feature. Select the SMTP Server option, click Install and go have a short siesta.

SMTP Server as a Feature!

Now what can you do with it? Not much but if you want to do anything, you have to install the IIS 6.0 Management tools (a disadvantage of one tool requiring legacy features, just one of the many with the SMTP service). Once you have the IIS 6.0 tools installed, you can cry a little. I did. Then launch the IIS 6.0 Manager, cry again, and you’ll see the SMTP services in the tree. Right click on the menu to bring up the SMTP properties.

I want nice things...

Select Relay under the Access tab:

Go ahead, add a relay!

Select “Only the list below” and click Add:

Just the list, nothing else

Enter 127.0.0.1 for your local address:

There's no place like 127.0.0.1

So now you have a local SMTP service that will relay messages from the local system. Splendid. However this is only for SMTP. What about POP3? That’s where it gets tricky and frankly, this blog is not going to go to that bad place. I did manage to find a POP3 “extender” for Windows Server 2008 so you can explore that here and give it a shot. However that gets you part of the way there and there’s still the issue of adding domains, only having unauthenticated users, and IMAP… well. All of these add up to a big headache to configure and while SMTP services is a far cry from the bloat that is Exchange, there are other sane options.

Sidebar: You might be wondering why I walked you through the setup of SMTP services only to direct you somewhere else. Hey, I’m all about free choice so if you’re happy and you know it then clap your hands and stick with SMTP. If you want to live like the rest of us do, read on.

So Exchange is out (unless you really enjoy chewing up 4GB of your precious VM just to deliver mail) and SMTP services have left a bit of a bad taste in our mouths. What else is there?

hMailServer

I stumbled across this server tool accidently sometime in 2005 or something. I can’t remember exactly but it was a pre-beta that worked well. It’s a complete mail server for Windows and can run on XP, Server 2003, Server 2008, Vista and Windows 7. It supports all the basic protocols (IMAP, SMTP, POP3) and does what it should. Deliver email.

I just install stuff

On top of delivering mail it supports mapping to domain accounts, having your own accounts (username/password), security, auto out-of-office messages, mailbox limits, customization out the ying-yang, and all sorts of options and gadgets. The brilliant part of the system is that it’s easy to setup and get running (add your domain and you’re done) but you can have your cake and eat it too. Run it stripped down and simple or load up all options to make it that much more filling.

Best of all, it’s totally free (as in beer). And hey, if you want the source code is available up to version 4.x (the current version is 5.x and closed source).

You just download and run the installer. Takes about 1 minute (literally) and it’s up and running. It comes with it’s own embedded database (used to be an embedded version of MySQL but later versions now ship with SQL Server Compact Edition which is just a single DLL) to store the configuration and emails.

Don’t get too choked up in all the options. There are many but it’s the simplicity of this tool that makes it shine and since it supports POP3 and SMTP (along with IMAP) it’s almost like having Exchange running. If you do decide to turn on logging, add multiple domains and security, forwarding, etc. it’s all built in. Nothing to download or add-on. All the nice additional wrappers sent by SharePoint to Outlook are intact so you can still interact with your SharePoint system from your email client. The only drawback is there’s no calendaring element so that’s out, but otherwise it’s all good to go for any budding SharePoint developer (or anyone that wants to debug emails going through a system).

Security, security, security

So really. This is one of those things I have in my toolbelt when it comes to SharePoint and I don’t setup a server without it. It’s a breeze to setup, free, and does everything you need it to for your virtual environment except feed the cat and impregnate your daughters (or is that the other way around?). Check out hMailServer and give it a whirl.

http://weblogs.asp.net/bsimser/archive/2010/07/12/setting-up-a-local-mail-server-for-a-sharepoint-virtual-machine-on-server-2008.aspx

SharePoint: How To Configure Scripts to Run Automatically in Task Scheduler

  1. Logon to the Windows 2008 R2 Server as Administrator.
  2. Navigate to Control Panel.
  3. Double-click on Administrative Tools.
  4. Double-click on Server Manager.

    2012-03-21-ConfigScriptsRunAuto-01.png

  5. Right-click on Task Scheduler, and click on Create Task.

    2012-03-21-ConfigScriptsRunAuto-02.png

  6. In the General Tab, type a preferred name of the script.

    2012-03-21-ConfigScriptsRunAuto-03.png

  7. In the Description field, type in the required description.
  8. Click the radio button Run whether user is logged on or not, so it is selected.
  9. Click the Triggers tab.

    2012-03-21-ConfigScriptsRunAuto-04.png

  10. Schedule the task as per the requirement.
  11. Click OK.
  12. Click Actions tab.

    2012-03-21-ConfigScriptsRunAuto-05.png

  13. Copy and paste the following line in Program/Script field.

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

  14. Copy and paste the following line in Add arguments(optional) field.
    • NoLogo -NonInteractive -File "F:\location of the script\Script Name.ps1"
  15. NOTE:
    • Replace the location of the Script with the exact location where the script is located.
    • Replace the Script Name.ps1 with the name of the script file.
  16. Click OK.
  17. Click on the Settings tab.
  18. Click the check box Stop the task if it runs longer than, so it is unchecked.

    2012-03-21-ConfigScriptsRunAuto-06.png

  19. Click OK.

https://www.nothingbutsharepoint.com/sites/devwiki/articles/Pages/SharePoint-How-To-Configure-Scripts-to-Run-Automatically-in-Task-Scheduler.aspx

Install SharePoint Server 2010 on Windows 7 x64

If you want to install WSS v3 / MOSS 2007 on Windows 7 you have to made some changes. When you try to install in a "normal" way, it will fail and receive a big error:

2012-03-16-InstallSP2010OnWindows7-01.png

It seems that SharePoint Server 2010 is only compatible with Windows Server 2008 x64. But it’s not.

Ok, start up Process Explorer while the installer splashscreen is running and you’ll see the following:

2012-03-16-InstallSP2010OnWindows7-02.png

You will notice that the installer was unpacked in C:\Program Files (x86)\MSECache\oserver2010. You can browse to that directory now.

  • Go to C:\Program Files (x86)\MSECache\oserver2010
  • Go to the Files folder
  • Go to the Setup folder
  • Open config.xml
  • Add the following line before the closing </configuration> tag

<Setting Id="AllowWindowsClientInstall" Value="True"/>


Once you’ve modified the config file, you’ll be able to install SharePoint Server 2010 on your Windows 7 machine!

Now you can have your development environment without even dual booting with Server 2008.

https://www.nothingbutsharepoint.com/sites/itpro/Pages/Install-SharePoint-Server-2010-on-Windows-7-x64.aspx

The hidden TimeCard list template

  1. Activate the Group Work Lists feature of the site.
  2. Choose Site Settings > Manage site features > Activate Group Work Lists feature .

After activating this feature, you can create a TimeCard list in SharePoint Designer:

  1. Open the site in SharePoint Designer .
  2. Choose File > Add Item > More Lists > Time Card.
  3. The Time Card list will be created with a default view called My Time Card .This is the MyTCard.aspx page .You can edit it in SharePoint Designer or in browser .

http://sharepointdragons.com/2012/03/21/the-hidden-timecard-list-template/