Re: [vchkpw] vpopmail 5.4.24 released

2007-10-01 Thread DAve

Rick Widmer wrote:


http://vpopmail.sf.net/

5.4.24 - released 29-Sep-2007

Release Notes:

This is a minor bug fix release.  Unless compiler warnings bother you as 
much as they bother me, or you want to use longer passwords, you can 
ignore it.


On the other hand, if you haven't test compiled vpopmail within the last 
month, you should seriously consider compiling with your favorite set of 
./configure options.  (On a test system!)  If you do, please post your 
configuration options and if they succeed or fail on the vpopmail 
mailing list.


I would also like to hear from a ldap user.  A large patch for ldap was 
added, recently and I don't know if it has been tested yet.


The topic of starting vpopmail version 6 has recently come up on the 
vpopmail list.  This discussion is moving, if you want to be involved, 
please join us on the SourceForge vpopmail-devel mailing list 
[EMAIL PROTECTED]



   http://sourceforge.net/projects/vpopmail/


I am not a developer, and I didn't sleep in a Holiday Inn last night. I 
would like to know what is going on and just maybe, when I am certain it 
may be a good thing, comment. Could I subscribe to the dev list? I would 
absolutely understand a "no" answer and not give it a second thought.


Thanks,

DAve


--
Three years now I've asked Google why they don't have a
logo change for Memorial Day. Why do they choose to do logos
for other non-international holidays, but nothing for
Veterans?

Maybe they forgot who made that choice possible.


Re: [vchkpw] vpopmail user/group

2007-10-01 Thread Japheth J.C. Cleaver
aledr wrote:
> Good day!
> 
> I need to build vpopmail as non-root user and used
> "--enable-non-root-build" but I got this message:
> 
> "checking for valid vpopmail user and group... yes
> checking whether password file entry for the vpopmail user exists...
> No vpopmail user found.
> Please add the vchkpw group and
> vpopmail user. Then run configure again
> no
> configure: error: Could not compile and run even a trivial ANSI C
> program - check CC."
> 
> So, is there a way to do not check the vpopmail user and group at build time?



In creating the vpopmail RPMs we use internally, I found the only way
was to patch things. The one we're currently using is below... If you're
not using some sort of package management, you should (obviously)
double-check ownership of various files after the normal vpopmail
install process.

http://www.redwire.net/~jccleaver/patches/vpopmail.no-root-needed.5.4.19.patch


Regards,
-jc



Re: [vchkpw] vpopmail 5.4.24 released

2007-10-01 Thread Tom Collins

On Oct 1, 2007, at 6:02 AM, DAve wrote:
I am not a developer, and I didn't sleep in a Holiday Inn last  
night. I would like to know what is going on and just maybe, when I  
am certain it may be a good thing, comment. Could I subscribe to  
the dev list? I would absolutely understand a "no" answer and not  
give it a second thought.


I think if you go to the vpopmail Sourceforge page (see my .sig) you  
can find the link to subscribe.  The developer list is open to anyone  
who's interested.


--
Tom Collins  -  [EMAIL PROTECTED]
Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/
QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/




[vchkpw] vpopmail and mysql

2007-10-01 Thread Carlos Collart
I am the dumbest person alive, and in charge of a vpopmail server,
I manage to drop database vpopmail
the system was a production one, under the domain xx_at_aduanett_dot_hn
I have a backup with the username, name, password in a CVS format

I am trying and getting:
[EMAIL PROTECTED] bin]# ./vadduser -q 10 -c "Carlos Collart" ccollart
'password'
Error: User's directory already exists?

i am googling for alternatives
./vadduser -ignoredirectory

or

how could i re-poblate the mysql directly?
insert values(xxx,hash(xxx),xx,xx) into 'aduanett.hn'.vpopmail or crypt?


[EMAIL PROTECTED] bin]# ./vadduser -v
version: 5.4.13


Re: [vchkpw] vpopmail and mysql

2007-10-01 Thread Rick Macdougall

Carlos Collart wrote:

I am the dumbest person alive, and in charge of a vpopmail server,
I manage to drop database vpopmail
the system was a production one, under the domain xx_at_aduanett_dot_hn
I have a backup with the username, name, password in a CVS format

I am trying and getting:
[EMAIL PROTECTED] bin]# ./vadduser -q 10 -c "Carlos Collart" ccollart 
'password'

Error: User's directory already exists?

