Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Forcefully recalculate/update message counts and disk quota - MDaemon




Situation:

I have removed some mails from the MDaemon server from the backend,ie, browsed through the mail box and deleted some mails maunally without using MDeamon's application. In this case, the new mail box count and quota will not reflect in the wordclient and MDaemon's backend application. You can follow the steps shown below to update the message counts and disk quota manually.

Solution:


1. The results of user quota checks are maintained in the 'MDaemon\App\quotacounts.dat' file.

Create a file named 'ClearQuotaCounts.sem'.
If you wish to clear the cached quota value for a user, add the user’s email address to this SEM file and then place it in the MDaemon\App directory.
If you wish to clear all cached counts, just place a single  * character in it. and then place 'ClearQuotaCounts.sem' file in the MDaemon\App directory.

2. Then open MDaemon and go into the Queues >> Queue and Statistics Manager



3. Once you click the 'User Page', the page will start to update with new quota and message counts. The file 'quotacounts.dat' will updated with new values once the 'User Page' is fully loaded.





Reference:
http://mdaemon.dutaint.com/9.0/RouteSlips.html

Create BCC of incoming and outgoing mails without knowing the users - MDaemon




MDaemon has a 'Content Filtre' feature which will help you to filtre the emails sending/receinving through MDaemon server. The following screen shots will help you to find this feature.

1. Open MDaemon,
    Security >> Content Filtre


2. You can find a sectip to Add Rules in there. Click the option, 'New Rule'.



3. You can select the condition in the left column and select Approproate actions in the right column.



4. The selected rules and conditions will be shown in the bottom section. You an select the underlined blue line section in the bottom section to add the values to the rules.
Here i have selected the 'To Header' filter. The given screen shot will help you to find more options.



5. Once the values are given click 'Add' and then Ok. You can now verify the settings by sending test mails.



That's it....

Setting up PHP/PHP-CGI on Windows Server 2003 - IIS-6



PHP/PHP-CGI on Windows Server 2003


If you want to setup php-cgi instead of php, you can modify the steps shown below to 'php-cgi' instead of 'php'.

You can give php-cgi.exe instead of php.exe. All other remains the same.

Here i am using windows server 2003 and IIS6.0. PHP zip file is extracted in  C:\PHP directory. It is assumed default ACLs/Permissions.


1. Unzip the latest PHP ZIP file to C:\PHP, and copy php.ini-recommended from that folder to C:\windows\php.ini, then copy php5ts.dll to C:\Windows\System32. Also Rename C:\php\php.ini-recommended to C:\php\php.ini and then COPY it to C:\Windows





2. Load IIS from the Administrative tools in the Control Panel by clicking Start -> Administrative Tools -> IIS Manager.





3. Click the name of your computer then click "Web Service Extensions", on the left side of the main frame you can find a green arrow pointing to a link that says "Add a new Web service extension...", click that link.






4. Set the extension name to anything you'd like. Here i created in name, 'PHP' put C:\PHP\php.exe as the Required file, also check "Set status to allowed"




5. Go to the directory you'd like to configure PHP for in the IIS Manager(Here the name of the directory is 'phpscript'), right click it, and select properties.
I have created the directory by running, 'md c:\inetpub\wwwroot\phpscript' in cmd.





6. Click the Create button, set the Execute permissions to "Scripts only", then click the Configuration button.




7. Click Add.  For the Executable put - C:\PHP\php.exe for the Extension put ".php", set the verbs to all, and make sure the bottom check boxes are checked. Then Click OK and OK.








8. Create a phpinfo page in the directory,c:\inetpub\wwwroot\phpscript. Here i have created info.php and verified the result, by loading the following url from the server.
http://127.0.0.1/phpscript/info.php



That's it..

Setting up PHP-ISAPI on Windows Server 2003 - IIS-6


PHP-ISAPI on Windows Server 2003


Here i am using windows server 2003 and IIS6.0. PHP zip file is extracted in  C:\PHP directory. It is assumed default ACLs/Permissions.


1. Unzip the latest PHP ZIP file to C:\PHP, and copy php.ini-recommended from that folder to C:\windows\php.ini, then copy php5ts.dll to C:\Windows\System32. Also Rename C:\php\php.ini-recommended to C:\php\php.ini and then COPY it to C:\Windows



2. Load IIS from the Administrative tools in the Control Panel by clicking Start -> Administrative Tools -> IIS Manager.




3. Click the name of your computer then click "Web Service Extensions", on the left side of the main frame you can find a green arrow pointing to a link that says "Add a new Web service extension...", click that link.


Add caption




