Ramblings from MostlyChris

Tech stuff and a bit more

Change to the Postfix configuration directory. Usually this is in /etc/postfix.

cd /etc/postfix

Open the sender_access file or create it if it doesn't exist.

vi sender_access

Add the email address you want rejected on a new line in the file followed by REJECT.

email@address.com REJECT

Save the file.

Create the server_access database with the postmap command

postmap hash:sender_access

Edit the main.cf file and add the following

smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/sender_access

Restart Postfix

service postfix restart

Check your logs to make sure everything is good.

First, copy the smtp_psa file.

cp /etc/xinetd.d/smtp_psa /etc/xinetd.d/smtp_additional

Edit the newly copied file and replace the first line. Replace 'service smtp' with 'service submission'

vi /etc/xinetd.d/smtp_additional

Restart xinetd.d

service xinetd restart

Check that port 587 is listening on the server

netstat -ltnp

NOTE: Most of this is now deprecated. You can use the autoupdater included in the ~[plesk]/bin directory to do the updates. Just make sure you back things up first!

Back everything up!

ifconfig eth0; hostname
cat /etc/hosts

## Verify that the primary IP matches hostname and hosts file

    Backups

mkdir plesk_upgrade
cp -a /etc/php.* plesk_upgrade
php -v > plesk_upgrade/phpv
ls -l /etc/php.ini     #make sure there is no symlink
cp /etc/my.cnf plesk_upgrade
cp /etc/xinetd.d/smtp_psa plesk_upgrade
cp /usr/local/psa/version plesk_upgrade
mkdir plesk_upgrade/pg
cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/usrs_* /var/lib/pgsql/data/postgresql.conf plesk_upgrade/pg
***BACKUP PSA DB***
mysqldump psa > plesk_upgrade/psa.sql

Save some time!

export PLESK_QUOTACHECK_OFF=1 # save some time

Troubleshooting: If coming from psa7.5 to 8.x

rpm -e sitebuilder_module-shop sitebuilder_module-votes # if sitebuilder is installed
rpm -e psa-bu # it will be replaced by psa-backup-manager
rpm -e psa-tomcat-configurator # need to check into a little further, seems safe enough

When having to migrate hugh numbers of IP addresses on Plesk, here is a way to manipulate the database to do it without having to use the panel to do them one at a time.

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
mysql> SELECT * FROM IP_Addresses;

mysql> UPDATE Repository SET component_id = [new ip id] WHERE component_id = [old ip id];

mysql> UPDATE hosting SET ip_address_id = [new ip id] WHERE ip_address_id = [old ip id];

Changing the timezone on a server (replace Europe/Amsterdam with your faviorite zone file)

mv /etc/localtime  /etc/localtime-old
cp /usr/share/zoneinfo/Europe/Amsterdam  /etc/localtime

/usr/bin/rdate -s (tick|tock).greyware.com
—or—
/etc/init.d/ntpd stop; ntpdate tick.greyware.com; /etc/init.d/ntpd start

Set the ZONE entry in the file /etc/sysconfig/clock file

vi /etc/sysconfig/clock

Sync the hardware clock

/sbin/hwclock –systohc