flat file db Vs Aliases.db by Perl. 
Author Message
 flat file db Vs Aliases.db by Perl.


>How can I 'insert' in my Sendmail 8.x a flat file db? I have all forward
>information in a flat file Db instead of 'aliases' file, how can I make
>my sendmail run a perl script everytime when a new message come in? (that
>perl script will search over flat file DB and return a forward address to
>sendmail,if any) I really have no idea to do it...

Let me rephrase your problem sin the hopes of understanding the

    You have a custom alias db that you want sendmail to use when
    performing alias lookups on local addresses.

The initial (and simplest) approach I would take is convert your db
into a sendmail aliases text file (eg /etc/mail/aliases), and let
sendmail do the rest.  If for maintenance purposes, you want to
maintain the list in your db format, you can make changes in your db
and run the conversion utility to translate to /etc/mail/aliases.  You can
use cron to automate the task.  Some care should be taken so you
do not clobber the important aliases (like postmaster), unless you
define them in your db.

Sendmail automatically rebuilds its database from the /etc/mail/aliases
file if it changes into a dbm, or similiar format, database faster
lookups.  You can try dealing with the dbm file directly, but I would
discourage it since the aliases text file would go out of sync, and if
it gets touched in anyway, any back door changes to the dbm database
would get lost.

If you are ambitious, you can modify sendmail itself to use a different
technique to do alias lookups.  I believe the sendmail source is
designed to allow alternate database formats to be hooked into

This topic is probably more suitable for the comp.mail.sendmail

             Earl Hood              | University of California: Irvine

http://www.*-*-*.com/ | Dabbler of SGML/WWW/Perl/MIME

Sun, 09 Jul 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. DB_File 1.71 / Berkly DB Hash and sendmail /etc/aliases.db

2. Anyone using SoftList? (perl shell / flat file db)

3. Need a perl script that searches a flat file db

4. Flat-file DB Perl Module?

5. Can Perl read DB (.db) format files?

6. reading flat-file db and replacing a word

7. How to display all records in flat-file db using HTML

8. Flat-File db recommendation

9. Berkeley DB, DB File on multiple platforms

10. Berkeley DB / DB File Concurrence Problem

11. Berkeley DB / DB File Concurrence Problem

12. file access vs DB access relative performance


Powered by phpBB® Forum Software