Re: [vchkpw] Vpopmail question

2003-10-17 Thread Matthew Berardi
I would start with a fresh queue on the new server and have the old
server deliver the queued mail to the new server by changing the controls:
remove the entries from control/virtualdomains and populate
control/smtproutes with static routes to the new server.
David Bristol wrote:
As far as vpopmail goes, you would need the cgi-bin directory as well.
Also, for both qmail and vpopmail you would have to have the same user
and group accounts with the same UID/GIDs on the machine that you are
transferring to. 

Qmail will barf on the queues as soon as you transfer it, but there is a
way (I don't remember personally) to regenerate the queues. Other than
that, theoretically, it should work.
On Fri, 2003-10-17 at 19:36, Mike Smith wrote:
 

If i were to install qmail and vpopmail on a second server and then
just copy the entire /home/vpopmail folder
to the other machine, would all the email  and mailboxes be tranferred
to the new machine?
thanks

-Mike
   



 







Re: [vchkpw] Aliases not working with maildrop spamassassin?

2003-06-06 Thread matthew berardi
On Thu, 5 Jun 2003 04:39:56 -0400
Jasper Metselaar [EMAIL PROTECTED] wrote:

 Hi,
 
 I have a real [EMAIL PROTECTED] which is tagged for spam checking. The 
 .qmail-default contains
 
 | /usr/local/bin/maildrop mailfilter file
 
 which calls maildrop and in mailfilter, runs through spamd to check for spam then 
 pass it back to vdelivermail to deliver to the proper mailbox. Then I created a 
 [EMAIL PROTECTED], which is an alias to [EMAIL PROTECTED] A .qmail-test is created 
 which points to mydomain.com/user/Maildir. When an email
 is sent to [EMAIL PROTECTED], qmail just dumps it directly into user's 
 mailbox,completely out of the spam checking task.
 
 Shouldn't the .qmail-test file's content be the same as the .qmail-default file?
 How do you enable alias to behave the same as the account that it's aliased to? Of 
 course I can use a forwarder to [EMAIL PROTECTED] instead, but I don't think this is 
 the best wayor?
 
 Thanks in advance for your suggestions!
 
 Jasper
 
 ___
 
 
 
it is actually very simple, /mydomain/user/Maildir/ is a delivery statement, you are 
telling it to deliver to that mailbox, that's what is says. if you don't want the mail 
to be delivered to that box, don't put a delivery statement in the .qmail.

if you put | /path/to/maildrop ... you'd be telling it to run maildrop
if you put [EMAIL PROTECTED] you'd be telling it to redeliver the message as though 
it was for user, at which point it would go through the process of reading .qmail 
files for user

read http://www.qmail.org/man/man5/dot-qmail.html, it explains it all.



Re: [vchkpw] Working towards vpopmail 5.4 stable

2003-06-06 Thread matthew berardi
a process to update all possible dot-qmail files would be VERY heavy
and would be abused, besides you CAN easily rename a domain, without
that hassle, it's just not as clean, change the name (NOT the path) in
user/assign, and issue UPDATE vpopmail SET pw_domain='newname' WHERE
pw_name='oldname';
you could then symlink domains/olddomain to domains/newdomain for ease
of dir navigation.

matt

On Thu, 5 Jun 2003 10:28:02 +0200
Raboo [EMAIL PROTECTED] wrote:

 thats why it should exist, it's to much job to do it manually ;)
 
 - Original Message - 
 From: Tom Collins [EMAIL PROTECTED]
 To: vpopmail list [EMAIL PROTECTED]
 Sent: Thursday, June 05, 2003 7:02 AM
 Subject: Re: [vchkpw] Working towards vpopmail 5.4 stable
 
 
  On Wednesday, June 4, 2003, at 03:48  PM, Raboo wrote:
   rename domains.
   If I use vdeldomain on a alias will it remove the domain or just
   the alias
   domain. If it deletes the domain you should add a feature to
   remove aliases
  
  It just removes the alias.
  
  Renaming a domain in vpopmail is a little more difficult -- you'd
  have to update all the Maildir references in the .qmail files, and
  make sure you update all of the mailing list files.
  
  --
  Tom Collins
  [EMAIL PROTECTED]
  
  
 
 
 



Re: [vchkpw] Working towards vpopmail 5.4 stable

2003-06-05 Thread matthew berardi
On Wed, 4 Jun 2003 10:37:41 -0400 (EDT)
Moshe Jacobson [EMAIL PROTECTED] wrote:

 On Tue, 3 Jun 2003, Ken Jones wrote:
  Does anyone have any code changes they would like to get into the
  next release? I want to put together a new stable version 5.4. 
  Hopefully release it in the next few weeks.
 
 There seems to be a problem in th maildir_to_email() function in
 vdelivermail.c.  If the domain dir is not directly under the
 DOMAINS_DIR, e.g. /home/vpopmail/domains/1/example.com, then a user
 [EMAIL PROTECTED] will have a maildir of:
 
 /home/vpopmail/domains/1/example.com/joe/Maildir/
 
 and maildir_to_email() returns an email address of [EMAIL PROTECTED] instead of
 [EMAIL PROTECTED]
 
 This should definitely be fixed as it is a simple and obvious bug.
 
 My (untested) fix is as follows.  Change the following block located
 near the bottom of maildir_to_email():
 
 
 for( pnt = last + (strlen(DOMAINS_DIR)+2); (*pnt  *pnt != '/'  j  255); ++pnt, 
 ++j ) {
   email[j] = *pnt;
 }
 
 
 to:
 
 
 pnt = last + strlen(DOMAINS_DIR) + 2;
 while( *(pnt+1) == '/' ) pnt+=2;
 for( ; (*pnt  *pnt != '/'  j  255); ++pnt, ++j ) {
   email[j] = *pnt;
 }
 
 
 Moshe
 
 -- 
 Moshe Jacobson 
 http://runslinux.net 
 AIM: Jehsom
 
it seems to me a far more permanent and scalable solution would be to select pw_name, 
pw_domain where pw_dir=DIR in the database. it is conceivable that [EMAIL PROTECTED]'s 
maildir be located in /some/where/else/joe/Maildir



[vchkpw] AUTH_LOGGING and db failure tolarance.

2003-06-05 Thread matthew berardi
I don't know how many people would desire this behaviour. but I think it
should be considered.

in vmysql.c I added the following lines to vauth_open_update()

uint timeout = 1;
mysql_options(mysql_update, MYSQL_OPT_CONNECT_TIMEOUT, (char*) timeout);

this adds a timeout to the mysql_real_connect method.
without this libmysqlclient uses the standard connect() to connect
which, under heavy load, can take minutes to timeout, the effect is that
if the update server was to become unavailable your pop concurency would
max out very quickly, effectively a loss of service.

also you would want to remove the error lines:

fprintf(stderr, could not connect to mysql update server %s with database\n,
  mysql_error(mysql_update));

and

fprintf(stderr, could not connect to mysql update server %s\n,
  mysql_error(mysql_update));

because some pop clients break if they receive anything other than the
ok after auth.



Re: [vchkpw] AUTH_LOGGING and db failure tolarance.

2003-06-05 Thread matthew berardi
hmm, I had read that it was seconds however it is in fact less.
I know setting it to 1 is long enough for it to make the connection even
under moderate load on our 100mb/cisco lan, and I deleted the mysql
source because I'm stressed for disk space on my laptop, when I get a
chance I will investigate further, corporate programming has a tendancy
to reduce the priority on cleanup once you have it working.

I don't know if its desirable to set that on the other connections, are
they for adds/deletes? if so its hardly service impacting for them not
to timeout timely.

matt

btw, I apologise for our little problem a few months back on the qmail
list.
On Wed, 4 Jun 2003 10:50:29 -0500
Ken Jones [EMAIL PROTECTED] wrote:

 Done.
 
 I also added it to the other mysql connect calls (2 others).
 
 Is the timeout value in seconds? Maybe we should give it
 more than 1 second to connect. Perhaps 3?
 
 Ken Jones
 
 On Wednesday 04 June 2003 10:01 am, matthew berardi wrote:
  I don't know how many people would desire this behaviour. but I
  think it should be considered.
 
  in vmysql.c I added the following lines to vauth_open_update()
 
  uint timeout = 1;
  mysql_options(mysql_update, MYSQL_OPT_CONNECT_TIMEOUT, (char*)
  timeout);
 
  this adds a timeout to the mysql_real_connect method.
  without this libmysqlclient uses the standard connect() to connect
  which, under heavy load, can take minutes to timeout, the effect is
  that if the update server was to become unavailable your pop
  concurency would max out very quickly, effectively a loss of
  service.
 
  also you would want to remove the error lines:
 
  fprintf(stderr, could not connect to mysql update server %s with
  database\n, mysql_error(mysql_update));
 
  and
 
  fprintf(stderr, could not connect to mysql update server %s\n,
mysql_error(mysql_update));
 
  because some pop clients break if they receive anything other than
  the ok after auth.
 
 
 
 



[vchkpw] auth logging db tolorance

2003-06-05 Thread matthew berardi
sorry for the new thread,

ken,
the uint is in fact supposed to be seconds, I don't understand everything going on in 
connect2() in libmysqlclient, however the comments say seconds and it is put in a 
timeval struct, defined as seconds in bits/time.h.

further testing verifies this, however keep in mind when adjusting the value that the 
actuall lag experienced will be twice that as vmsql tries to connect twice (with and 
without specifying the database).

thanks
matt