[vchkpw] vpopmail skeleton patch

2007-09-19 Thread John Simpson

howdy all-

i have gone through the "skeleton patch" which has been floating  
around the net for a while, and found it to be rather painful to deal  
with. the code itself is borderline unreadable, and the recursive  
"copyskel()" function which creates the new directory calls itself,  
with its original parameters, leading me to believe that it may not  
even work correctly. it makes vpopmail not work if the skeleton  
directory is missing or does not contain the standard Maildir  
structure, and it also changes some other totally unrelated items- it  
changes the new domain default delivery target from "bounce-no- 
mailbox" to "delete", for example. and it also made a lot of  
insignificant changes to the spacing and indentation of the code,  
which was totally un-necessary.


i found it easier to start from scratch, using my own code, rather  
than try to clean up and trim down this other patch.


so i pulled a recursive "copydir()" function, along with a "copyfile 
()" and "makedir()" functions, from a program i wrote years ago, and  
rolled a patch which adds a skeleton functionality to vpopmail.


it's a bit different than the existing patch. basically, after  
creating the mailbox directory (the parent of "Maildir") vpopmail.c  
calls the new copydir() function, but it doesn't error out if copydir 
() fails- which allows ~vpopmail/skel to not exist without making  
vpopmail barf, or even complain. then, after copying the ~vpopmail/ 
skel items, it creates the standard Maildir structure as well, just  
in case the skeleton didn't contain it. this allows system admins to  
set up skeleton directories, either with or without the Maildir  
structure, without breaking anything.


i also broke down (finally) and figured out how to make the necessary  
changes to "configure.in", "config.h.in", and "Makefile.am", to add a  
"--configure-skeleton" option to the ./configure list. i also ran
"automake" and "autoconf" to generate the "Makefile.am" and  
"configure" files. the patch includes these changes as well.


and i added a README.skel file, with a basic description of what the  
new code does.


i've done a little bit of testing on my own server, it seems to work,  
and i am running it with a skeleton containing "Drafts", "Sent", and  
"Trash" IMAP folders. mailboxes added with "vadddomain" are being  
created with these folders already in place. however, i would like to  
see this code tested by several people before i recommend it for the  
next release of vpopmail. and if anybody has any suggestions for  
something which needs to go in the README.skel file, i'd like to hear  
that as well.


http://qmail.jms1.net/vpopmail/#skel


| John M. Simpson---   KG4ZOW   ---Programmer At Large |
| http://www.jms1.net/ <[EMAIL PROTECTED]> |

| http://video.google.com/videoplay?docid=-1656880303867390173 |





PGP.sig
Description: This is a digitally signed message part


Re: [vchkpw] shupp clamav hi cpu

2007-09-19 Thread Rick Macdougall

Remo Mattei wrote:

Hello, I just wonder if someone had the same problem I had with 90.2
clamav on hi cpu also I had the problem that it same ERROR need a full
path after clamav started. I found a patch for that and I have applied
the shupp's patch to 90.3 and now the load is low.

Just my 2 cents.

Remo Mattei
Network Security


Yes, but 0.91.2 doesn't seem to have the same problem.

Regards,

Rick



[vchkpw] wheri is it vpopmail-5.4.22

2007-09-19 Thread remzi . akyuz
Hello,
can you help me?
i downloaded
http://downloads.sourceforge.net/vpopmail/vpopmail-5.4.22.tar.gz?modtime=1189874978&big_mirror=0
and
./configure  --enable-roaming-users --enable-relay-clear-minutes=90
--enable-learn-passwords --enable-qmail-ext --enable-spamassassin
--enable-auth-module=mysql  --enable-logging=v --enable-sql-logging
--enable-mysql-limits  --enable-valias  --enable-incdir=/usr/mysql/include
  --enable-libdir=/usr/mysql/lib



vpopmail 5.4.21
Current settings
---

vpopmail directory = /home/vpopmail
 domains directory = /home/vpopmail/domains
   uid = 89
   gid = 89
 roaming users = ON  --enable-roaming-users
