[qmailtoaster] qmailtoaster migration

2012-02-17 Thread Jon Ernster
I need to move vps' - one hosts a qmailtoaster instance and I'd like to migrate 
all my existing data and spamassassin spam database over to the new server.

Can anyone tell me what exactly needs to be moved to accomplish this and point 
out anything that I might be missing?

Seems to me, to move my virtual domains/users/email I need to copy over what 
resides within /home/vpopmail.

If it matters here's the versions I'm running for some of the stuff:

[user@vps ~]$ rpm -qa | grep qmail*
qmail-pop3d-toaster-1.03-1.3.15
qmailadmin-toaster-1.2.11-1.3.4
qmail-toaster-1.03-1.3.15
[user@vps ~]$ rpm -qa | grep spam* 
spamassassin-toaster-3.1.8-1.3.8
[user@vps ~]$ rpm -qa | grep vpop*
vpopmail-toaster-5.4.17-1.3.4

Thanks.
-
Qmailtoaster is sponsored by Vickers Consulting Group 
(www.vickersconsulting.com)
Vickers Consulting Group offers Qmailtoaster support and installations.
  If you need professional help with your setup, contact them today!
-
 Please visit qmailtoaster.com for the latest news, updates, and packages.

  To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
 For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com




[qmailtoaster] learn-spam.pl

2008-07-06 Thread Jon Ernster
Figured I'd share something I wrote that others here might use since 
many of you have shared or helped me out as well.


I wrote this because when I go on vacation I usually shut down the 
laptop that has my mail rules which sends all my spam to the spam 
folder.  By the time I get back the shell script that I have that runs 
on a daily basis (courtesy of Jake Vickers) gives this error because 
there are too many spam files:


/root/learn-spam: /usr/bin/sa-learn: /usr/bin/perl: bad interpreter: Argument 
list too long
/root/learn-spam: line 10: /bin/rm: Argument list too long

So I just wrote this to process the files individually.  Not the fastest script 
in the world (because of SpamAssassin, not becaues of my code, obviously) ;), 
but it works.

J.






#!/usr/bin/perl

use strict;
use warnings;
use Getopt::Std;

#~ $Id: learn-spam.pl 15 2008-07-03 17:27:09Z jernster $

my %opts = ();

getopts( 'd:u:', \%opts );

my ( $domain, $user ) = @opts{ qw( d u ) };

my $usage =EOF;
Usage:

   $0 -d example.com -u user

EOF

die $usage unless ( $domain  $user );

my $dir = /home/vpopmail/domains/$domain/$user/Maildir/cur;
my $starttime = time;
my $count = 0;

opendir(DIR, $dir);
my @files = readdir(DIR);
close(DIR);

foreach my $file ( @files )
{
   if ( $file =~ /^\./ )
   {
  next;

   }
   else
   {
  my $fpfile = $dir/$file;

  $count++;

  print Learning SPAM - $file\n;
  
  system(/usr/bin/sa-learn --spam $fpfile);

  print Deleting $file\n;

  unlink($fpfile);

   }

}

print Syncing databases...\n;
system(/usr/bin/sa-learn --sync);

print De-linting files...\n;
system(/usr/bin/spamassassin --lint);

