I'd have replied earlier, but I don't actually subscribe to the mailing
lists anymore - I have to check GMane.

> What is the plug-in you are using for Squirrelmail?  I am running Qmail
> + Vpopmail as well, and also wish to enable my users to configure their
> TMDA settings from it.  I took a look at 'tmdatools', but have so far
> been unable to get it to work with the Vpopmail virtual users.
> Currently, I am using the tmda-cgi interface. but would prefer to be
> able to have the user use the one interface.

I'm actually using TMDA tools (instead of tmda-cgi).  To make it work with
virtual users, some significant modding was required.  The gist of it is:
===== 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";
===== End tmdatools_config.php =====
===== 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 =====

Yeah, it's complicated, but it works.

> Also, I have found an issue with TMDA+Qmail+Vpopmail, where unless the
> domain being setup is right in the ~vpopmail/domains directory, it has
> trouble getting all the necessary config files in there, though this may
> actually be a tmda-cgi issue, and not a TMDA issue (I will be doing a
> seperate thread for this problem).  Have you come across this at all in
> your setup?
Well, if tmda-cgi is having problems, it's because your skeleton is set up
badly.  I decided that rather than using tmda-cgi, I would make all users
have tmda "on" by default (created with their account - after all they can
change default_action to deliver if they really want to).   This was a
slight pain, as I use vqadmin and qmailadmin for user creation (and they
do it directly instead of calling bin/adduser).  As such, I created a php
script that simply calls tmda-adduser, and edited the template.  As such,
users are created with TMDA right from the get go.

The templates I configure only challenge when SpamAssassin doesn't like
it, and SA's default threshold is 7.  So, for most people, TMDA never gets
noticed, as the spammers really have to work to get a challenge.


> I already have the Vpopmail plugin for Squirrelmail working, so that's
> not a problem :-)
Good - IIRC, I had to make some changes to that one too.  I believe it had
to do with my .qmail file changes.


> > their SpamAssassin settings and black/whitelists.  I've also got Baysean
> > Auto-Learning on.

> Which plugin are you using?  Allt he Spamassassin plugins I have seen
> for Squirrelmail haven't seemed too qmail+vpopmail-friendly; they
> usually worked best if one was able to use Procmail, and the email
> accounts are really system accounts.

http://www.squirrelmail.org/plugin_view.php?id=167 - SpamAssassin pulls
the default settings from SQL as well, but users can override them.  To
make this work, spamc needs to know the username - this is handled from my
.qmail file.

===== Sample .qmail-cyt0plas File =====
(one line)
|preline -f -d /usr/bin/spamc -u [EMAIL PROTECTED]
|/usr/share/toaster/tmda-1.0.2/bin/tmda-filter -c
/home/vpopmail/domains/doacafe.com/cyt0plas/.tmda/config -t
/home/vpopmail/domains/doacafe.com/cyt0plas/.tmda/templates/
===== End .qmail-cyt0plas =====

As you can probably tell, I do _not_ have a vdelivermail in there. 
Instead of running mail through vdelivermail, I simply have TMDA deliver
straight to maildir, using a line in the config file like

DELIVERY = "/home/vpopmail/domains/doacafe.com/cyt0plas/Maildir/"

> We are currently doing Spamassassin + ClamAV virus filtering (using
> amavisd-new) on a seperate MX server, which then forwards the messages
> that make it through to the POP servers.  Are you doing anything with
> virus filtering?  I have to admit that even if I were going to run
> Spamassassin on the same server as the POP boxes, I would most likely
> run virus filtering from a seperate MX server (like now) using Postfix,
> as I find Postfix's built-in anti-UCE abilities to be much superior to
> QMail (but almost nothing I have seen matches Qmail + Vpopmail, or Qmail
> + Vmailmgr for handling virtual mail accounts)

ClamAV is handled through qmail-scanner (qmail scanner uses clamdscan, and
does _not_ do spamassassin).  Also, qmail-scanners anti bad-mime make the
virus scanner a lot more effective.

To ensure that tmda messages get scanned as well, I've got
===== /etc/tmdarc sample =====
MAIL_TRANSPORT = "smtp"
SMTPHOST = "localhost"
===== End /etc/tmdarc sample =====
in /etc/tmdarc.  It all gets sent through smtp, so that the antivirus gets
a shot as well.

Unlike SpamAssassin, the antivirus is not per-user, and is not
user-configurable.  I don't want viruses going through my server.  Period.

> Also, just for curiousity-sake: what are the specs for your mail
> server(s)?  Are they pretty beefy? (Spamassassin, I know, takes up a lot
> of server resources for the scanning, and if you are running something
> like ClamAV for virus filtering, that jumps the resource usage up a few
> more notches)

Athlon XP 2200, 512 RAM - I've got the system stripped down to a minimum,
and am using Turck MMcache/ADODB (which makes the PHP side of things a lot
easier - I hacked AdoDB in, so I can cache the queries that make sense to
do so).  Averages 0.5% CPU usage, but it's not a production machine.

I have an earlier setup I did (no per-user SA, but still does all the same
stuff).  It's in production, and you can see the stats if you want.

System Info: http://mail.t28.net/sysinfo/
Mail Stats: http://mail.t28.net/stats-toaster/

You be the judge :)
For the most part, I don't use mail that much, but I do make a mail server
appliance I sell to companies.  I don't run them, but I've had no
complaints about inadequite hardware.  Most of those are dual XP 2200s,
with 2GB ram.
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to