Wednesday, August 17, 2011

DBMail In Ubuntu

The DBMail installer for Ubuntu Linux works. To start the services using the init script /etc/init.d/dbmail You need to add this parameters in /etc/default/dbmail

1 = start the service startup init script
0 = don't start the service with startup init script

Thank yo to :-

By default DBmail in Ubuntu using sqlite. For MySQL and PostgreSQL databases you need to install different packages

For PostgreSQL

apt-get install dbmail-pgsql


apt-get install dbmail-mysql

Please read this

Monday, August 15, 2011

An old script of mine for backup LDAP data. Crica 16 Oct 2005. Im going to rewrite this for backup LDAP in SongketMail.

DATE=`/bin/date +%Y-%m-%d`
/bin/echo "LDAP LDIF BACKUP START : `/bin/date`" >> /home/ldif/backup_ldif.log
# stop ldap service
/bin/echo "/etc/init.d/ldap stop" >> /home/ldif/backup_ldif.log
/etc/init.d/ldap stop 2>> /home/ldif/backup_ldif.log
# start backup
/bin/echo "/usr/sbin/slapcat -b "dc=harisfazillah,dc=com,dc=my" -l /home/ldif/linuxmalaysia_$DATE.ldif" >> /home/ldif/backup_ldif.log
/usr/sbin/slapcat -b "dc=harisfazillah,dc=com,dc=my" -l /home/ldif/linuxmalaysia_$DATE.ldif 2>> /home/ldif/backup_ldif.log
# start ldap service
/bin/echo "/etc/init.d/ldap start" >> /home/ldif/backup_ldif.log
/etc/init.d/ldap start 2>> /home/ldif/backup_ldif.log
/bin/echo "LDAP LDIF BACKUP FINISH : `/bin/date`" >> /home/ldif/backup_ldif.log 
# To import
# 1. Stop ldap service
# 2. Delete /var/lib/ldap/*.bdb /var/lib/ldap/log.*
# 3. slapadd -v -u -l /tmp/linuxmalaysia_2005-10-16.ldif > /tmp/import.log
# 4. Start ldap service
# -u for dry run only. Remove -u for actual import

My Blog List