Knowledge Base Home

Call Support


Search the Knowledge Base

Skip to end of metadata
Go to start of metadata

How to recreate the Postgres database for Netmail
Last Modified: 4/22/2010 7:19:20 PM

Environment

Netmail Secure

Synopsis

If Netmail Secure is not logging properly, it may be due to the Postgres database being too large or corrupt. The quickest fix is to drop the database and re-create it. (Note: This will lose all current logs, but if logging has not being functioning properly, it is irrelevant.)

Solution

These steps need to be completed in an ssh session to the Netmail Secure appliance holding the Postgres database:

Note: The netmail services must be stopped on all Netmail Secure devices that are connecting to the postgres database that you're trying to drop and recreate.

1. To re-create the Postgres database for Netmail Secure, you must first login to the database as a superuser. You can do so by typing the following command in a terminal: su postgres

2. Once you have logged into the database, you need to drop it with the following command: dropdb mplus

3. After the database has been dropped, recreate another database with the same name with this command: createdb -O postgres mplus -E=LATIN5

4. Type exit to close out and restart mplus.

Notes

The Netmail service 'netmail' must be stopped prior to dropping and recreating the postgres database.
To stop Netmail service type the following at the command prompt in an ssh/putty session: service netmail stop
To start the service back up after recreating the database, type the following at the command prompt: service netmail start

Former KB Article: 1044


Help us improve!
Is this article helpful?
Is it well written?
Is the content complete?