i am googling for alternatives
./vadduser -ignoredirectory

or

how could i re-poblate the mysql directly?
insert values(xxx,hash(xxx),xx,xx) into 'aduanett.hn 
'.vpopmail or crypt?



[EMAIL PROTECTED] bin]# ./vadduser -v
version: 5.4.13


Hi,

If all you have is user, pass and domain name (what's the difference 
between username and name in your post ?  gecos perhaps ?), you'll need 
a script to find the users homedir.


You can then take the information gathered above and add it directly to 
the mysql database.  If all you have is the plain text password, you'll 
have to have a routine to encrypt it to MD5 before storing it.


If you don't care about losing the users existing email, just remove all 
the users directories in the/home/vpopmail/domains/domain.com directory 
and let vpopmail automagically add them.


If you need help, just ask.

Regards,

Rick



Re: [vchkpw] vpopmail and mysql

2007-10-01 Thread Rick Widmer

Carlos Collart wrote:

I am the dumbest person alive, and in charge of a vpopmail server,
I manage to drop database vpopmail


Not good...  Before you do anything else it might be wise to stop qmail, 
and all qmail-smtp processes then back up the mail store.



the system was a production one, under the domain xx_at_aduanett_dot_hn
I have a backup with the username, name, password in a CVS format


Just one domain, or many?



how could i re-poblate the mysql directly?
insert values(xxx,hash(xxx),xx,xx) into 'aduanett.hn 
'.vpopmail or crypt?


This may be the easiest method available.  You will have to write a 
Perl, php or whatever program to populate the database.  The password 
hash method depends on your ./configure options.  It is pretty easy 
unless you have to track down hashed directories.




Another way is to save the mail and re-create the mail accounts...  If 
you have hashed directories, it is unlikely that the same accounts will 
end up in the same hash directories, so this will not work.




Stop mail delivery //   The mail store will be inconsistent during 
this process, and it is already broken.


Backup the mail store to disk or tape, so you have a place to fallback 
to if this process fails.


cd ~vpopmail/domains//   Move to the domain storage directory

mv targetdomain.com targetdomain.com.old   //  save the mail

vdeldomain targetdomain.com//  clean out all records of domain

vadddomain targetdomain.com//  recreate a new empty domain

vadduser - all users from your list  //  restore the users

compare the structure of targetdomain.com and targetdomain.com.old

if it exists in targetdomain.com but not targetdomain.com.old you may 
want to delete the user, or find out why it is missing.


if it exists in targetdomain.com.old but not in targetdomain.com you may 
need to vadduser it.



Once you have reconciled the domain directories:

rm -r targetdomain.com//   Delete the new directory tree

mv targetdomain.com.old targetdomain.com   //   put the old mail back

repeat the steps after "cd ~vpopmail/domains" for each affected domain

restart mail delivery.





Re: [vchkpw] vpopmail and mysql

2007-10-01 Thread Carlos Collart
On 10/1/07, Rick Widmer <[EMAIL PROTECTED]> wrote:
>
> Carlos Collart wrote:
> > I am the dumbest person alive, and in charge of a vpopmail server,
> > I manage to drop database vpopmail

Not good...  Before you do anything else it might be wise to stop qmail,
> and all qmail-smtp processes then back up the mail store.


Donne...

> the system was a production one, under the domain xx_at_aduanett_dot_hn
> > I have a backup with the username, gecos ,cleartext password in a CVS
> format
>
> Just one domain, or many?

 2 domains (aduanett_dot_hn and fenaduanah_dot_hn)
defaultdomain= aduanett_dot_hn
and users in the other domain login
username_at_fenaduanah_dot_hn

>
>
> > how could i re-poblate the mysql directly?
> > insert values(xxx,hash(xxx),xx,xx) into 'aduanett.hn
> > '.vpopmail or crypt?
>
> This may be the easiest method available.  You will have to write a
> Perl, php or whatever program to populate the database.  The password
> hash method depends on your ./configure options.  It is pretty easy
> unless you have to track down hashed directories.


i am currently building a sql insert script using openoffice calc
insert into aduanett_hn
values('postmaster',md5('passw0rd'),89,89,'Postmaster','/home/vpopmail/domains/aduanett.hn/postmaster','','passw0rd')

but qmail fail to authenticate maybe md5('passwr0rd') need tweaks


