Hi Marcio, On Sun, 2004-05-30 at 14:45, Márcio Luciano Donada wrote: > Somebody of the group uses TMDA + qmail + vpopmail + squirrelmail? It would > like to use plugin to carry through the possible changes in the TMDA that > the customer comes to want, but I am not obtaining, if somebody uses, can > give one help?
I recently got this setup with the help of someone on the TMDA list. I am not sure if he is on this list, but I will post what he posted for me on the TMDA list, and hope that he does not mind. Full credit for this setup goes to Carlos Averett (I will withold his email address for privacy reasons) In the 'tmdatools' Squirrelmail plugin: ===== tmdatools_config.php ===== Added: // Cyt0plas - ok, let's do virtualhosting support here $uinfo = split ('@', $_SESSION['username']); $user = $uinfo[0]; $domain = $uinfo[1]; Changed: $plugin_tmdatools_homedir = "/home/vpopmail/domains/$domain"; $plugin_tmdatools_editfiles[0]["title"] = "Whitelist"; $plugin_tmdatools_editfiles[0]["fname"] = "$plugin_tmdatools_homedir/$user/.tmda/lists/whitelist"; $plugin_tmdatools_editfiles[1]["title"] = "Blacklist"; $plugin_tmdatools_editfiles[1]["fname"] = "$plugin_tmdatools_homedir/$user/.tmda/lists/blacklist"; $plugin_tmdatools_editfiles[2]["title"] = "Confirmed Senders"; $plugin_tmdatools_editfiles[2]["fname"] = "$plugin_tmdatools_homedir/$user/.tmda/lists/confirmed"; $plugin_tmdatools_editfiles[3]["title"] = "TMDA User Config File"; $plugin_tmdatools_editfiles[3]["fname"] = "$plugin_tmdatools_homedir/$user/.tmda/config"; $plugin_tmdatools_editfiles[4]["title"] = "TMDA Incoming Filter"; $plugin_tmdatools_editfiles[4]["fname"] = "$plugin_tmdatools_homedir/$user/.tmda/filters/incoming"; $plugin_tmdatools_editfiles[5]["title"] = "TMDA Outgoing Filter"; $plugin_tmdatools_editfiles[5]["fname"] = "$plugin_tmdatools_homedir/$user/.tmda/filters/outgoing"; $plugin_tmdatools_editfiles[6]["title"] = "Request Confirmation Template"; $plugin_tmdatools_editfiles[6]["fname"] = "$plugin_tmdatools_homedir/$user/.tmda/templates/confirm_request.txt"; $plugin_tmdatools_editfiles[7]["title"] = "Acceptance Confirmation Template"; $plugin_tmdatools_editfiles[7]["fname"] = "$plugin_tmdatools_homedir/$user/.tmda/templates/confirm_accept.txt"; $plugin_tmdatools_editfiles[8]["title"] = "Bounce Template"; $plugin_tmdatools_editfiles[8]["fname"] = "$plugin_tmdatools_homedir/$user/.tmda/templates/bounce.txt"; ===== End tmdatools_config.php ===== Note: I added [6], [7], and [8] to my own configuration to allow users to custome those texts. ===== Begin address.php ===== Changed: if ($tmdatools_submit) { // Cyt0plas - Get user and domain $uinfo = split('@', $_SESSION['username']); $username = $uinfo[0]; $domain = $uinfo[1]; $command = $plugin_tmdatools_tmdadir . "bin/tmda-address"; if (file_exists($command)) { $config = '/home/vpopmail/domains/' . $domain . '/' . $username . '/.tmda/config'; $command .= ' -a ' . $username . '@' . $domain . ' -c ' . $config . ' --'.$tmdatools_address.' '.$tmdatools_address_text; $address = exec($command); echo $address; } else { echo _("File not found").': <b>'.$command.'</b>'; } } ===== End address.php ===== ===== pending.php ===== Added: // Cyt0plas - Get user and domain $uinfo = split('@', $_SESSION['username']); $username = $uinfo[0]; $domain = $uinfo[1]; $config = '/home/vpopmail/domains/' . $domain . '/' . $username . '/.tmda/config'; Changed: Basically, I changed all occurences of $tmdatools_pending = $plugin_tmdatools_tmdadir . "bin/tmda-pending" to $tmdatools_pending = $plugin_tmdatools_tmdadir . "bin/tmda-pending -c $config"; ===== End pending.php ===== I hope this helps. Sincerely, Alan Murrell