-------- Original Message -------- Subject: Administration script From: <[EMAIL PROTECTED]> Date: Thu, May 29, 2003 10:28 am To: <dbmail@dbmail.org>
Hi. It's been a while since I update my dbmail.sh administration script. I use it everyday for my administration tasks. I include the latest version: Improvements: Add a new fuction to main menu: Backup. That allows to backup dbmail database to a file. The TERM=vt100 variable is a little hack to display properly in my dtterm emulator. Other unix/linux system may not need it. Bugs: Correct a bug in the userlist fuction. Script weren't sending the dbmail database user/password, so the script fails if the users your where running the script don't have access to the mysql server. Install Instructions: Remember to edit the file header to reflect your site propper settings! My script is multidomain aware. To do so, I create an addition table in dbmail database for Postfix to resolve transports and to dbmail.sh to distinguish system domains. To create the table you can use the following commands: USE dbmail; CREATE TABLE transport ( domain varchar(255) NOT NULL default '', transport varchar(8) default NULL, PRIMARY KEY (domain) ) TYPE=MyISAM; INSERT INTO transport VALUES ('localhost','dbmail:'); The insert command add proper transport to local email. Localhost is to be /etc/postfix/transport compatible. You can add all the domains you have in /etc/postfix/transport with proper insert commands or adding new domain with dbmail.sh. To tell Postfix to use the table, you need to create a /etc/postfix/transport.cf file that contains the following lines: user = Place your mysql user password = Place mysql user password dbname = dbmail table = transport select_field = transport where_field = domain hosts = localhost Finally, you must tell Postfix to use the database to resolve the transport. That's is done in /etc/postfix/main.cf with the line: transport_maps = mysql:/etc/postfix/transport.cf Don't forget to to a postfix reload. There's another small tool I have create. It's a small multifuction script designed to run DBMAIL maintenance tasks as a cron job, it also send a report email to a designated account. Script header configuration is self explanatory. You only need to add a crontab like this to purge database at 11:30 pm daily: 0 23 * * * /usr/sbin/dbm.tasks purge The script allows to set delete, purge and backup the database. I use to set delete at 11, purge at 11:05 and backup database a 12:00. I expect you found this tools helpfull. Alejandro MarĂn My actual dbmail systems is: Solaris 9 x86 Postfix 2.0.10 + MySQL + Berkeley DB 4 + SASL + SSL/TSL Mysql 4.0.12 DBMail 1.1 + dbmail.sh Squirrelmail 1.40 + MySQL Password + Virtual Domain SASL 2.1.13 Apache 1.3.27 + TSL/SSL PHP 4.1.3
dbmail.sh
Description: Binary data
dbm.tasks
Description: Binary data