Another way is to save the mail and re-create the mail accounts...  If
> you have hashed directories, it is unlikely that the same accounts will
> end up in the same hash directories, so this will not work.
>
>
>
> Stop mail delivery //   The mail store will be inconsistent during
> this process, and it is already broken.
>
> Backup the mail store to disk or tape, so you have a place to fallback
> to if this process fails.


i am doing this thru sFTP to another Server just in case (slow process btw)

cd ~vpopmail/domains//   Move to the domain storage directory
>
> mv targetdomain.com targetdomain.com.old   //  save the mail
>
> vdeldomain targetdomain.com//  clean out all records of domain
>
> vadddomain targetdomain.com//  recreate a new empty domain
>
> vadduser - all users from your list  //  restore the users
>
> compare the structure of targetdomain.com and targetdomain.com.old
>
> if it exists in targetdomain.com but not targetdomain.com.old you may
> want to delete the user, or find out why it is missing.
>
> if it exists in targetdomain.com.old but not in targetdomain.com you may
> need to vadduser it.
>
>
> Once you have reconciled the domain directories:
>
> rm -r targetdomain.com//   Delete the new directory tree
>
> mv targetdomain.com.old targetdomain.com   //   put the old mail back
>
> repeat the steps after "cd ~vpopmail/domains" for each affected domain
>
> restart mail delivery.
>
>
>
>


-- 
atte.
[EMAIL PROTECTED]
http://www.danasoft.com/sig/CarlosCollart.jpg


Re: [vchkpw] vpopmail and mysql

2007-10-01 Thread Quey

Rick Widmer wrote:

Carlos Collart wrote:

I am the dumbest person alive, and in charge of a vpopmail server,
I manage to drop database vpopmail


Not good...  Before you do anything else it might be wise to stop 
qmail, and all qmail-smtp processes then back up the mail store.



the system was a production one, under the domain xx_at_aduanett_dot_hn
I have a backup with the username, name, password in a CVS format


Just one domain, or many?



how could i re-poblate the mysql directly?
insert values(xxx,hash(xxx),xx,xx) into 'aduanett.hn 
'.vpopmail or crypt?


This may be the easiest method available.  You will have to write a 
Perl, php or whatever program to populate the database.  The password 
hash method depends on your ./configure options.  It is pretty easy 
unless you have to track down hashed directories.





He could use mysql itself, depending on making sure the fields are in 
the right order, and one user per line


mysql, use database vpopmail, then :
LOAD DATA INFILE '/path/to/FILENAME.CSV' INTO TABLE vpopmail FIELDS 
TERMINATED BY ',' LINES TERMINATED BY '\n';





Re: [vchkpw] vpopmail and mysql

2007-10-01 Thread Carlos Collart
the CSV only contain username,gecos, and clear text password.

i need to build the
pw_passwd

On 10/1/07, Quey <[EMAIL PROTECTED]> wrote:
>
> Rick Widmer wrote:
> > Carlos Collart wrote:
> >> I am the dumbest person alive, and in charge of a vpopmail server,
> >> I manage to drop database vpopmail
> >
> > Not good...  Before you do anything else it might be wise to stop
> > qmail, and all qmail-smtp processes then back up the mail store.
> >
> >> the system was a production one, under the domain xx_at_aduanett_dot_hn
> >> I have a backup with the username, name, password in a CVS format
> >
> > Just one domain, or many?
> >
> >
> >> how could i re-poblate the mysql directly?
> >> insert values(xxx,hash(xxx),xx,xx) into 'aduanett.hn
> >> '.vpopmail or crypt?
> >
> > This may be the easiest method available.  You will have to write a
> > Perl, php or whatever program to populate the database.  The password
> > hash method depends on your ./configure options.  It is pretty easy
> > unless you have to track down hashed directories.
> >
> >
>
> He could use mysql itself, depending on making sure the fields are in
> the right order, and one user per line
>
> mysql, use database vpopmail, then :
> LOAD DATA INFILE '/path/to/FILENAME.CSV' INTO TABLE vpopmail FIELDS
> TERMINATED BY ',' LINES TERMINATED BY '\n';
>
>
>


-- 
atte.
[EMAIL PROTECTED]
http://www.danasoft.com/sig/CarlosCollart.jpg


Re: [vchkpw] vpopmail and mysql

2007-10-01 Thread Quey

Carlos Collart wrote:

the CSV only contain username,gecos, and clear text password.

i need to build the pw_passwd 





I hope you don't have many users :)

