"John Keegan" <[EMAIL PROTECTED]> wrote: > What I am looking to do is to create a system for managing mail forwards for > domains that are hosted outside of the Raq GUI. My thought was to create a > second file formatted in the VIRTUSERTABLE style, and to have that included > as part of the sendmail configuration.
I don't believe you can have multiple virtual user tables. I'd investigated at one time, but maybe I didn't do a thorough investigation. In any case you'll find the following line in sendmail.cf on the RaQs (path slightly different on RaQ1/2): Kvirtuser hash -o /etc/mail/virtusertable I tried adding a second file, ran makemap, restarted Sendmail and it didn't work. You can have multiple alias files, but not virtual user files. If you discover otherwise, please share with us. > Then it would be a simple matter to have those mail forwards maintained in a > MySQL database, for example, and just have a script pull out the forwards > and write them out to this file. I built software for a client a year or so ago that does just that. The client's running it on a RaQ3. The software actually rewrites Sendmail, DNS and Apache files and runs some scripts in order to allow clients to manage email redirection and web redirection accounts via a password-protected web interface with MySQL backend. Sounds similar to what you're attempting. > The advantages to having a second file (lets call it MAILFORWARDTABLE) and > hashing that instead of including this info in the actual VIRTUSERTABLE: > > a) This second file would not be used by the GUI, or by any other > process, therefore there would be no file locking issues. This is definitely an issue. It was easy to manage in the system I was building for because the GUI was only going to be used by the server admin and only rarely. I did encounter problems with one or both of the virtusertable and special aliases files sometimes not being written to as expected. So on each update the original files were backed up, I worked wit h temp files and file sizes were compared and if the byte count of the live file was outside a threshold range the previous snapshot was reverted to and an email was generated which was sent to the server admin. Probably not ideal, but it worked and the software is still being used. > b) It would be easier (simpler and more reliable programming) to simply > rewrite this second file straight out of a database, than to rewrite chunks > of the VIRTUSERTABLE whenever we need to update some of the mail > forwardings. > > So I am just looking for tips for creating additional alias files, I > obviously don't need a second VIRTUSERTABLE, just another file that works in > the same way. Or if anyone has a suggestion for doing this another way, I > would appreciate any insight. I hope some of what I shared is useful. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ _______________________________________________ cobalt-developers mailing list [EMAIL PROTECTED] http://list.cobalt.com/mailman/listinfo/cobalt-developers