======v3/4 - Move the message store to a new folder/drive====== This guide assumes you want to just move the VPOP3 message store/database to a new folder on the same PC, and leave the VPOP3 installation directory where it is. - Stop VPOP3 - Stop PostgreSQL - Remove the PostgreSQL service - Move database to the new folder - Reassign permissions for PostgreSQL - Reinstall the PostgreSQL service - Restart PostgreSQL - Restart VPOP3 Note that we can do this for you remotely if you wish, there is a small charge for this (currently £50 + VAT). Contact us on 01484 855800 if you wish us to do it for you. Please note that we do not recommend or support moving the message store to a networked or external (eg USB/Firewire) drive. =====Stop VPOP3===== Go to Control Panel -> Administrative Tools -> Services, and stop the 'VPOP3 Email Server' service =====Stop PostgreSQL===== Go to Control Panel -> Administrative Tools -> Services, and stop the 'PostgreSQL-VPOP3' service =====Remove the PostgreSQL service===== At a command prompt, navigate to your VPOP3 directory, then the **pgsql\bin** directory under that Run pg_ctl unregister -N "PostgreSQL-VPOP3" If that comes back with ''pg_ctl: service "PostgreSQL-VPOP3" not registered'' then try running this instead: pg_ctl unregister -N "pgsql-8.3" =====Move database to the new folder===== Move the VPOP3 'pgsql\data' folder and ALL sub-folders to the new location (eg 'd:\vpop3data') =====Reassign permissions for PostgreSQL===== You need to assign permission for the **postgres** user to the new folder (eg 'd:\vpop3data') To do this, go to the parent folder in Windows Explorer (eg if the database has been moved to 'd:\vpop3data', go to the 'd:\' folder) . Right-click the new data folder and choose Properties, then Security. Add permission for the **postgres** user to have full permission to access this folder. (On an Active Directory Controller, the **postgres** user is a domain user, on all other types of PC, the **postgres** user is a local user). =====Install the PostgreSQL service===== At a command prompt, navigate to the VPOP3 directory, then the **pgsql\bin** directory under that Run pg_ctl register -N "PostgreSQL-VPOP3" -D "" -U postgres -P vla8Pi4cluwrouDiERiU e.g. Run pg_ctl register -N "PostgreSQL-VPOP3" -D "D:\vpop3data" -U postgres -P vla8Pi4cluwrouDiERiU The 'new data folder' is whatever the new name of the 'pgsql\data' folder is. It is //not// the name of the folder //containing// the new data folder, but the name of the new data folder itself. A simple way to tell this is that the "new data folder" is the path of the folder where the **postgresql.conf** file now resides. So, if your 'postgresql.conf' file is in the 'd:\vpop3data\data' folder, you should specify '' -D "d:\vpop3data\data" '' in the above command. For more information on the pg_ctl command, see the [[http://www.postgresql.org/docs/8.3/static/app-pg-ctl.html|PostgreSQL documentation]] =====Restart PostgreSQL===== Go to Control Panel -> Administrative Tools -> Services, and start the 'PostgreSQL-VPOP3' service =====Large Message Store===== In VPOP3 versions 3 and 4, large messages are not stored in the database, so, if you wish to move those as well, there is a further couple of steps before you restart VPOP3: - move the VPOP3\_messages folder tree to the new location - In the Windows registry, find **HKEY_LOCAL_MACHINE\Software\PaulSmith\VPOP3** and set the **MessageStore** value to point to the new location =====Restart VPOP3===== Go to Control Panel -> Administrative Tools -> Services, and start the 'VPOP3 Email Server' service