Most of the hosting providers offer free server migration. The free website migration started as early as 2005, in the industry. But only a few providers offer the email migration for a website transfer involving different control panels. So using getmail is the easiest way to transfer emails. All we need is to create the email account in the new server and configure the getmail to transfer the emails.
Download getmail at http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz
wget http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz tar xzf getmail-4.20.3.tar.gz cd getmail* python setup.py install
Now you have to create a getmailrc , the getmail configuration file inside the home folder of the user. getmailrc need not be inside the home directory. You have to create the folder .getmail where getmail keeps a log of the emails retrieved based on each configuration file you may have.You can have multiple destination and retriever sections in one single getmailrc as well.
I must say getmail is so much flexible and rightly coded when the mailsync or imapsync didn’t do their job right or up to the mark. And is an excellent replacement for fetchmail. It supports POP, POP3S, IMAP4 and IMAPS, and also can store the mails retrieved in mbox or maildir format at the destination.
An extremely simple getmailrc file will look like this
[retriever] type = SimpleIMAPRetriever server = mail.domain.com username = direct@domain.com password = direct [destination] type = Maildir path = /home/cpusername/mail/.direct@domain_com/
The file format should be pretty self-explanatory. You’re telling getmail to fetch your email from server, mail.domain.com by logging to it using the mentioned username and password. The destination section mentions where to store the retrieved email and in which format (Maildir or mbox or mboxrd). Make sure that the cur, new and tmp are there inside those folder though. However getmail may create those folders automatically though.
Finally to get this going, just run “getmail –rcfile getmailrc”
Once you run it, assuming that the getmailrc is properly configured, you will be welcomed by a below output.
getmail version 4.20.3 Copyright (C) 1998-2009 Charles Cazabon. Licensed under the GNU GPL version 2. SimpleIMAPRetriever:direct@domain.com@mail.domain.com:143: msg 1/3983 (299328 bytes) delivered msg 2/3983 (2815 bytes) deliveredContinue Reading
Error when trying to logout would be as below and won’t let you logout as well.
“This request cannot be completed because the link you followed or the form you submitted was only valid for minutes. Please try again now.”
Solution
Edit C:\inetpub\vhosts\webmail\horde\lib\horde.php (Drive Letter will depend on where you installed Webmail/Plesk and configured IIS to load virtual hosts from)
And search for section ” SESSION['horde_form_secrets' " in the Horde.php and instead of
if ($_SESSION['horde_form_secrets'][$token] + $GLOBALS['conf']['urls']['token_lifetime'] * 60 < time()) {
return PEAR::raiseError(sprintf(_(“This request cannot be completed because the link you followed or the form you submitted was only valid for %s minutes”), $GLOBALS['conf']['urls']['token_lifetime']));
}
it should be
if (($_SESSION['horde_form_secrets'][$token] + $GLOBALS['conf']['urls']['token_lifetime']) * 60 < time()) {
return PEAR::raiseError(sprintf(_(“This request cannot be completed because the link you followed or the form you submitted was only valid for %s minutes”), $GLOBALS['conf']['urls']['token_lifetime']));
}
Note the extra braces in red + bold
Continue ReadingThis error is shown while removing a domain from plesk panel. When trying to remove the domain for the first time, it will show a success. But on listing the domains again from plesk, we will find the entry for the domain with a cross mark to the left of it hinting that the domain was tried for removal but still, not properly removed
We can verify this. Try adding a new domain of the same name and it will show an error stating that the an entry for the domain already exixts.
So after several tries we find that it is not possible to remove the domain from the plesk interface. So the problem needs to be dealt at the root level. So what is the root of all the entries in plesk? Of course the plesk’s DB ! Here are the steps to follow for the troubleshoot:
1) Since plesk uses different DBs we shall now try to find what DB server it uses.
Go to Start>All Programs>Plesk?Plesk Reconfigurator. In the pop up window obtained, select ‘Switch DB provider’. Note the field for ‘Server Type’. It will show the DB type plesk is currently using. You may find that it supports MySQl,MSSQL and Jet. I shall now continue the article with refernce to Jet DB.
2) Now we have our target clear: editing plesk’s Jet DB to remove all instances of a particular domain. We shall now try to find a frontend GUI tool for editing plesk’s Jet DB tables. I used ‘MDB Viewer Plus’. It is a DB viewer combined and an editor software. You can download the file from:
http://www.alexnolan.net/software/MDBPlus.exe
Then proceed with the installation.
3)Run the program. Navigate to File>Open. Now search for the DB location. It will usually be in %Program Files\Parallels\Plesk\admin\db\psa.mdb. Open the particular db.
4)Open the ‘Query’ from the toolbar. This helps us to execute MSSQL queries from this program. Into the space for query, enter:
SELECT d.name FROM domains d LEFT JOIN dns_zone z ON d.dns_zone_id=z.id WHERE z.id IS NULL;
and click ‘Execute’. It will display the list of domains having missing or inappropriate IDs in psa.mdb.
The meaning and reason for the error is that in the DB file psa.mdb, the ‘dns_zone_id’ record in the table ‘domains’ points to inexistent ‘id’ record in ‘dns_zone’ table for one or several domains. It may happen because of Plesk internal issues, broken database, incomplete domain deletion. We shall verify this now.
5) In the toolbar for the list of tables of the psa.mdb, navigate to the table ‘dns_zone’. You will find multiple entries for the domain in question. Remove the latest entries and then note the ‘id’ record for the particular domain.
6)From the toolbar navugate to the table ‘domains’. Click on the domain in question. Then move the scroll bar below to search for the record(or coloumn ‘dns_zone_id’). Note the this id. You will note that this will be different from the ‘id’ record in step 5. This mismatch had led to the dns zone being NULL for the particular domain.
7)We can verify this by running commnads in ‘Query’ toolbar also. Open ‘Query’ from the toolbar and run the commands:
a. to verify step 5: Select id from [dns_zone] where name=’domainname’
b. to verify step 6: Select dns_zone_id from [domains] where name=’domainname’
We can see the two different id results.
8)So we need to eliminate this mismatch. For that we will need to provide the correct id for the table: ‘domains’. For this we will replace the result of 7)b with 7)a. Run the following command:
UPDATE domains SET dns_zone_id=’dns-zone-id’ WHERE name=’domainname’;
Replace dns-zone-id with the result of 7)a.
The issue is fixed !
If you have logged in as admin, select the domain for which you want to make the change or if as a normal plesk user, select ‘Virtual Directories’ under ‘File’ menu. Below is the screen shot:
In the page that you obtain, you will see ‘Directory Properties’ . See below:
Click on ‘Directory Properties’. The page resulting wil have the options for changing the Directory Index for a domain. See the pic given:
Here you can set the priorities for your index pages.
Continue ReadingCould be a bug with Plesk 9.5 version. But Plesk 9.5 is giving issues once in a while in deleting the domains which are “partially” created.
ISSUE
DNS zones are never created, and the DBs are not properly updated. Even after reconfiguring the domains using websrvmng.exe –reconfigure-vhost –vhost-name =”domain.com” it couldn’t be deleted. Shows the message “Information: Domains are now removed”, but in real, the domain will be still shown under the domains list.
And the domain will be in suspended state. Unsuspension of the domain will result in an error message “DNSZone::Table::select() failed: no such row in the table”
Solution for the above issue is explained at http://www.supportsages.com/blog/2009/08/plesk-account-unsuspension-tableselect-failed-no-such-row-in-the-table/
However even after fixing the DNS like this, the issue cycles.
Removal of domain results in suspension of domain -> Unsuspension of domains results in above error -> Fixing the error allows to unsuspend and Removal of domain results in suspension of domain
SOLUTION
So solution I used to solve was to manually remove the domain related entries from plesk database, from the file system and also from the email services. Get into MySQL or whichever DB plesk is using. For finding the current DB, use Plesk Reconfigurator and then follow the parallels KB found at http://kb.parallels.com/en/3472
The instructions below assumes that you are using Mailenable and Plesk vhosts directory is at “C:\Inetpub\Vhosts” . This location can be at D:\ or E:\ even. Also, I hereby assume that there are no two domains which can match the mysql LIKE query I used below i.e There are no domains like 1domain.com , 2domain.com along with actual domain.com. If there is one, please use your “brain” to find the right domain and the IDs associated with it. When in doubt, please comment.
Disclaimer : If you mess up the database neither me or SS will be responsible for it
Let’s first gather all the ‘id”s first, like dom_id, sys_user_id, id etc which will be helpful in the deletion of database entries relating to the domain name which you want to removed.
1. Getting the IDs.
Domain ID – dom_id or id
mysql> SELECT id FROM domains where name=’domain.com’
We are assuming that dom_id you got as a result of above command is 8880
Database ID – db_id
mysql> select id FROM data_bases where dom_id=(SELECT id FROM domains where name=’domain.com’);
We are assuming that db_id you got as a result of above query is 1433. Please note that you could get more than one result. Please save all the db_id and re-execute the sql query for each db_id.
System User ID – sys_user_id
mysql> select id FROM sys_users where home like '%domain.com%';
We are assuming that sys_user_id you got as a result of above command is 8843
Let’s start the actual deletion process
Shall we backup ? Better be safe!
C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL\bin>mysqldump -P8306 -uadmin -p<plesk DB admin pass> psa > c:\psa.sql
You are now ready to delete. Please execute the follow sql commands in mysql prompt
delete from db_users where db_id='1433'; delete from data_bases where dom_id='8880'; delete from mail where id='8880'; delete from subdomains where id='8880'; delete from dns_recs where id='8880'; delete from domains where id='8880'; delete from domain_aliases where dom_id='8880'; delete from hosting where sys_user_id='8843'; delete FROM sys_users where id='8843'; delete from dns_zone where displayName=’domain.com’;
Database entries are deleted. Now it’s time to remove the users and files from the filesystems, IIS, Server, Mail server, DNS server etc.
Finally,
cd %plesk_bin% domain.exe -r domain.com
These steps should help remove the domain manually from the plesk. Please note that this article is based on the second attempt and could be buggy. I assume some “common sense” when running these commands. Understand the commands and each step before you actually execute it. Good luck. Don’t MESS up!!
Continue Reading