tcpserver file = /home/vpopmail/etc/tcp.smtp
open_smtp file = /home/vpopmail/etc/open-smtp
rebuild tcpserver file = ON  --enable-rebuild-tcpserver-file (default)
 password learning = ON  --enable-learn-passwords
 md5 passwords = ON  --enable-md5-passwords (default)
  file locking = ON  --enable-file-locking (default)
vdelivermail fsync = OFF --disable-file-sync (default)
 make seekable = ON  --enable-make-seekable (default)
  clear passwd = ON  --enable-clear-passwd (default)
 user dir hashing  = ON  --enable-users-big-dir (default)
address extensions = ON  --enable-qmail-ext
  ip alias = OFF --disable-ip-alias-domains (default)
   onchange script = OFF --disable-onchange-script (default)
   auth module = mysql --enable-auth-module=mysql
 mysql replication = OFF --disable-mysql-replication (default)
   sql logging = ON  --enable-sql-logging
  mysql limits = ON  --enable-mysql-limits
  SQL valias table = ON  --enable-valias
  auth inc = -I/usr/mysql/include
  auth lib = -L/usr/mysql/lib  -lmysqlclient -lz -lm
  system passwords = OFF --disable-passwd (default)
pop syslog = log success and errors including passwords
--enable-logging=v
  auth logging = ON  --enable-auth-logging (default)
all domains in one SQL table = --enable-many-domains (default)
  spamassassin = ON  --enable-spamassassin
  maildrop = OFF --disable-maildrop (default)


[EMAIL PROTECTED]:/var/src/vpopmail-5.4.22#


That is version 21 or 22?
i could not understand?

Thank for your time

Remzi


Re: [vchkpw] Mysql table

2007-09-19 Thread mlist


Please try creating a domain with a long name, up around 80-90 
characters long.  Then try to add a user, delete that user then delete 
that domain.  If it all works, you are in good shape and I'll change 
the note in INSTALL to say you don't have to do anything special if 
you are using --disable-many-domains.  If you have problems, let me 
know what happens and I'll figure something out.  I expect it will 
probably work.


Rick

Rick,

I did as you said and I recieved errors.  Here is the command I used and 
the errors returned.


mail:~ # vadddomain 
a.com

Please enter password for postmaster:
enter password again:
qmail-newu: fatal: bad format in users/assign
vmysql: error creating table 
'a_com': 
Incorrect table name 
'a_com'

Error. Failed while attempting to add domain to auth backend
qmail-newu: fatal: bad format in users/assign
Error: no authentication database connection


I'm not sure about that last error if it's refering to mysql database 
connectivity or not - the database is connected and I can establish 
authenticated smtp/pop3/imap connections.


I thought I'd try adding another, smaller domain:

mail:~ # vadddomain mytest.com
Please enter password for postmaster:
enter password again:
qmail-newu: fatal: bad format in users/assign
Error: (vadduser) Domain does not exist

However, the database table is created and the directory is created 
too.  I then tried to delete the domain:


mail:~ # vdeldomain mytest.com
Error: Domain does not exist

Again, however the table is still in the DB.  I'm not sure where to 
proceed.  I'm running SLES10 2.6.16-21.  I appreciate the help.


Matt


Re: [vchkpw] Mysql table

2007-09-19 Thread Joshua Megerman
> qmail-newu: fatal: bad format in users/assign

Before pursuing anything else, check this out - qmail-newu (part of qmail,
and simply called by vpopmail) is telling you that your
/var/qmail/users/assign file is incorrect/corrupted, and that it can't
create the users.cdb file from it.  Vpopmail uses the users/assign file to
track what domains it owns, so if that file is bad you're in for problems.
 I don't know what field size restrictions are for that (neither the man
page nor qmail-newu.c list any), but while that may not be your root
cause, it's certainly a part of it...

Josh

Joshua Megerman
SJGames MIB #5273 - OGRE AI Testing Division
You can't win; You can't break even; You can't even quit the game.
  - Layman's translation of the Laws of Thermodynamics
[EMAIL PROTECTED]



[vchkpw] update on hi cpu clamav

2007-09-19 Thread Remo Mattei
Below is a quote message from Andrew about clamav.. this may be a good
info for anyone who has problems.