4. Set the extension name to anything you'd like. Here i created in name, 'PHP-SAPI' put C:\PHP\php5isapi.dll as the Required file, also check "Set status to allowed"


5. Go to the directory you'd like to configure PHP for in the IIS Manager(Here the name of the directory is 'phpscript'), right click it, and select properties.
I have created the directory by running, 'md c:\inetpub\wwwroot\phpscript' in cmd.





6. Click the Create button, set the Execute permissions to "Scripts only", then click the Configuration button.



7. Click Add.  For the Executable put - C:\PHP\php5isapi.dll for the Extension put ".php", set the verbs to all, and make sure the bottom check boxes are checked. Then Click OK and OK.








8. Create a phpinfo page in the directory,c:\inetpub\wwwroot\phpscript. Here i have created info.php and verified the result, by loading the following url from the server.
http://127.0.0.1/phpscript/info.php



That's it..



Plesk (Windows) - Change Auto-reply Limit of a Mail Account





Change Auto-reply Limit of a Mail Account - Plesk (Windows)



Issue:

If I enable auto-reply in my Parallels Plesk Panel (PP) email settings and send a test email to that account, I get an auto-response. But, if send another test email, I do not get any autoresponse, i.e., it works only once.

There is a parameter in the "psa" database -- mail_resp.ans_freq -- that defines the daily auto-reply limit for each mailbox, and it is set to "1" by default.


Solution:


C:\>cd %plesk_bin%

To check the autoreply limit of all mail accounts in the server.

C:\Program Files (x86)\Parallels\Plesk\admin\bin>dbclient --direct-sql --sql="select concat(m.mail_name , '@' , d.name) as mailname, mn_id, r.ans_freq from mail m, domains d , mail_resp r where m.dom_id = d.id and r.mn_id = m.id;"


To set the auto reply value=10 for mail account, where mn_id=xx.

C:\Program Files (x86)\Parallels\Plesk\admin\bin>dbclient --direct-sql --sql="update mail_resp set ans_freq=10 where mn_id=xx;"

To set the auroreply value=10 for all mail accounts in the server.

C:\Program Files (x86)\Parallels\Plesk\admin\bin>dbclient --direct-sql --sql="update mail_resp set ans_freq=10;"


Note:

If you want to set the limit to zero, give ans_freq=0
If you want to set the limit to unlimited, give ans_freq=NULL


Reset MySQL root password - Windows


1. Stop your MySQL server completely.
    If it is running as a service, You can run the following commmand in cmd to stop sql service.

    C:\> net stop mysql

    or

    Start > run > services.msc  > MySQL > right click and select STOP



    If it is not running as a service use the windows taskmanager to stop the server.

2. Open your MS-DOS command prompt using "cmd" inside the Run window. Inside it navigate to your MySQL bin folder, like
   C:\> cd "C:\Program Files\MySQL\MySQL Server 5.0\bin"

3. Execute the following command in the command prompt:

   C:\Program Files\MySQL\MySQL Server 5.1\bin > mysqld.exe -u root --skip-grant-tables

4. Leave the current MS-DOS command prompt as it is, and open a new MS-DOS command prompt window and,
   C:\> cd "C:\Program Files\MySQL\MySQL Server 5.0\bin"

5. Enter the mysql command in the cmd.
  C:\Program Files\MySQL\MySQL Server 5.1\bin > mysql
  Welcome to the MySQL monitor.  Commands end with ; or \g.
  Your MySQL connection id is 181052
  Server version: 5.1.68-cll MySQL Community Server (GPL)

  Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

  Oracle is a registered trademark of Oracle Corporation and/or its
  affiliates. Other names may be trademarks of their respective owners.

  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

  mysql>


6. Now this time you will be directly login to mysql root user without password. Now execute the following commands in mysql prompt to reset the mysql root password.

   mysql> use mysql;
   mysql> UPDATE user SET Password = PASSWORD('NEW_PASSWORD') WHERE User = 'root';

7. Then close the first command prompt and type "exit;" in the second command prompt to exim from mysql prompt. You can now start the MySQL service.

'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine


Error:


ERROR in Creation : The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.


Solution:

I am using Windows Server 64 bit, MS Office 2010 64 bit.

Download and install 2007 Office System Driver: Data Connectivity Components using the following url.

This download will install a set of components that can be used to facilitate transfer of data between 2010 and 2007 Microsoft Office System files and non-Microsoft Office applications.

http://www.microsoft.com/download/en/confirmation.aspx?id=23734

The above install will fix the error mentioned in this post.
It will work for both Microsoft Office 2010 and 2007.

Microsoft JET Database Engine error '80004005'


Error:

The following error typically occurs when your script attempts to perform an UPDATE or some other action that alters the information in the database.

===========================================================================================
Microsoft JET Database Engine error '80004005'

The Microsoft Jet database engine cannot open the file 'C:\Inetpub\vhost\YourSite\Databases\YourDatabase.mdb'.
It is already opened exclusively by another user, or you need permission to view its data.

/YourSite/YourDataAccessPage.asp, line 15
=============================================================================================


Solution:

The above error occurs because ADO(ActiveX Data Objects) is unable to write to the Microsoft Access database due to insufficient write/modify permissions, which can be easily fixed by granting read/write to IUSR_<machineName> and IWAM_<machineName>.

IUSR_<machineName> and IWAM_<machineName> come into focus when an anonymous web user needs to modify the Microsoft Access database & while doing so Jet creates an .ldb file to handle database locking. If the above mentioned 2 users don't have the necessary permissions, the lock file isn't created & ultimately the Microsoft Access database can't be modified.

To fix this problem,

1. Make sure that the MDB file itself isn't marked as read-only.
2. Right click the folder in which the *.mdb files belongs and choose the properties option and select the Security tab. Give read/write permissions to IUSR_<machineName> and IWAM_<machineName> users. If there is no such users listed in it, add those users for that folder.



Note:-
There is also an alternate solution for this issue. You can find a user called 'everyone', add this user for the folder in which *.mdb belongs and give read/write permissions. But this is not good because of security reasons.

Reference:

http://imar.spaanjaars.com/263/how-do-i-fix-asp-80004005-errors

WebAdmin link for MSSQL database shows 404 page not found


Error:

WebAdmin link for a Plesk user's MSSQL database shows 404 page not found.

Login To Plesk >> Databases >> WebAdmin show below error(Redirects to URL below):

==================================================================================================
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /mssql/app/connect.aspx

WebAdmin link for their MSSQL database shows 404 page not found.
==================================================================================================


Solution:

1. Firstly try to ping the sub-domain mssql.mydomain.com and check if it is working or not, if not, you need to create a dns entry for mssql. If the same error still persists, you can run the following commands in the 'cmd'.

2. Run the commands one by one in 'cmd'

   > cd %plesk_bin%

   > websrvmng.exe --reconfigure-sqladmin
   > defpackagemng.exe --fix --type=sqladminmssql

Error in Detach a database in the MSSQL Management Studio


Error:

When you try to Detach a database in the MSSQL Management Studio, you may seen the following error.
When this issue happend to me, there is no issues in creating, deleting, detaching database. There is problem only in the Detaching option.

-----------------------------------------------------------------------------------------------------------------------------------------------------
C:\Program files(x86)\Parallels\Plesk\Databases\MSSQL\MSSQL.1\MSSQL\Data
Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.
-----------------------------------------------------------------------------------------------------------------------------------------------------

Solution:

1. Run services.msc to view all the Services in the server.

2. Find the service named "SQL Server(MSSQLSERVER 2008)".
    Check the "Log On As" column of that service, whether it is 'Local System' or 'Network System'.
    If it is 'Network System', you have to change to 'Local System', which will fix your issue. The following screenshots will give you to change it.


3. Right Click on the particular service and select 'Properties' option.


4. Select 'Log On' tab and select the option,
       Log On As:
       Local System Account
       Click on Allow service to interact with Desktop
   Then click option OK.


5. You have to restart the service to make changes in effect.
     Select General tab. You Stop and Start the service in there.
     Then click option OK.



Thanks...

ColdFusion - Security: The requested template has been denied access to cfregistry


You may get an error(as shown below) in the browser when you try to access a website written in coldfusion.



By default, CFRegistry tag is disabled in the server. On CFMX this affects the CFApplication tag if client storage is left to it's default or set to "Registry".

At default, the CFApplicaiton tag has a parameter of clientstorage with a default value of Registry. By disabling the CFRegisty tag, this creates a conflict. To resolve the problem, the CFApplicaiton tag MUST include the clientstorage="Cookie" or clientstorage="Datasource_Name" to ensure that CFMX does not try to access the registry.

Here is an example of a good CFApplication tag.

<cfapplication name="Your_App_Name"
clientmanagement="yes"
sessionmanagement="yes"
setclientcookies="yes"
setdomaincookies="yes"
sessiontimeout="#createTimeSpan(0,8,0,0)#"
applicationtimeout="#createTimeSpan(0,8,0,0)#"
Clientstorage="Cookie"   <----- Add this line in cfapplication tag
loginstorage="session">

Note:- You can follow the links given below for clodfusion related information.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_a-b_5.html