Invest in a little time now running a mysqldump, attached is what I run  
*hourly*
just replace the hostnames, database names and password and whatever 
else thats mine with yours, and make sure the perms are 700 since you 
need to include the mysql root pass in it (assuming your roots mysql 
pass is set)

It uses sys::syslog and mail::sendmail perl mods as well for notification

Cheers


On 10/1/07, *Quey* <[EMAIL PROTECTED] 
> wrote:


Rick Widmer wrote:
> Carlos Collart wrote:
>> I am the dumbest person alive, and in charge of a vpopmail server,
>> I manage to drop database vpopmail
>
> Not good...  Before you do anything else it might be wise to stop
> qmail, and all qmail-smtp processes then back up the mail store.
>
>> the system was a production one, under the domain
xx_at_aduanett_dot_hn
>> I have a backup with the username, name, password in a CVS format
>
> Just one domain, or many?
>
>
>> how could i re-poblate the mysql directly?
>> insert values(xxx,hash(xxx),xx,xx) into 'aduanett.hn

>> < http://aduanett.hn>'.vpopmail or crypt?
>
> This may be the easiest method available.  You will have to write a
> Perl, php or whatever program to populate the database.  The
password
> hash method depends on your ./configure options.  It is pretty easy
> unless you have to track down hashed directories.
>
>

He could use mysql itself, depending on making sure the fields are in
the right order, and one user per line

mysql, use database vpopmail, then :
LOAD DATA INFILE '/path/to/FILENAME.CSV' INTO TABLE vpopmail FIELDS
TERMINATED BY ',' LINES TERMINATED BY '\n';





--
atte.
[EMAIL PROTECTED] 
http://www.danasoft.com/sig/CarlosCollart.jpg 
 
#!/usr/bin/perl -w
use Sys::Syslog;
use Mail::Sendmail;
$HRFILE = `date +'%u.%H'`;
chomp($HRFILE);

$SIG{ALRM} = \&Timeout;
sub Timeout {
&DTBFail(RetryTimeOut);
kill('HUP', -$$);
`rm -f "/var/tmp/.sqlhr"`;
exit(1);
}

if (-e "/var/tmp/.sqlhr") {
&DTBFail(LCK);
print "waiting for sql lockfile to go away...\n";
alarm(1800);
sleep 60 until !-e "/var/tmp/.sqlhr";
};

`touch "/var/tmp/.sqlhr"`;

alarm(600);

