Friday, December 12, 2008

Response.Redirect in UpdatePanel Ajax

Sometimes we have to use the Response.Redirect function in a UpdatePanel... But in most cases this function give an error. Usually, it's 'cause a bit of configuration is missing, in web.config
So, if we add

<httpModules>

<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</httpModules>


all works fine.

Friday, December 5, 2008

Pruning "Trash" and "Spam" folders automatically on MDaemon

The accountpruner is a powerful tool, but it’s not always the easiest thing to use. With that in mind, here are some rules from my \MDaemon\App\midnight.bat file that might be useful. This batch file is executed by MDaemon at midnight each night. (If you haven't this file, you can create it and it works).

c:\MDaemon\App\AccountPrune.exe /m /d=10 /p=”Spam.IMAP”
c:\MDaemon\App\AccountPrune.exe /m /d=10 /p=”Junk Mail.IMAP”
c:\MDaemon\App\AccountPrune.exe /m /d=10 /p=”Junk E-mail.IMAP”
c:\MDaemon\App\AccountPrune.exe /m /d=2 /p=”Trash.IMAP”
c:\MDaemon\App\AccountPrune.exe /m /d=2 /p=”Deleted Items.IMAP”
c:\MDaemon\App\AccountPrune.exe /m /d=2 /p=”Deleted Messages.IMAP”


Obviously, if you have installed MDaemon server in an another path, just use it.

The result is that at midnight each night, MDaemon’s accountpruner will go through each user’s mailbox, and in each of the “Spam”, “Junk Mail” and “Junk E-Mail” folders, delete all messages over 10 days old.

In the “Trash”, “Deleted Items” and “Deleted Messages” folders, messages over 2 days old will be deleted. Combine this with the accountpruner’s own options to delete IMAP mail flagged as deleted, and you’ll have a solution that works for users of all mail clients, whether the mail client uses a dedicated “Trash” folder, uses IMAP deleted flag, or both.

Thursday, December 4, 2008

VmWare ESX with Windows based NAS (NTFS)

Above there is the complete procedure to use a Windows Based NAS NTFS share as NFS for VMware ESX server.

The main steps in this process are:

  1. Installing Windows Services for UNIX (WSFU)

  2. Copying the ESX Server password and group files to Windows

  3. Configuring WSFU for accepting ESX Server connections

  4. Sharing the Windows folder for NFS compatibility

  5. Configuring the ESX Server to mount the Window NFS Share as Datastore.



1. Installing Windows Services for UNIX (WSFU)

Download windows services for UNIX at:
http://www.microsoft.com/windowsserversystem/sfu/downloads/default.mspx

Install WSFU on the desired machine
Add in the following options
NFS + Server for NFS
Authentication tools for NFS + user name mapping
After installation, open services control panel applet and change the service ‘User Name Mapping’ to startup automatically and then start the service (if it's not started)


2. Copy the ESX Server password and group files to Windows

Use a program like WinSCP or similar process to copy the following files to your local system where WSFU is installed
You can get WinSCP from the fowling location.
http://winscp.net/eng/download.php#download2
Transfer the file /ect/password and the file /ect/group to C:\SFU or to the location where you installed WSFU


3. Configure WSFU to accepting ESX Server connections

Click Start, Programs, Windows Services for UNIX, Services for UNIX Administration
Go to user name mappings then configuration
Click password and group files
Then browse for the password and group files that you copied, from the browse dialog box for both the password and group fields
Click apply
Then go to maps
Click Show User Maps
List Windows users and list Unix users
Then select a local administrator user on the left that will be mapped to the root account and the root user on the right.
Then click on Add button
Then click apply (upper right)



4. Sharing the Windows folder for NFS compatibility

Right click the local folder you wish to share via NFS
Share the folder by clicking NFS sharing
Type in the name for the share i.e. NFS-VMFS01
Remove allow anonymous access
Click permissions
Now Change type of access to “Read+Write” then check allow root access.


5. Configure the ESX Server to mount the Window NFS Share as VMFS

Open the VC client and highlight the Vi3 host
In the Configure tab choose Networking
Add networking, VMKernel then pick a vSwitch, then give the VMkernel an IP that is accessible via the NFS host.
Now open the storage option for this host
Click add storage, > Network File System
In the Server Field enter in the name or the ip address of your server
In the Folder field enter /NFS-VMFS01 (or the name you give to the share)
For the Datastore I also used NFS-VMFS01