Horde Plesk disable IP checks

The Horde webmail client checks to ensure that its users sessions always originate from the same IP once open.  This can be problematical if the user has an intermittent connection or a roaming IP etc:

edit /usr/share/psa-horde/config/conf.php
$conf[‘auth’][‘checkip’] = false;

Encrypted email script using GPG and PHP

#First grab the public key into a file for the GPG enabled email address and import it into a new keyring called public_key.gpg
mkdir .gnupg to add the keyring files.  Probably outside httpdocs would be a good idea!
gpg –no-default-keyring –keyring /var/www/vhosts/secure.mydomain.com/httpsdocs/mydomain.com/.gnupg/public_key.gpg  –import public_key

#you can list keys in the keyring by:
gpg –no-default-keyring –keyring /var/www/vhosts/secure.mydomain.com/httpsdocs/mydomain.com/.gnupg/pubring.gpg –list-keys

#you may need to add a level of trust if necessary
gpg –no-default-keyring –keyring /var/www/vhosts/secure.mydomain.com/httpsdocs/mydomain.com/.gnupg/pubring.gpg –edit D630A872

Install GIT on Plesk

Install GIT on a Plesk/Centos Box doesn’t actually involve much other than a yum install and setting up key auth.

Enable RPMforge repo
yum install git

Enable /bin/bash shell for the user in plesk.
make a .ssh directory in their homedir with 700 perms
Generate a keypair, or get public key of clients keypair:
ssh-keygen -t rsa -C “user@servername”
add public key to authorized_keys and chmod 600 it

Open clients IP in firewall for SSH

make a git directory in their homedir if this is where they plan to have their repo.

To test, install git on local machine
yum install git git-gui
(there is also a version available for windows)

Add private key to local machine
ssh user@servername


FTPS and SFTP on Plesk with ProFTP


You can add:

To /etc/shells

And then select this in the account as their shell. This will give them
access to only sftp with no additional software required.

Either purchase a certficate or create one:

ProFTP Enable Transfer Resume

Edit proftpd.conf

# Allow uploads to resume
AllowStoreRestart    on

# Allow downloads to resume
AllowRetrieveRestart    on

RedHat Enabled Passive FTP

// List the modules installed
// Load the ip_conntrack_ftp module
modprobe ip_conntrack_ftp

Edit /etc/sysconfig/iptables-config to include:

IPTABLES_MODULES=”ip_nat_ftp ip_conntrack_ftp”

ProFTP enable FXP

Edit /etc/proftp.conf

AllowForeignAddress on

ProFTP login Delay

Edit /etc/proftpd.conf adding the following lines:

UseReverseDNS       off
IdentLookups        off

General Exim Commands and Info

exim -bp ⇒ show queue entries (like mailq for sendmail)
exim -bpc ⇒ no of emails currently mail queue have
exim -M email-id ⇒ Force delivery of one message
exim -qf ⇒ Force another queue run
exim -qff ⇒ Force another queue run and attempt to flush the frozen messages
exim -Mvl messageID ⇒ View the log for the message
exim -Mvb messageID ⇒ View the body of the message
exim -Mvh messageID ⇒ View the header of the message
exim -Mrm messageID ⇒ Remove message without sending any error message
exim -Mg messageID ⇒ Giveup and fail message to bounce the message to the Sender
exim -bp | exiqsumm ⇒ Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals):
exim -bP ⇒ Display all of Exim’s configuration settings
exiwhat ⇒ Print what Exim is doing right now

RDP keep console session

To get the console session by remote desktop on a server
remotely to guarantee you get the same session every time:

mstsc /v: /console

Some RDP managers also have a console flag built in.