#backup locally
system("/usr/bin/mysqldump -u root -pPASSWORD --databases vpopmail squirrelmail 
squirrelmail_calendar > /backups/vpopmail/SQL/$HRFILE.vpopmail_dbase.fox.sql") 
== 0 or die &DTBFail("sqldmp"); 

#send copy of backup to another machine
system("/usr/local/bin/scp -p /backups/sql/fox/$HRFILE.vpopmail_dbase.fox.sql 
colt:/opt/fox-sql");

alarm(0);


`rm -f "/var/tmp/.sqlhr"`;

sub DTBFail {
  my ($dfail) = @_;
$FDMSG = qq[
Hourly backup of DB files has failed to complete.
Error report says: $dfail
];

%mailnu = ( To  => '[EMAIL PROTECTED]',
From=> '[EMAIL PROTECTED]',
Subject => 'SQL DB Hourly Backup Failure',
Message => $FDMSG
);

sendmail(%mailnu);
syslog("info", "DB Hourly Backups FAILED - $dfail");
};


Re: [vchkpw] vpopmail and mysql

2007-10-01 Thread Quey

Que wrote:

oh crap! I'm glad you started this thread, i've just noticed the scp 
section to another machine is going to an old location LOL


/slaps himself silly and fixes it fast... must been like that for a 
couple weeks /ducks




Carlos Collart wrote:

the CSV only contain username,gecos, and clear text password.

i need to build the pw_passwd 
 





I hope you don't have many users :)

Invest in a little time now running a mysqldump, attached is what I 
run  *hourly*
just replace the hostnames, database names and password and whatever 
else thats mine with yours, and make sure the perms are 700 since you 
need to include the mysql root pass in it (assuming your roots mysql 
pass is set)

It uses sys::syslog and mail::sendmail perl mods as well for notification

Cheers


On 10/1/07, *Quey* <[EMAIL PROTECTED] 
> wrote:


Rick Widmer wrote:
> Carlos Collart wrote:
>> I am the dumbest person alive, and in charge of a vpopmail 
server,

>> I manage to drop database vpopmail
>
> Not good...  Before you do anything else it might be wise to stop
> qmail, and all qmail-smtp processes then back up the mail store.
>
>> the system was a production one, under the domain
xx_at_aduanett_dot_hn
>> I have a backup with the username, name, password in a CVS format
>
> Just one domain, or many?
>
>
>> how could i re-poblate the mysql directly?
>> insert values(xxx,hash(xxx),xx,xx) into 'aduanett.hn

>> < http://aduanett.hn>'.vpopmail or crypt?
>
> This may be the easiest method available.  You will have to 
write a

> Perl, php or whatever program to populate the database.  The
password
> hash method depends on your ./configure options.  It is pretty 
easy

> unless you have to track down hashed directories.
>
>

He could use mysql itself, depending on making sure the fields 
are in

the right order, and one user per line

mysql, use database vpopmail, then :
LOAD DATA INFILE '/path/to/FILENAME.CSV' INTO TABLE vpopmail FIELDS
TERMINATED BY ',' LINES TERMINATED BY '\n';





--
atte.
[EMAIL PROTECTED] 
http://www.danasoft.com/sig/CarlosCollart.jpg 
 


Re: [vchkpw] vpopmail and mysql

2007-10-01 Thread Carlos Collart
i will swap directories 1at time with a bash scritp


#!/bin/bash
echo mv $1 $1temp # temporal rename of the folder
mv $1 $1temp
echo ../../bin/vadduser -c \" $2 \" $1 $3  # creation of the username inside
mysql
../../bin/vadduser -c \" $2 \" $1 $3
echo mv $1temp $1 # restoration of the mails
mv $1temp $1



usage:
./scritp.sh usernamexx "greco comment" password

for each line in the csv file



On 10/1/07, Carlos Collart <[EMAIL PROTECTED]> wrote:
>
> the CSV only contain username,gecos, and clear text password.
>
> i need to build the 
> pw_passwd
>
> On 10/1/07, Quey <[EMAIL PROTECTED]> wrote:
> >
> > Rick Widmer wrote:
> > > Carlos Collart wrote:
> > >> I am the dumbest person alive, and in charge of a vpopmail server,
> > >> I manage to drop database vpopmail
> > >
> > > Not good...  Before you do anything else it might be wise to stop
> > > qmail, and all qmail-smtp processes then back up the mail store.
> > >
> > >> the system was a production one, under the domain
> > xx_at_aduanett_dot_hn
> > >> I have a backup with the username, name, password in a CVS format
> > >
> > > Just one domain, or many?
> > >
> > >
> > >> how could i re-poblate the mysql directly?
> > >> insert values(xxx,hash(xxx),xx,xx) into 'aduanett.hn
> > >> < http://aduanett.hn>'.vpopmail or crypt?
> > >
> > > This may be the easiest method available.  You will have to write a
> > > Perl, php or whatever program to populate the database.  The password
> > > hash method depends on your ./configure options.  It is pretty easy
> > > unless you have to track down hashed directories.
> > >
> > >
> >
> > He could use mysql itself, depending on making sure the fields are in
> > the right order, and one user per line
> >
> > mysql, use database vpopmail, then :
> > LOAD DATA INFILE '/path/to/FILENAME.CSV' INTO TABLE vpopmail FIELDS
> > TERMINATED BY ',' LINES TERMINATED BY '\n';
> >
> >
> >
>
>
> --
> atte.
> [EMAIL PROTECTED]
> http://www.danasoft.com/sig/CarlosCollart.jpg
>



-- 
atte.
[EMAIL PROTECTED]
http://www.danasoft.com/sig/CarlosCollart.jpg


Re: [vchkpw] vpopmail user/group

2007-10-01 Thread John Simpson

On 2007-09-30, at 1622, aledr wrote:


I need to build vpopmail as non-root user and used
"--enable-non-root-build" but I got this message:

"checking for valid vpopmail user and group... yes
checking whether password file entry for the vpopmail user exists...
No vpopmail user found.
Please add the vchkpw group and
vpopmail user. Then run configure again
no
configure: error: Could not compile and run even a trivial ANSI C
program - check CC."

So, is there a way to do not check the vpopmail user and group at  
build time?


fix the "Could not compile and run even a trivial ANSI C program -  
check CC" issue.


that will probably allow it to compile the test program which looks  
for the vpopmail user and vchkpw group.



| 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