[vchkpw] pop maildir quota summary

2004-02-07 Thread Jason Parker
Over in the qmail list...

On Feb 7, 2004, at 3:09 AM, Jeremy Kitchen wrote:

On Fri, 2004-02-06 at 19:59, Jason Parker wrote:
But qmail-maildir++.patch causes a compile error. I didn't look into
it
and forget what the error was.
Has anybody else applied the maildir++ patch in an OSX 10.3 compile?
probably the error about the finally removed, deprecated for a long
time, newline in the middle of a string literal.
if you look at the code, there's a line that has a newline and a few
more characters.  It was a bug in the patch, which has been reported,
by
myself personally if nobody else (at least to Bill Shupp's version)
However, maildir++'s maildirquota stuff has problems with concept, and
brings us back to ye ole' mbox locking over nfs problem, see past
discussions about this in the archives.
-Jeremy
Thanks. For the good info.
In my situation quotas aren't (yet) a big deal. But I just don't feel
right knowing it isn't working correctly... :-)
I'll ask about the right way to handle/think about the maildirquota
issue over in the vpopmail list...
-jason
Ok, I looked over (waded through) the archives and found some answers...
What I think I'm reading is that:
  1. It is somewhat broken - or as Charles said said: maildir++ is 
broken by design.  This is stated fairly cleanly in the README.quotas 
file (though it doesn't discuss locking or NFS).

  2. The maildrop++.patch isn't really a solution. The README.quotas 
file states the opposite (Should this be updated ? ...)

  3. That there really isn't yet a good solution using vdelivermail
 ...with the possible exception that you could set up some 
external scripts
 to update the maildirsize file...

  4. That  using maildrop presents a good solution...
(See the following posts (as being some of the wheat from the 
chaff -
  mostly posts from Tim Hasson):
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg14326.html
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg14481.html
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg14654.html
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg14891.html

Am I missing anything?

Thanks,
-jason


[vchkpw] config issues for postgres

2004-02-07 Thread Jason Parker
FYI --

Besides the error noted on the other thread...
Here are some more issues I noticed when doing configure for postgres.
Michael - thanks for your helpful pages
http://www.pipeline.com.au/staff/mbowe/isp/vpopmail-postgresql.htm
Some items here may belong on it...
-
Using
  --enable-postgres=y
was not recognized and defaulted to use cdb
(Is this still supported/supposed to work?)
Using
--enable-auth-module=pgsql
worked.
-
I think it was necessary to create a vpopmail user in postgres:
[EMAIL PROTECTED]: pgsql createuser vpopmail
Shall the new user be allowed to create databases? (y/n) n
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER
-
Finally... using the vconvert failed on a fresh db until I got vpopmail 
to create the tables by adding a new vpopmail domain. Once the new 
domain had been created, vconvert then got the data into the tables 
(despite the error reported in the other thread).

-jason



Re: [vchkpw] vpopmail and postgresql error on valias

2004-02-06 Thread Jason Parker
On Feb 4, 2004, at 2:25 AM, Vpopmail Mailinglist wrote:

hi guys..
im getting a error when i try to create an alias on vpopmail 5.4.0.. im
getting :
lx0007:/usr/src/vpopmail-5.4.0# /var/qmail/vpopmail/bin/valias -i
[EMAIL PROTECTED] [EMAIL PROTECTED]
vpgsql:sql error[n]:ERROR:  parser: parse error at or near ( at
character 112
vpgsql: sql error[j]: ERROR:  Relation valias does not exist

vpgsql:sql error[n]:ERROR:  parser: parse error at or near ( at
character 112
vpgsql: sql error[k]: ERROR:  Relation valias does not exist

any idea ?


I got that too.

The errors say the relation valias does not exist

... using vconvert ...

  [EMAIL PROTECTED]:etc # setuidgid vpopmail vconvert -c -m
  vpgsql:sql error[n]:ERROR:  syntax error at or near ( at character  
112

  vpgsql: sql error: ERROR:  relation valias does not exist

... And when delivering mail (qmail-send) ...

  2004-02-06 15:58:04.366286500 starting delivery 1: msg 311219 to  
local [EMAIL PROTECTED]
  2004-02-06 15:58:04.366296500 status: local 1/10 remote 0/20
  2004-02-06 15:58:04.366299500 starting delivery 2: msg 311219 to  
remote [EMAIL PROTECTED]
  2004-02-06 15:58:04.366303500 status: local 1/10 remote 1/20
  2004-02-06 15:58:04.488389500 delivery 1: success:  
vpgsql:sql_error[n]:ERROR: 
__syntax_error_at_or_near_(_at_character_112//vpgsql:_sql_error[j]: 
_ERROR:__relation_valias_does_not_exist//did_0+0+1/
  2004-02-06 15:58:04.489176500 status: local 0/10 remote 1/20
  2004-02-06 15:58:05.671511500 delivery 2: success:  
63.121.160.34_accepted_message./Remote_host_said: 
_250_ok_1076104694_qp_42069/

-jason




Re: [vchkpw] domain user scripts

2004-01-24 Thread Jason Parker
On Friday, January 23, 2004, at 11:40 PM, Jeremy Kitchen wrote:

On Fri, 2004-01-23 at 19:41, Jason Parker wrote:
FYI -
[snip]

so what's wrong with rsync?

-Jeremy
In short - I may only have one system to work with in this case 
(working on that)... there is still tar. I'm not storing mail and am 
rebuilding stuff fresh. I just wanted the user info. I haven't used 
vconvert before and it is not entirely clear what happens/will 
happen I don't have prior experience migrating vpopmail domains, 
but I assume the procedure you allude to would be to vconvert to cdb 
from mysql, rsync the entire domain tree to the new system and then 
vconvert to postgres... and there is still tar... the procedure has 
become more clear to me as I get closer to doing it ... still I just 
wanted a plain text backup... anyway, I wrote the scripts and posted 
them...

-jason



[vchkpw] domain user scripts

2004-01-23 Thread Jason Parker
FYI -

Here are two scripts (further below) I wrote as an alternative to 
moving domains and users.

vmakeadddomains will read your domains and create a script to recreate 
those domains to another working system. Pretty simple. It doesn't 
attempt to move any domain settings.

vmakeaddusers will read all users and create a script to recreate those 
users for each domain.
It only works with clear passwd set on.
It recreates the user, quota, comment and passwd. All other items are 
left behind.
It doesn't move postmaster, assuming that creating the domain creates 
postmaster.

For both scripts remember to chmod 755... on them and then their 
outputs (I decided this was a good pause for the admin to consider what 
they were going to do :-)

I did this because I'm moving a small setup to a new os install and 
from MySQL to Postgres. I wanted a backup of what I had and an 
alternative for the bit clunky vconvert shuffle in case of trouble ...

-jason

vmakeadddomains  
#!/bin/bash
#
vpath=/var/qmail/vpopmail
domains=`$vpath/bin/vdominfo`
domains=`echo ${domains} | grep domain:`
domains=`echo ${domains} | sed s/^domain://`
echo Domains found:
echo ${domains}
echo Creating vadddomains file ...
thecode=#!/bin/bash
# recreates vpopmail domains
# edit to suit

for dom in $domains
do
thecode=${thecode}
echo \Adding domain: $dom ...\
${vpath}/bin/vadddomain -u vpopmail ${dom} 
done
echo -e ${thecode}  vadddomains

echo 
cat vadddomains
echo 
echo Copy the vadddomains file to the new installation.
echo Edit it to suit the new installation.
echo chmod 755 vadddomains before running.
# end
vmakeaddusers-
#!/bin/bash
# Works only with clear passwds enabled
vpath=/var/qmail/vpopmail
domains=`$vpath/bin/vdominfo`
domains=`echo ${domains} | grep domain:`
domains=`echo ${domains} | sed s/^domain://`
echo Domains found:
echo ${domains}
headcode=#!/bin/bash
# recreates vpopmail user for a given domain
# edit to suit

for dom in $domains
do
echo Creating vaddusers.${dom} file ...
thecode=${headcode}
# do the users for the domain
users=`$vpath/bin/vuserinfo -n -D $dom`
for user in $users
 do
if [ ${user} = postmaster ] ; then
   continue
fi
quota=`$vpath/bin/vuserinfo -q [EMAIL PROTECTED]
if [ -n ${quota} ] ; then
   quota=-q ${quota}
fi
comment=`$vpath/bin/vuserinfo -c [EMAIL PROTECTED]
comment=`echo $comment | sed s/^ *//` # in case it has all spaces
if [ -n ${comment} ] ; then
   comment=-c ${comment}
fi
passwd=`$vpath/bin/vuserinfo -C [EMAIL PROTECTED]
thecode=${thecode}
echo \Adding user: $user ...\
$vpath/bin/vadduser ${quota} ${comment} [EMAIL PROTECTED] ${passwd}
 done
echo -e ${thecode}  vaddusers.${dom}
done
echo 
echo Copy the vaddusers.domain files to the new installation.
echo Edit each to suit the new installation.
echo chmod 755 on each before running.
#end