Just my 2 cents.
Remo Mattei
Network Security

> 
> Message: 5
> Date: Wed, 19 Sep 2007 09:33:09 +0100
> From: Andrew Watkins <[EMAIL PROTECTED]>
> Subject: Re: [Clamav-users] clamscan does not terminate on specific
>   HTMLfile.
> To: ClamAV users ML <[EMAIL PROTECTED]>
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> 
> As always thanks to all:
> 
> Option 1)
>   replace *regex.h for pcreposix.h in all the following files:
>   # grep -l "include.*regex\.h" */*.c */*.h
>   clamav-milter/clamav-milter.c
>   clamscan/others.c
>   libclamav/regex_list.c
>   libclamav/phishcheck.h
> 
>   # LIBS='-lpcreposix -lpcre' LDFLAGS='-L/usr/local/lib -R/usr/local/lib' 
> ./configure
>   # make
>   # make install
> 
> And now all works fine again in solaris
> 
> Option 2) Upgrade to the latest source code. I will try this on a backup 
> server and if it works wait for the new full release so I can put in on 
>   the main server.
> 
> 
> Andrew


Re: [vchkpw] Mysql table

2007-09-19 Thread mlist

mlist wrote:


Please try creating a domain with a long name, up around 80-90 
characters long.  Then try to add a user, delete that user then 
delete that domain.  If it all works, you are in good shape and I'll 
change the note in INSTALL to say you don't have to do anything 
special if you are using --disable-many-domains.  If you have 
problems, let me know what happens and I'll figure something out.  I 
expect it will probably work.


Rick

Rick,

I did as you said and I recieved errors.  Here is the command I used 
and the errors returned.


mail:~ # vadddomain 
a.com 


Please enter password for postmaster:
enter password again:
qmail-newu: fatal: bad format in users/assign
vmysql: error creating table 
'a_com': 
Incorrect table name 
'a_com' 


Error. Failed while attempting to add domain to auth backend
qmail-newu: fatal: bad format in users/assign
Error: no authentication database connection


I'm not sure about that last error if it's refering to mysql database 
connectivity or not - the database is connected and I can establish 
authenticated smtp/pop3/imap connections.


I thought I'd try adding another, smaller domain:

mail:~ # vadddomain mytest.com
Please enter password for postmaster:
enter password again:
qmail-newu: fatal: bad format in users/assign
Error: (vadduser) Domain does not exist

However, the database table is created and the directory is created 
too.  I then tried to delete the domain:


mail:~ # vdeldomain mytest.com
Error: Domain does not exist

Again, however the table is still in the DB.  I'm not sure where to 
proceed.  I'm running SLES10 2.6.16-21.  I appreciate the help.


Matt
Well I made some slight progress.  Turns out that a. . . .com domains 
was still in my assign file.  I deleted it out (along with the dozen or 
so blank newlines after it) and then was able to add/delete "normal" 
size domains.  I tried again to add that a . . . .com domain and it gave 
me the same error and proceeded to break adding/deleting "normal" size 
domains.


Matt


Re: [vchkpw] wheri is it vpopmail-5.4.22

2007-09-19 Thread John Simpson

On 2007-09-19, at 1513, [EMAIL PROTECTED] wrote:

i downloaded
http://downloads.sourceforge.net/vpopmail/vpopmail-5.4.22.tar.gz ...
and
./configure ...

vpopmail 5.4.21
Current settings
---
...
That is version 21 or 22?
i could not understand?


there's a typo in 5.4.22. if you're really worried about it...

- expand the source
- edit "configure.in" and edit the AC_INIT line to have the right  
version number

- run "autoconf"

then run your "./configure" command line again.


| John M. Simpson---   KG4ZOW   ---Programmer At Large |
| http://www.jms1.net/ <[EMAIL PROTECTED]> |

| http://video.google.com/videoplay?docid=-1656880303867390173 |





PGP.sig
Description: This is a digitally signed message part


Re: [vchkpw] Mysql table

2007-09-19 Thread John Simpson

On 2007-09-19, at 1532, mlist wrote:


Please try creating a domain with a long name, up around 80-90  
characters long.

...


I did as you said and I recieved errors.  Here is the command I  
used and the errors returned.


...
vmysql: error creating table  
'a 
_com': Incorrect table name  
'a 
_com'

Error. Failed while attempting to add domain to auth backend


you missed the other error message. mysql has a limit of 64 bytes for  
a table name (at least mysql versions 5.1, 5.0, and 5.1 do, i'm  
assuming earlier versions had the same limit.)


also see RFC 1035 section 2.3.4. each portion of a domain name (i.e.  
the "abc" in "abc.com") can be no longer than 63 bytes, and no full  
hostname (i.e. "www.abc.com") can be longer than 255 bytes.


and since mysql has a limit of 64 bytes for a table name, you have  
a... maybe not a bug, but a design flaw. the name "a(63  
times).com" IS a valid domain name, but "a(63 times)_com" is NOT  
a valid table name.


perhaps you shouldn't store each domain's data in a separate table?  
i've never understood the reason for creating separate tables for  
each domain anyway- but since i don't normally use a SQL back-end for  
mailbox information, it's not something i really worry about.



| John M. Simpson---   KG4ZOW   ---Programmer At Large |
| http://www.jms1.net/ <[EMAIL PROTECTED]> |

| http://video.google.com/videoplay?docid=-1656880303867390173 |





PGP.sig
Description: This is a digitally signed message part


[vchkpw] Disable clear password

2007-09-19 Thread Kenny Lee

Hi all,

i have setup vpopmail ver 5.4.17 few months ago, and it is working fine all 
the way. When i setup the program, i enable the clear password while 
configure vpopmail. But now i wish to disable the clear password, what 
should i do to disable it?


What i have tried ...
i go back to the installation folder, re-run again 
"./configure --disable-clear-passwd", then "make" and "make install-strip" 
... but the result also same, when i used "vuserinfo" to view user's detail, 
the command still can show up the clear password of the user.


so what should i need to do to disable it?

THank you

Regards,
Kenny 



Re: [vchkpw] Disable clear password

2007-09-19 Thread Jeremy Kister

On 9/20/2007 2:28 AM, Kenny Lee wrote:

What i have tried ...
i go back to the installation folder, re-run again 
"./configure --disable-clear-passwd", then "make" and "make install-strip" 
... but the result also same, when i used "vuserinfo" to view user's detail, 
the command still can show up the clear password of the user.


You did the right thing recompiling.  That should make new passwords not 
contain the clear text.


But you've got to go through all the vpasswd files manually to remove 
the clear passwords from existing mailboxes.


I actually did the same thing years ago and published the code:
http://jeremy.kister.net/code/perl/vchkpw.remove_clearpw.pl

--

Jeremy Kister
http://jeremy.kister.net./


Re: [vchkpw] Disable clear password

2007-09-19 Thread Kenny Lee

Hi Jeremy,

after the re-compiling, i tried to create a new domain, and found that the 
[EMAIL PROTECTED] also showed out the clear password while i used 
"vuserinfo" command.


i unable to download the perl script you mentioned below ..
http://jeremy.kister.net/code/perl/vchkpw.remove_clearpw.pl

Regards,
Kenny Lee

From: "Jeremy Kister" <[EMAIL PROTECTED]>
To: 
Sent: 2007-09-20 02:44 PM
Subject: Re: [vchkpw] Disable clear password



On 9/20/2007 2:28 AM, Kenny Lee wrote:

What i have tried ...
i go back to the installation folder, re-run again 
"./configure --disable-clear-passwd", then "make" and "make 
install-strip" ... but the result also same, when i used "vuserinfo" to 
view user's detail, the command still can show up the clear password of 
the user.


You did the right thing recompiling.  That should make new passwords not 
contain the clear text.


But you've got to go through all the vpasswd files manually to remove the 
clear passwords from existing mailboxes.


I actually did the same thing years ago and published the code:
http://jeremy.kister.net/code/perl/vchkpw.remove_clearpw.pl

--

Jeremy Kister
http://jeremy.kister.net./