[vPostMaster] User settings, user passwords and server migration
Scott Kleihege
scott-dpkg at tummy.com
Wed Jul 30 23:50:17 MDT 2008
On Mon, Jul 21, 2008 at 02:02:42PM +0200, Jørgen Haseth Laukholm wrote:
>As I have used the Community version of vPostmaster for quite some time
>now, I have a lot of domains/users with different options set.
>
>I would like to reset all settings to a standard (that I decide),
>including both "system defaults", "domain defaults" and "mail user
>settings".
I do not know what you mean by system defaults. Can you explain
how you access the settings in the web interface?
>Is there a simple way of doing this, or could any of you help me with a
>sql statement that could do this for me?
Before you make *any* changes to the database, I strongly recommend you
take a copy of the most recent database backup and copy it to a separate
location where it will not be overwritten by the cron job.
cp /var/spool/vpostmaster/vpostmaster-database.sql.bz2 /var/tmp/
The domain defaults and mail user settings reside in tables that are
essentially key/value pairs. Suppose you want to change the default
greylist timeout to 5 minutes for all domains.
# su postgres
bash-3.00$ psql vpostmaster
Welcome to psql 7.4.19, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
vpostmaster=# SELECT * FROM domaindefaults;
id | domainsid | force | key | value
----+-----------+-------+------------------------+------------
1 | | f | addspamheaders | enabled
2 | | f | spamsubjectprefix |
3 | | f | clamavaction | disabled
4 | | f | spfaction | reject
5 | | f | greylistaction | enabled
6 | | f | greylisttimeoutminutes | 45
7 | | f | spamassassin1action | quarantine
8 | | f | spamassassin1threshold | 5
9 | | f | spamassassin2action | drop
10 | | f | spamassassin2threshold | 15
11 | | f | spamassassin3action | disabled
12 | | f | spamassassin3threshold |
(12 rows)
vpostmaster=# UPDATE domaindefaults SET value = '5' WHERE key = 'greylisttimeoutminutes';
If you wanted to make the same change for all existing users, the
SQL query would be similar.
UPDATE usersettings SET value = '5' WHERE key = 'greylisttimeoutminutes';
>Users do often lose/forget their password. Is there a way of retrieving
>passwords in clear text, or is the only option to give the user a new
>password?
For security, the password should not be stored in plaintext, so there
is no easy way to recover it. Resetting it to a new value is the only
reasonable option.
>I'm thinking about migrating my current vPostmaster 1.42 installation over
>to a new server with vPostmaster 1.46. Is there something more I sould be
>aware of, or can I just use your backup/restore guides to achieve this?
It might be easier to use yum or apt-get to update the current version
to 1.46 before doing the backup/restore. If you are unwilling or unable to
do so, you will probably need to run a few scripts after the restore to
update to the most recent configuration. You should manually run the
vpm-dbupgrade and the appropriate setup script (setup-fc3 or setup-debian
depending on your distribution) in /usr/lib/vpostmaster/bin/.
--
Regards, tummy.com, ltd
Scott Kleihege Linux Consulting since 1995
http://www.tummy.com/
More information about the vPostMaster
mailing list