Skip to main content

Posts

Showing posts from February, 2012

Ubuntu - Courier-IMAP max connections

The maximum connections by default is 40 which is not enough in a small office who are using Thunderbird (as by default a Thunderbird client will occupy 5 connections) 8 accounts will occupy all. It is possible to edit the following parameters and settings to a larger value. MAXDAEMONS=40 MAXPERIP=40   Under Ubuntu, the settings can be found at /etc/courier/imapd. Remember to restart the service to activate the new settings.

Scrolling on touch devices

CSS overflow:auto and mouse / scroll events do not work as you expected on desktop browsers. - Safari Web Content Guide: Handling Events - Chris-Barr.com :: Scrolling a overflow:auto; element on a touch screen device - @ Design Time: Div Overflow and iPhone Browsing A workaround is to use touch events.

Restart email processes

To restart Qmail POP3, SEND and SMTPD processes: CODE qmailctl stop killall qmail-pop3d killall qmail-send killall qmail-smtpd qmailctl start To restart Courier IMAP process: CODE /etc/init.d/courier-imap stop /etc/init.d/courier-imap start If failed, kill the process: kill -9 qmail-send  qmailctl start

AWStats for Qmail

http://awstats.sourceforge.net/docs/awstat...s_faq.html#MAIL For LogFile, set the following instead (see also http://webui.sourcelabs.com/qmail/mail/use...BAwstats.meta): CODE LogFile="find /var/log/qmail/qmail-send/ -mmin -1440 -name "\@*" | xargs cat | tai64nlocal | perl /usr/share/doc/awstats/examples/maillogconvert.pl standard |"

Red5 Installation Procedure

For Fedora: 1. Install Java (JDK) 2. Install Ant Extract apache-ant-[VERSION]-bin.tar.gz to /usr/ant/ 3. Export variables export ANT_HOME=/usr/ant/ export JAVA_HOME=/usr/java/latest/ export _JAVA_OPTIONS="-Xmx64m" 4. Install Red5 svn export http://red5.googlecode.com/svn/java/server/trunk/ /opt/red5/ cd /opt/red5/ ant 5. Setup iptables # Red5 RTMP -A INPUT -p tcp -m tcp --dport 1935 -j ACCEPT # Red5 RTMPT -A INPUT -p tcp -m tcp --dport 8088 -j ACCEPT # Red5 HTTP servlet engine port -A INPUT -p tcp -m tcp --dport 5080 -j ACCEPT # Red5 Debug proxy port -A INPUT -p tcp -m tcp --dport 1936 -j ACCEPT 6. Test Red5 cd /opt/red5/dist/ ./red5.sh & Be patient, Red5 needs a looooooong time to start. Use "top" to check if "java" is running. Visit http://[SERVER]:5080 7. Add init script /etc/init.d/red5 QUOTE #!/bin/sh # For RedHat and cousins: # chkconfig: 2345 85 85 # description: Red5 flash streaming server # processname: red5 PROG=red5 RED5_HOME=/opt/red5

Kill qmail-smtpd processes running too long

This kill all smtpd and remote connections, which have a duration of more than 1 hour. QUOTE #!/bin/sh kill `ps -o etime,pid --no-headers -C qmail-smtpd | grep '[0-9]:[0-9][0-9]:[0-9][0-9]' | awk '{print $2}'` kill `ps -o etime,pid --no-headers -C qmail-remote | grep '[0-9]:[0-9][0-9]:[0-9][0-9]' | awk '{print $2}'` http://forum.qmailrocks.org/archive/index....php/t-2936.html

Linux Multiple Users Permission Read / Write

ACL provides a more flexible way to control the file permission, e.g. allow multiple users like www-data and ftpuser to read/write the same directory. 1. Install ACL: CODE aptitude install acl 2. Edit /etc/fstab and add the "acl" option, e.g.: CODE /dev/sda3 / ext3 defaults,errors=remount-ro,acl 0 1 3. Remount the partition: CODE mount -o remount / 4. Check to make sure that it is mounted with acl: CODE mount | grep acl 5. Add users to ACL: CODE setfacl -R -m u:www-data:rwx /path/to/directory setfacl -R -m u:ftpuser:rwx /path/to/directory It will be very slow if there are many sub-directories. So be specific, e.g. /home/www/http_www.cubbaalumni.org/public_html/file/ 6. Check ACL: CODE getfacl /path/to/directory More: http://serverfault.com/questions/81579/lin...sion-read-write http://www.linuxquestions.org/questions/ma...pported-266804/

Qmail on Debian 6

Thanks to Martin who compiles this. I took no credit for this article. Please follow the new Qmailrocks guide at http://qmailrocks.thibs.com Because vpopmail is configured to use MySQL, poppassd does not work anymore. poppassd is need for the Change Password plugin in SquirrelMail. To add back the "Change Password" function in SquirrelMail, please do the following (based on http://www-rohan.sdsu.edu/~cleaver/software/qmail/ ). 1. nano /usr/bin/vchkpassd #!/usr/bin/perl # This program functions as a poppassd (port 106) daemon for use with # MySQL-based qmail/vpopmail setups. It reads directly out of the # vpopmail table in MySQL to verify passwords, but writes back using # vpasswd. # It includes some basic security features, including: # - tarpitting (3 second delays on failure) # - IP address stopping (connection must be from something in # the lastauth table to be accepted) # - uses vpasswd command to ensure encrypted pw placed in # # v 1.0 - Japheth Cleaver # clea