system(chown vpopmail:vchkpw /home/vpopmail/.spamassassin/*);

system(/usr/bin/qmail-spam restart);

print Done!\n;

my $duration = time - $starttime;

print \nTotal duration: $duration seconds\n;
print Processed $count SPAM files.\n;

-
 QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: [qmailtoaster] learn-spam.pl

2008-07-06 Thread Jon Ernster

Eric Shubert wrote:

Jon Ernster wrote:
  

Figured I'd share something I wrote that others here might use since
many of you have shared or helped me out as well.

I wrote this because when I go on vacation I usually shut down the
laptop that has my mail rules which sends all my spam to the spam
folder.  By the time I get back the shell script that I have that runs
on a daily basis (courtesy of Jake Vickers) gives this error because
there are too many spam files:

/root/learn-spam: /usr/bin/sa-learn: /usr/bin/perl: bad interpreter:
Argument list too long
/root/learn-spam: line 10: /bin/rm: Argument list too long

So I just wrote this to process the files individually.  Not the fastest
script in the world (because of SpamAssassin, not becaues of my code,
obviously) ;), but it works.

J.



#!/usr/bin/perl

use strict;
use warnings;
use Getopt::Std;

#~ $Id: learn-spam.pl 15 2008-07-03 17:27:09Z jernster $

my %opts = ();

getopts( 'd:u:', \%opts );

my ( $domain, $user ) = @opts{ qw( d u ) };

my $usage =EOF;
Usage:

   $0 -d example.com -u user

EOF

die $usage unless ( $domain  $user );

my $dir = /home/vpopmail/domains/$domain/$user/Maildir/cur;
my $starttime = time;
my $count = 0;

opendir(DIR, $dir);
my @files = readdir(DIR);
close(DIR);

foreach my $file ( @files )
{
   if ( $file =~ /^\./ )
   {
  next;

   }
   else
   {
  my $fpfile = $dir/$file;

  $count++;

  print Learning SPAM - $file\n;
  
  system(/usr/bin/sa-learn --spam $fpfile);


  print Deleting $file\n;

  unlink($fpfile);

   }

}

print Syncing databases...\n;
system(/usr/bin/sa-learn --sync);

print De-linting files...\n;
system(/usr/bin/spamassassin --lint);

system(chown vpopmail:vchkpw /home/vpopmail/.spamassassin/*);

system(/usr/bin/qmail-spam restart);

print Done!\n;

my $duration = time - $starttime;

print \nTotal duration: $duration seconds\n;
print Processed $count SPAM files.\n;




Thanks, Jon. I wish we had a little more of this.

Observations:
.) I like the way you've handled parameters
.) Is this learning everything in the user's cur directory as spam? Doesn't
seem appropriate to me
.) all sa-learn and spamassassin commands need to be run as user vpopmail.
How is that happening?
.) qmail-spam is usually in /usr/sbin, not /usr/bin

  

Eric,

I create a user named spam and I forward everything to that 
user/directory.  You're right that this wouldn't be ideal for someone to 
run this against their personal mail box.  Alternatively this could 
easily be modified to learn email as HAM instead of SPAM.


I just run the script as root - seems to work.

Location is pretty much irrelevant as long as it's some where in the 
PATH as to not have to reference it WITH the full path if necessary.


Appreciate the comments!

Jon


Re: [qmailtoaster] learn-spam.pl

2008-07-06 Thread Jon Ernster

Eric Shubert wrote:

Jon Ernster wrote:
  

Eric Shubert wrote:


Jon Ernster wrote:
  
  

Figured I'd share something I wrote that others here might use since
many of you have shared or helped me out as well.

I wrote this because when I go on vacation I usually shut down the
laptop that has my mail rules which sends all my spam to the spam
folder.  By the time I get back the shell script that I have that runs
on a daily basis (courtesy of Jake Vickers) gives this error because
there are too many spam files:

/root/learn-spam: /usr/bin/sa-learn: /usr/bin/perl: bad interpreter:
Argument list too long
/root/learn-spam: line 10: /bin/rm: Argument list too long

So I just wrote this to process the files individually.  Not the fastest
script in the world (because of SpamAssassin, not becaues of my code,
obviously) ;), but it works.

J.



#!/usr/bin/perl

use strict;
use warnings;
use Getopt::Std;

#~ $Id: learn-spam.pl 15 2008-07-03 17:27:09Z jernster $

my %opts = ();

getopts( 'd:u:', \%opts );

my ( $domain, $user ) = @opts{ qw( d u ) };

my $usage =EOF;
Usage:

   $0 -d example.com -u user

EOF

die $usage unless ( $domain  $user );

my $dir = /home/vpopmail/domains/$domain/$user/Maildir/cur;
my $starttime = time;
my $count = 0;

opendir(DIR, $dir);
my @files = readdir(DIR);
close(DIR);

foreach my $file ( @files )
{
   if ( $file =~ /^\./ )
   {
  next;

   }
   else
   {
  my $fpfile = $dir/$file;

  $count++;

  print Learning SPAM - $file\n;
  
  system(/usr/bin/sa-learn --spam $fpfile);


  print Deleting $file\n;

  unlink($fpfile);

   }

}

print Syncing databases...\n;
system(/usr/bin/sa-learn --sync);

print De-linting files...\n;
system(/usr/bin/spamassassin --lint);

system(chown vpopmail:vchkpw /home/vpopmail/.spamassassin/*);

system(/usr/bin/qmail-spam restart);

print Done!\n;

my $duration = time - $starttime;

print \nTotal duration: $duration seconds\n;
print Processed $count SPAM files.\n;





Thanks, Jon. I wish we had a little more of this.

Observations:
.) I like the way you've handled parameters
.) Is this learning everything in the user's cur directory as spam? Doesn't
seem appropriate to me
.) all sa-learn and spamassassin commands need to be run as user vpopmail.
How is that happening?
.) qmail-spam is usually in /usr/sbin, not /usr/bin

  
  

Eric,

I create a user named spam and I forward everything to that
user/directory.  You're right that this wouldn't be ideal for someone to
run this against their personal mail box.  Alternatively this could
easily be modified to learn email as HAM instead of SPAM.

I just run the script as root - seems to work.



It would update root's bayes database ok (the database is created if it
doesn't exist). That's not the same database which is used on incoming mail
though.

  

[EMAIL PROTECTED] ~]# perl learn-spam.pl -d dumbfounded.net -u spam
Learning SPAM - 
1215351471.M922793P3482V004AI098D13EC_417.vps.dumbfounded.net,S=2432:2,

Learned tokens from 1 message(s) (1 message(s) examined)
Deleting 
1215351471.M922793P3482V004AI098D13EC_417.vps.dumbfounded.net,S=2432:2,
Learning SPAM - 
1215370267.M407813P30062V004AI098D1994_2.vps.dumbfounded.net,S=2260:2,

Learned tokens from 1 message(s) (1 message(s) examined)
Deleting 
1215370267.M407813P30062V004AI098D1994_2.vps.dumbfounded.net,S=2260:2,
Learning SPAM - 
1215344032.M28632P3482V004AI098D1066_416.vps.dumbfounded.net,S=3416:2,

Learned tokens from 1 message(s) (1 message(s) examined)
Deleting 
1215344032.M28632P3482V004AI098D1066_416.vps.dumbfounded.net,S=3416:2,
Learning SPAM - 
1215381127.M194384P30062V004AI098D1A54_5.vps.dumbfounded.net,S=1986:2,

Learned tokens from 1 message(s) (1 message(s) examined)
Deleting 
1215381127.M194384P30062V004AI098D1A54_5.vps.dumbfounded.net,S=1986:2,
Learning SPAM - 
1215361414.M459353P3482V004AI098D161C_419.vps.dumbfounded.net,S=2887:2,

Learned tokens from 1 message(s) (1 message(s) examined)
Deleting 
1215361414.M459353P3482V004AI098D161C_419.vps.dumbfounded.net,S=2887:2,
Learning SPAM - 
1215366247.M890863P30062V004AI098D1972_0.vps.dumbfounded.net,S=20120:2,

Learned tokens from 1 message(s) (1 message(s) examined)
Deleting 
1215366247.M890863P30062V004AI098D1972_0.vps.dumbfounded.net,S=20120:2,
Learning SPAM - 
1215343789.M956277P3482V004AI098D083E_415.vps.dumbfounded.net,S=3323:2,

Learned tokens from 1 message(s) (1 message(s) examined)
Deleting 
1215343789.M956277P3482V004AI098D083E_415.vps.dumbfounded.net,S=3323:2,
Learning SPAM - 
1215336171.M990235P3482V004AI098D105C_414.vps.dumbfounded.net,S=2384:2,

Learned tokens from 1 message(s) (1 message(s) examined)
Deleting 
1215336171.M990235P3482V004AI098D105C_414

Re: [qmailtoaster] learn-spam.pl

2008-07-06 Thread Jon Ernster

Eric Shubert wrote:

Jon Ernster wrote:
  

Eric Shubert wrote:


Jon Ernster wrote:
  
  

Eric Shubert wrote:



Jon Ernster wrote:
  
  
  

Figured I'd share something I wrote that others here might use since
many of you have shared or helped me out as well.

I wrote this because when I go on vacation I usually shut down the
laptop that has my mail rules which sends all my spam to the spam
folder.  By the time I get back the shell script that I have that runs
on a daily basis (courtesy of Jake Vickers) gives this error because
there are too many spam files:

/root/learn-spam: /usr/bin/sa-learn: /usr/bin/perl: bad interpreter:
Argument list too long
/root/learn-spam: line 10: /bin/rm: Argument list too long

So I just wrote this to process the files individually.  Not the fastest
script in the world (because of SpamAssassin, not becaues of my code,
obviously) ;), but it works.

J.



#!/usr/bin/perl

use strict;
use warnings;
use Getopt::Std;

#~ $Id: learn-spam.pl 15 2008-07-03 17:27:09Z jernster $

my %opts = ();

getopts( 'd:u:', \%opts );

my ( $domain, $user ) = @opts{ qw( d u ) };

my $usage =EOF;
Usage:

   $0 -d example.com -u user

EOF

die $usage unless ( $domain  $user );

my $dir = /home/vpopmail/domains/$domain/$user/Maildir/cur;
my $starttime = time;
my $count = 0;

opendir(DIR, $dir);
my @files = readdir(DIR);
close(DIR);

foreach my $file ( @files )
{
   if ( $file =~ /^\./ )
   {
  next;

   }
   else
   {
  my $fpfile = $dir/$file;

  $count++;

  print Learning SPAM - $file\n;
  
  system(/usr/bin/sa-learn --spam $fpfile);


  print Deleting $file\n;

  unlink($fpfile);

   }

}

print Syncing databases...\n;
system(/usr/bin/sa-learn --sync);

print De-linting files...\n;
system(/usr/bin/spamassassin --lint);

system(chown vpopmail:vchkpw /home/vpopmail/.spamassassin/*);

system(/usr/bin/qmail-spam restart);

print Done!\n;

my $duration = time - $starttime;

print \nTotal duration: $duration seconds\n;
print Processed $count SPAM files.\n;






Thanks, Jon. I wish we had a little more of this.

Observations:
.) I like the way you've handled parameters
.) Is this learning everything in the user's cur directory as spam? Doesn't
seem appropriate to me
.) all sa-learn and spamassassin commands need to be run as user vpopmail.
How is that happening?
.) qmail-spam is usually in /usr/sbin, not /usr/bin

  
  
  

Eric,

I create a user named spam and I forward everything to that
user/directory.  You're right that this wouldn't be ideal for someone to
run this against their personal mail box.  Alternatively this could
easily be modified to learn email as HAM instead of SPAM.

I just run the script as root - seems to work.



It would update root's bayes database ok (the database is created if it
doesn't exist). That's not the same database which is used on incoming mail
though.

  
  

[EMAIL PROTECTED] ~]# perl learn-spam.pl -d dumbfounded.net -u spam
Learning SPAM -
1215351471.M922793P3482V004AI098D13EC_417.vps.dumbfounded.net,S=2432:2,
Learned tokens from 1 message(s) (1 message(s) examined)
Deleting
1215351471.M922793P3482V004AI098D13EC_417.vps.dumbfounded.net,S=2432:2,
Learning SPAM -
1215370267.M407813P30062V004AI098D1994_2.vps.dumbfounded.net,S=2260:2,
Learned tokens from 1 message(s) (1 message(s) examined)
Deleting
1215370267.M407813P30062V004AI098D1994_2.vps.dumbfounded.net,S=2260:2,
Learning SPAM -
1215344032.M28632P3482V004AI098D1066_416.vps.dumbfounded.net,S=3416:2,
Learned tokens from 1 message(s) (1 message(s) examined)
Deleting
1215344032.M28632P3482V004AI098D1066_416.vps.dumbfounded.net,S=3416:2,
Learning SPAM -
1215381127.M194384P30062V004AI098D1A54_5.vps.dumbfounded.net,S=1986:2,
Learned tokens from 1 message(s) (1 message(s) examined)
Deleting
1215381127.M194384P30062V004AI098D1A54_5.vps.dumbfounded.net,S=1986:2,
Learning SPAM -
1215361414.M459353P3482V004AI098D161C_419.vps.dumbfounded.net,S=2887:2,
Learned tokens from 1 message(s) (1 message(s) examined)
Deleting
1215361414.M459353P3482V004AI098D161C_419.vps.dumbfounded.net,S=2887:2,
Learning SPAM -
1215366247.M890863P30062V004AI098D1972_0.vps.dumbfounded.net,S=20120:2,
Learned tokens from 1 message(s) (1 message(s) examined)
Deleting
1215366247.M890863P30062V004AI098D1972_0.vps.dumbfounded.net,S=20120:2,
Learning SPAM -
1215343789.M956277P3482V004AI098D083E_415.vps.dumbfounded.net,S=3323:2,
Learned tokens from 1 message(s) (1 message(s) examined)
Deleting
1215343789.M956277P3482V004AI098D083E_415.vps.dumbfounded.net,S=3323:2,
Learning SPAM -
1215336171.M990235P3482V004AI098D105C_414.vps.dumbfounded.net,S=2384:2,
Learned tokens from 1 message(s) (1 message

Re: [qmailtoaster] clamd

2008-07-03 Thread Jon Ernster
I upgraded yesterday and so far so good.  Thanks so much!  Looks like I 
should probably upgrade to the latest spamassassin as well.


Take care,

Jon

PakOgah wrote:

Jon Ernster wrote:
My clamd seems to be frequently updating itself throughout the day 
and when this happens it temporarily rejects any incoming messages 
from what I can tell from the logs.  Is there any way to control the 
frequency of its updates?


Additionally I'm getting a lot of duplicate emails and I believe this 
is also due to clamd.  Anyone else experiencing this problem and is 
there a resolution?


I'm running the following versions:

[EMAIL PROTECTED] ~]$ rpm -qa | grep qmail
qmail-pop3d-toaster-1.03-1.3.15
qmailadmin-toaster-1.2.11-1.3.4
qmail-toaster-1.03-1.3.15
[EMAIL PROTECTED] ~]$ rpm -qa | grep clam
clamav-toaster-0.90.1-1.3.13

Thanks,

Jon


you still running the old version of clamav,
some says upgrading to latest version could solve it
http://qmailtoaster.org/download/develop/clamav-toaster-0.93-1.3.18.src.rpm 



for complete list new qmailtoaster package visit http://qmailtoaster.org/


-
QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[qmailtoaster] clamd

2008-06-30 Thread Jon Ernster
My clamd seems to be frequently updating itself throughout the day and 
when this happens it temporarily rejects any incoming messages from what 
I can tell from the logs.  Is there any way to control the frequency of 
its updates?


Additionally I'm getting a lot of duplicate emails and I believe this is 
also due to clamd.  Anyone else experiencing this problem and is there a 
resolution?


I'm running the following versions:

[EMAIL PROTECTED] ~]$ rpm -qa | grep qmail
qmail-pop3d-toaster-1.03-1.3.15
qmailadmin-toaster-1.2.11-1.3.4
qmail-toaster-1.03-1.3.15
[EMAIL PROTECTED] ~]$ rpm -qa | grep clam
clamav-toaster-0.90.1-1.3.13

Thanks,

Jon

-
QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[qmailtoaster] clamd

2008-06-30 Thread Jon Ernster
My clamd seems to be frequently updating itself throughout the day and 
when this happens it temporarily rejects any incoming messages from what 
I can tell from the logs.  Is there any way to control the frequency of 
its updates?


Additionally I'm getting a lot of duplicate emails and I believe this is 
also due to clamd.  Anyone else experiencing this problem and is there a 
resolution?


I'm running the following versions:

[EMAIL PROTECTED] ~]$ rpm -qa | grep qmail
qmail-pop3d-toaster-1.03-1.3.15
qmailadmin-toaster-1.2.11-1.3.4
qmail-toaster-1.03-1.3.15
[EMAIL PROTECTED] ~]$ rpm -qa | grep clam
clamav-toaster-0.90.1-1.3.13

Thanks,

Jon

-
QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[qmailtoaster] clamd

2008-06-30 Thread Jon Ernster
My clamd seems to be frequently updating itself throughout the day and 
when this happens it temporarily rejects any incoming messages from what 
I can tell from the logs.  Is there any way to control the frequency of 
its updates?


Additionally I'm getting a lot of duplicate emails and I believe this is 
also due to clamd.  Anyone else experiencing this problem and is there a 
resolution?


I'm running the following versions:

[EMAIL PROTECTED] ~]$ rpm -qa | grep qmail
qmail-pop3d-toaster-1.03-1.3.15
qmailadmin-toaster-1.2.11-1.3.4
qmail-toaster-1.03-1.3.15
[EMAIL PROTECTED] ~]$ rpm -qa | grep clam
clamav-toaster-0.90.1-1.3.13

Thanks,

Jon

-
QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[qmailtoaster] clamd

2008-06-30 Thread Jon Ernster
My clamd seems to be frequently updating itself throughout the day and 
when this happens it temporarily rejects any incoming messages from what 
I can tell from the logs.  Is there any way to control the frequency of 
its updates?


Additionally I'm getting a lot of duplicate emails and I believe this is 
also due to clamd.  Anyone else experiencing this problem and is there a 
resolution?


I'm running the following versions:

[EMAIL PROTECTED] ~]$ rpm -qa | grep qmail
qmail-pop3d-toaster-1.03-1.3.15
qmailadmin-toaster-1.2.11-1.3.4
qmail-toaster-1.03-1.3.15
[EMAIL PROTECTED] ~]$ rpm -qa | grep clam
clamav-toaster-0.90.1-1.3.13

Thanks,

Jon

-
QmailToaster hosted by: VR Hosted http://www.vr.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]