Archive for December, 2009

ProFTP enable FXP

Edit /etc/proftp.conf <Global> AllowForeignAddress on </Global>

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 […]

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.

Exchange mailstore full

Why does every Exchange admin have to find out the hard way that there is a limit to the database size (16GB for 2000, 75GB for 2003 I think). The chances are that it isn’t actually full of data, just very very fragmented.  I’ve reduced a 75GB file to around 20GB.  To defrag it: Dismount […]

Qmail: forward emails to a PHP script

In qmail, first add the domain alias. For myscript@servername make /var/qmail/alias/.qmail-myscript If its for /var/qmail/mailnames/ should do it. Contents need to be along the lines of: |/var/www/vhosts/ references:

Curl Error: openssl missing CA

This seems to happen with different versions on libcurl on el4. Just make sure that there is a ca-bundle in the right place: mkdir -p /etc/pki/tls/certs && ln -s /usr/share/ssl/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt You can find where its looking for the bundle using curl -v : curl -v * About to connect() to port 443 […]

Convert SSL from pfx to pem

Convert an SSL certificate from IIS pfx to Apache pem format: # Export the private key file from the pfx file openssl pkcs12 -in filename.pfx -nocerts -out key.pem # Export the certificate file from the pfx file openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem # This removes the passphrase from the private key so […]

Compare RPM’s on two servers

Useful if your migrating from an old server to a new one and want to check everything needed is installed. First, pull a list of RPM package by name only: rpm -qa –queryformat=’%{NAME}\n’ | sort > server.txt Once you’ve done that on both servers, just use diff to compare the two files: diff serverold.txt servernew.txt […]

Recursively change file permissions

If you chmod -R it will recursively chmod everything whether it be a file or directory. A more sensible way is: # Change directories find . -type d -exec chmod 755 {} \; # Change files find . -type f -exec chmod 644 {} \; Obviously chowning is similar: find . -type f -exec chown […]