Hi,

I found an alternative way to solve that problem rather than using perl
script,
in your dot qmail file type the lines like this :
| /path/to/vdelivermail '' ./user/Maildir/
I found that it can solve the problem that I want to forward all email to
other mail account and also keep a copy in my own account.

Regrads,
Martin

-----Original Message-----
From: Madrus - CBN [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 13, 2000 7:44 AM
To: Daniel Augusto Fernandes; [EMAIL PROTECTED]; Ken Jones
Subject: Re: problem quota when using dot qmail


Dear Ken,
I know how to solve that problem,
in your dot qmail file type something like this at
the first line :
  | mailquotacek <username>
then make a script like this :
----------------------------------------------------------------------------
------------
mailquotacek script
----------------------------------------------------------------------------
------------
#!/usr/bin/perl
use DBI;
use strict;
  my $nama = shift;
  my $table="mydomain.com";
  my $sqlstat  = "SELECT pw_shell, pw_dir FROM $table  WHERE
pw_name=\'$nama\'";
  my $dbh = DBI->connect('dbi:mysql:vpopmail;mysql.mydomain.com;port=3306',
                       'user','password',) or die "error: $DBI::err
($DBI::errstr)\n";
  my $sth = $dbh->prepare(qq |$sqlstat|) or die "error: $DBI::err
($DBI::errstr)\n";
  $sth->execute or die "error: $DBI::err ($DBI::errstr)\n";
  $sth->bind_columns(undef, \my($batas, $lokasi));
  $sth->fetch;
  $sth->finish;
  $dbh->disconnect;
my $dikotak = `/usr/bin/du $lokasi/Maildir/ -sb`;
my ($nyatanya) = ($dikotak=~/^([\d]*)/);
if($nyatanya > $batas) {
    print "User is over quota email returned.\n";
    exit 100;
}
exit 0;
----------------------------------------------------------------------------
------------
best regards,

Said Madrus
Jakarta - Indonesia.

----- Original Message -----
From: "Daniel Augusto Fernandes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 13, 2000 2:57 AM
Subject: Re: problem quota when using dot qmail


> Ken Jones wrote:
> >
> > Said Madrus wrote:
> > >
> > > Dear all,
> > > if we use .qmail-<user> then vpopmail quota does not work,
> > > how to solve this problem ??
> > > thanks,
> > >
> > > said madrus
> >
> > There is no solution that i know of. Anyone have any ideas?
>
> Ken Jones wrote:
> > e) qmail-local looks for a .qmail-user file. If found, follows
> >    the instructions there. (not vpopmail way except for aliases and
> >    forwards) NOTE: Future versions of vpopmail will contain alias
> >    and forward lookups)
>
> Ken,
>
> Could you explain your plans here?
> I didn't understand.
>
>
> Thanks,



Reply via email to