[vchkpw] Change passwd howto

2004-05-30 Thread Patrick Donker
Guys,
I use qmail + vpopmail + courier-imapd + squirrelmail.
My question is; what would be the easiest way to inplement a
change-password option in Squirrel? I have found a plugin, but that is
based on pam, which I dont use. I need something that uses vchkpw. My
guess is that somebody on this list has solved this already before, so,
why not ask ;) ?
-Patrick


Re: [vchkpw] Change passwd howto

2004-05-30 Thread X-Istence
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Patrick Donker wrote:
 Guys,

 I use qmail + vpopmail + courier-imapd + squirrelmail.
 My question is; what would be the easiest way to inplement a
 change-password option in Squirrel? I have found a plugin, but that is
 based on pam, which I dont use. I need something that uses vchkpw. My
 guess is that somebody on this list has solved this already before, so,
 why not ask ;) ?

 -Patrick


There is no need to post your question to the list twice, i am pretty
sure we all read it, and even if we did not, then nobody knowns the answer.

The easiest way? Well that all depends on how your vpopmail is setup.

Do you use MySQL? cdb? PGSQL? These are all determining factors.

For all of them there are different way's that it could be done. For the
cdb based one it would be a bit harder, but i bet it could be done some
way. Check out the new php module/vpopmail deamon method and see if that
could be an option.

So far, all I know of is that plugin that uses PAM.

X-Istence
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAue8JJukONu5DUaQRAipzAJ993eUizQU+FTDiJhthr1wjx+oVugCgnDPw
Cy4e3bm3o62wLNvp/ZgO6wc=
=MJ8r
-END PGP SIGNATURE-


Re: [vchkpw] Change passwd howto

2004-05-30 Thread Rakesh Tiwari
I use MySQL as my backend.

I hacked squirrelmail to add a page that takes in the username ( from
session ) and
asks for the current password and new password. Then using SQL is check is
the current password matches. If so update the new passwords in the
database. else prompt him again.

Hope this helps.

Regards
Rakesh
- Original Message -
From: X-Istence [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, May 30, 2004 9:26 AM
Subject: Re: [vchkpw] Change passwd howto


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Patrick Donker wrote:
  Guys,
 
  I use qmail + vpopmail + courier-imapd + squirrelmail.
  My question is; what would be the easiest way to inplement a
  change-password option in Squirrel? I have found a plugin, but that is
  based on pam, which I dont use. I need something that uses vchkpw. My
  guess is that somebody on this list has solved this already before, so,
  why not ask ;) ?
 
  -Patrick
 

 There is no need to post your question to the list twice, i am pretty
 sure we all read it, and even if we did not, then nobody knowns the
answer.

 The easiest way? Well that all depends on how your vpopmail is setup.

 Do you use MySQL? cdb? PGSQL? These are all determining factors.

 For all of them there are different way's that it could be done. For the
 cdb based one it would be a bit harder, but i bet it could be done some
 way. Check out the new php module/vpopmail deamon method and see if that
 could be an option.

 So far, all I know of is that plugin that uses PAM.

 X-Istence
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.2.4 (FreeBSD)
 Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

 iD8DBQFAue8JJukONu5DUaQRAipzAJ993eUizQU+FTDiJhthr1wjx+oVugCgnDPw
 Cy4e3bm3o62wLNvp/ZgO6wc=
 =MJ8r
 -END PGP SIGNATURE-




[vchkpw] Quota is not working

2004-05-30 Thread Joao Rechena
Greetings,
I have several accounts on one domain, every one with quota and working 
fine, but I have this mailbox that the quota is not working, it stayed on 
the 48% of usage and the mail keeps increasing, the quota is 50MB and it 
already goes on the 100MB 

Did anyone had this problem before ? 

Thank you for your help. 

Vpopmail version 5.2.2 

--
Joao Rechena
mailto:[EMAIL PROTECTED]
http://ispower.org
=
Have no phear I is here 


Re: [vchkpw] IMAP login fails for default domain users

2004-05-30 Thread Tom Collins
On May 28, 2004, at 9:30 PM, Alan Murrell wrote:
All POP logins work great, but with IMAP, only the virtual domains (or
rather, any domain other than the 'default domain') are able to login
in; the 'default domain' fails on IMAP login, regardless of whether I
user the '@defaultdomain.tld' or not (Note: '@defaultdomain' is of
course, a place-holder for the actual domain I used)
It sounds like the vpopmail code in Courier-IMAP doesn't correctly 
handle default domains.  I know that Michael Bowe did a lot of work on 
that code recently -- are you using the latest release of Courier-IMAP? 
 I just took a look at 3.0.4, and it appears to do everything that it 
should -- the call to parse_email should set Domain to the default 
domain if there isn't an '@' in the email address.

At some point in the development cycle, we changed from a hard-coded 
default domain to one stored in an external file.  It looks like 
courier relies entirely on vpopmail code to set the default domain 
(which is a good thing), so it shouldn't be affected by our change.

If you're running MySQL, then I assume it isn't a permissions issue, 
since Courier wouldn't be able to read the vpopmail.mysql file.

If not, make sure that ~vpopmail/etc/defaultdomain is world-readable, 
that could be part of the problem.  Keep in mind that ~vpopmail/etc/ 
needs to be readable by the user that Courier-IMAP runs as.

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/


[vchkpw] Looking for patches

2004-05-30 Thread Bill Gradwohl
I noticed that vdeluser doesn't get rid of the .qmail files for a user if
there are any. Has anyone developed a patch to do this?

Does anyone have a patch to run a script or other executable when vadddomain
or vadduser successfully completes? What I'm after is to perform some post
processing every time a domain or user is created. 

Wrapping scripts around the native commands is of course easy enough to do,
but then the WEB based tools provided by vqadmin don't benefit. I'm assuming
that the web tools call the native executables to do the heavy lifting, but
I don't know that for certain as I haven't read the sources yet.

Is there a general place to check for patches? I checked the archives before
posting, but didn't see anything relevant. 

-- 
Bill Gradwohl
YCC
(817) 224-9400 x211
www.ycc.com 




Re: [vchkpw] Change passwd howto

2004-05-30 Thread Raboo Treed
You should mail your patch to this list and also squirrrelmail, it could 
be a usefull thing to have in the contrib dir

On 2004-05-30 17:17, Rakesh Tiwari wrote:
I use MySQL as my backend.
I hacked squirrelmail to add a page that takes in the username ( from
session ) and
asks for the current password and new password. Then using SQL is check is
the current password matches. If so update the new passwords in the
database. else prompt him again.
Hope this helps.
Regards
Rakesh
 




Re: [vchkpw] Change passwd howto

2004-05-30 Thread Patrick Donker




X-Istence wrote:

  -BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Patrick Donker wrote:
  
  
Guys,

I use qmail + vpopmail + courier-imapd + squirrelmail.
My question is; what would be the easiest way to inplement a
change-password option in Squirrel? I have found a plugin, but that is
based on pam, which I dont use. I need something that uses vchkpw. My
guess is that somebody on this list has solved this already before, so,
why not ask ;) ?

-Patrick


  
  
There is no need to post your question to the list twice, i am pretty
sure we all read it, and even if we did not, then nobody knowns the answer.

The easiest way? Well that all depends on how your vpopmail is setup.

Do you use MySQL? cdb? PGSQL? These are all determining factors.

For all of them there are different way's that it could be done. For the
cdb based one it would be a bit harder, but i bet it could be done some
way. Check out the new php module/vpopmail deamon method and see if that
could be an option.

So far, all I know of is that plugin that uses PAM.

X-Istence
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAue8JJukONu5DUaQRAipzAJ993eUizQU+FTDiJhthr1wjx+oVugCgnDPw
Cy4e3bm3o62wLNvp/ZgO6wc=
=MJ8r
-END PGP SIGNATURE-


  

Sorry for my double post, but I didnt see my first posting on the list,
so I thought something went wrong...my bad apparently...
Anyhow, I dont use any database backend, just plain old cdb. I did find
something, but for that I have to recompile imap again, so that will be
something for another day. If I got things working I'll post the
solution on this list.

-Patrick




[vchkpw] TMDA + vpopmail + qmail + squirrelmail (?)

2004-05-30 Thread Márcio Luciano Donada
Hello Group,
Somebody of the group uses TMDA + qmail + vpopmail + squirrelmail? It would
like to use plugin to carry through the possible changes in the TMDA that
the customer comes to want, but I am not obtaining, if somebody uses, can
give one help?
[ ]'s
Márcio



Re: [vchkpw] Looking for patches

2004-05-30 Thread Rick Widmer

Bill Gradwohl wrote:
I noticed that vdeluser doesn't get rid of the .qmail files for a user if
there are any. Has anyone developed a patch to do this?
What files were left behind, and where did they come from?

Is there a general place to check for patches? I checked the archives before
posting, but didn't see anything relevant. 
The contrib directory in the vpopmail distribution, and
  http://sourceforge.net/projects/vpopmail/
are good places to look, but I don't think you will find a solution to 
your problem in them.

Rick
Note to anyone with vpopmail patches...  The odds of seeing your patch 
make its way into the distribution is MUCH greater if you post it to 
SourceFORGE.



Re: [vchkpw] IMAP login fails for default domain users

2004-05-30 Thread Alan Murrell
Hi Tom,

On Sun, 2004-05-30 at 10:38, Tom Collins wrote:
 It sounds like the vpopmail code in Courier-IMAP doesn't correctly 
 handle default domains.  I know that Michael Bowe did a lot of work on 
 that code recently -- are you using the latest release of Courier-IMAP?

Not the latest, but version 3.0.4 .  This was copiled from source.  I
have setup the same version of courier from RPM using the SRPMS at
http://www.qmailtoaster.com, on a test box, and Courier-IMAP is
logging users in using the default domain.

 If you're running MySQL, then I assume it isn't a permissions issue, 
 since Courier wouldn't be able to read the vpopmail.mysql file.

I am running MySQL on the backend.  I think you are meaning that
Courier-IMAP does not read the 'vpopmail.mysql' file; is that correct? 
Regardless, I just made it world-readble, and tried logging in:

[EMAIL PROTECTED] root]# telnet localhost 143
trying 127.0.0.1...
connected to van-srv41 [127.0.0.1]
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION
STARTTLS] Courier-IMAP ready. Copyright 1998-2004 Double Precision,
Inc.  See COPYING for distribution information.
A01 LOGIN alan SeEeCcRrEeTt
A01 NO Login failed.
Connection closed by foreign host.

(I rather suspected that wouldn;t work, but it was worth a try).

 If not, make sure that ~vpopmail/etc/defaultdomain is world-readable, 
 that could be part of the problem.  Keep in mind that ~vpopmail/etc/ 
 needs to be readable by the user that Courier-IMAP runs as.

[EMAIL PROTECTED] root]# ls -l ~vpopmail/etc
total 36
-rw-r--r--1 vpopmail vchkpw 12 May 30 15:53 defaultdomain
-rw-r--r--1 root root   25 May 28 07:53 inc_deps
-rw-r--r--1 root root   77 May 28 07:53 lib_deps
-rw-r--r--1 vpopmail vchkpw 26 May 28 07:48 tcp.smtp
-rw-r--r--1 vpopmail vchkpw  10580 May 30 15:41 tcp.smtp.cdb
-rw-r--r--1 vpopmail vchkpw   1107 May 28 07:53 vlimits.default
-rw-r--r--1 vpopmail vchkpw 42 May 28 07:38 vpopmail.mysql

I am suspecting there is something (unrelated) to this server, because I
have also tried recompiling Courier-IMAP, but it gets to a certain point
then hangs during the configure stage (and it takes a couple minutes to
get the full login prompt). This obviously is not your issue, but it's
just odd.

Anyway, any other ideas you may have would be greatly appreciated.

Sincerely,

Alan Murrell




Re: [vchkpw] TMDA + vpopmail + qmail + squirrelmail (?)

2004-05-30 Thread Alan Murrell
Hi Marcio,

On Sun, 2004-05-30 at 14:45, Márcio Luciano Donada wrote:
 Somebody of the group uses TMDA + qmail + vpopmail + squirrelmail? It would
 like to use plugin to carry through the possible changes in the TMDA that
 the customer comes to want, but I am not obtaining, if somebody uses, can
 give one help?

I recently got this setup with the help of someone on the TMDA list. I
am not sure if he is on this list, but I will post what he posted for me
on the TMDA list, and hope that he does not mind.  Full credit for this
setup goes to Carlos Averett (I will withold his email address for
privacy reasons)

In the 'tmdatools' Squirrelmail plugin:

= tmdatools_config.php =
 Added:
 // Cyt0plas - ok, let's do virtualhosting support here
 $uinfo = split ('@', $_SESSION['username']);
 $user = $uinfo[0]; $domain = $uinfo[1];

 Changed:
 $plugin_tmdatools_homedir = /home/vpopmail/domains/$domain;
 $plugin_tmdatools_editfiles[0][title] = Whitelist;
 $plugin_tmdatools_editfiles[0][fname] =
$plugin_tmdatools_homedir/$user/.tmda/lists/whitelist;

 $plugin_tmdatools_editfiles[1][title] = Blacklist;
 $plugin_tmdatools_editfiles[1][fname] =
$plugin_tmdatools_homedir/$user/.tmda/lists/blacklist;

 $plugin_tmdatools_editfiles[2][title] = Confirmed Senders;
 $plugin_tmdatools_editfiles[2][fname] =
$plugin_tmdatools_homedir/$user/.tmda/lists/confirmed;

 $plugin_tmdatools_editfiles[3][title] = TMDA User Config File;
 $plugin_tmdatools_editfiles[3][fname] =
$plugin_tmdatools_homedir/$user/.tmda/config;

 $plugin_tmdatools_editfiles[4][title] = TMDA Incoming Filter;
 $plugin_tmdatools_editfiles[4][fname] =
$plugin_tmdatools_homedir/$user/.tmda/filters/incoming;

 $plugin_tmdatools_editfiles[5][title] = TMDA Outgoing Filter;
 $plugin_tmdatools_editfiles[5][fname] =
$plugin_tmdatools_homedir/$user/.tmda/filters/outgoing;

 $plugin_tmdatools_editfiles[6][title] = Request Confirmation
Template;
 $plugin_tmdatools_editfiles[6][fname] =
$plugin_tmdatools_homedir/$user/.tmda/templates/confirm_request.txt;

 $plugin_tmdatools_editfiles[7][title] = Acceptance Confirmation
Template;
 $plugin_tmdatools_editfiles[7][fname] =
$plugin_tmdatools_homedir/$user/.tmda/templates/confirm_accept.txt;

 $plugin_tmdatools_editfiles[8][title] = Bounce Template;
 $plugin_tmdatools_editfiles[8][fname] =
$plugin_tmdatools_homedir/$user/.tmda/templates/bounce.txt;
= End tmdatools_config.php =

Note: I added [6], [7], and [8] to my own configuration to allow users
to custome those texts.

= Begin address.php =
Changed:
if ($tmdatools_submit)
{
  // Cyt0plas - Get user and domain
  $uinfo = split('@', $_SESSION['username']);
  $username = $uinfo[0]; $domain = $uinfo[1];

  $command = $plugin_tmdatools_tmdadir . bin/tmda-address;

  if (file_exists($command))
  {
$config = '/home/vpopmail/domains/' . $domain . '/' . $username .
'/.tmda/config';
$command .= ' -a ' . $username . '@' . $domain . ' -c ' . $config .
'
--'.$tmdatools_address.' '.$tmdatools_address_text;

$address = exec($command);

echo $address;
  }
  else
  {
echo _(File not found).': b'.$command.'/b';
  }
}
= End address.php =

= pending.php =
Added:
  // Cyt0plas - Get user and domain
  $uinfo = split('@', $_SESSION['username']);
  $username = $uinfo[0]; $domain = $uinfo[1];
  $config = '/home/vpopmail/domains/' . $domain . '/' . $username .
'/.tmda/config';

Changed:
Basically, I changed all occurences of
$tmdatools_pending = $plugin_tmdatools_tmdadir . bin/tmda-pending
to
$tmdatools_pending = $plugin_tmdatools_tmdadir . bin/tmda-pending -c
$config;
= End pending.php =

I hope this helps.

Sincerely,

Alan Murrell




RE: [vchkpw] Looking for patches

2004-05-30 Thread Bill Gradwohl
What files were left behind, and where did they come from?

I created a testuser for testdomain.com and noted that the user ended up in
/home/vpopmail/domains/testdomain.com/testuser as expected. 

I then manually created a .qmail-testuser file at the domain level
/home/vpopmail/domains/mydomain.com, and ran some tests and that .qmail file
did get used. I put it at the domain location instead of inside the users
directory because that's what a script I saw did.

Then I vdeluser deleted the testuser and the .qmail-testuser file was still
there. Maybe I've got the .qmail file in the wrong place. ??? 

Should a user specific .qmail file be inside the domain directory or inside
the users directory? 

If it's inside the users directory, then vdeluser will nuke it. If it has to
be at the domain level, then it would be nice for vdeluser to nuke it since
there isn't any other possible use for that file.

-- 
Bill Gradwohl
YCC
(817) 224-9400 x211
www.ycc.com 




Re: [vchkpw] Change passwd howto

2004-05-30 Thread X-Istence
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Patrick Donker wrote:
 Sorry for my double post, but I didnt see my first posting on the
 list, so I thought something went wrong...my bad apparently...
 Anyhow, I dont use any database backend, just plain old cdb. I did
 find something, but for that I have to recompile imap again, so that
 will be something for another day. If I got things working I'll post
 the solution on this list.
 -Patrick

That's okay.

For cdb there are these things you can do.

1) Wait till the PHP extensions fully work and the vpopmail deamon that
the PHP extensions use fully work

2) Set vpassword's setuid bit and have apache execute it as whatever
user apache runs under (NOTE: INSECURE, AND ALLOWS ANY USER TO CHANGE
ANY PASSWORD FOR ANY ACCOUNT UNDER ANY DOMAIN IN VPOPMAIL)

3) Write some wrapper around it, that first requires a username and
password thru some method and making sure there is no way that this
username and password can be found, and thus securely invoking vpasswd.

4) Using PAM authentication

5) Using MySQL/PGSQL instead of CDB.

X-Istence
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAup31JukONu5DUaQRAl3CAJ4+qxpee/thWeRMcMwILneks5xnEgCeMlrh
aLpZhhHly3GW+HCWjWSs3hk=
=DW52
-END PGP SIGNATURE-


Re: [vchkpw] Looking for patches

2004-05-30 Thread X-Istence
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bill Gradwohl wrote [At least in part]:
 snip

 Then I vdeluser deleted the testuser and the .qmail-testuser file was
still
 there. Maybe I've got the .qmail file in the wrong place. ???

Both locations work.

 Should a user specific .qmail file be inside the domain directory or
inside
 the users directory?

It doesn't seem to matter, but have always made it a point to place them
inside the users directory.


 If it's inside the users directory, then vdeluser will nuke it. If it
has to
 be at the domain level, then it would be nice for vdeluser to nuke it
since
 there isn't any other possible use for that file.


For a workaround i would just suggest placing them in the users
directory :).

X-Istence

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAup7pJukONu5DUaQRAigGAKCT6hbVhyylEfCjfyswF7NUnyTyowCcDKzo
wsgGO2dziWuC6twkMoPRQLc=
=/hY1
-END PGP SIGNATURE-


RE: [vchkpw] Looking for patches

2004-05-30 Thread Bill Gradwohl
Thanks for the information about where to put the .qmail files.


-- 
Bill Gradwohl
YCC
(817) 224-9400 x211
www.ycc.com 




Re: [vchkpw] IMAP login fails for default domain users

2004-05-30 Thread Alan Murrell
On Sun, 2004-05-30 at 10:38, Tom Collins wrote:
 It sounds like the vpopmail code in Courier-IMAP doesn't correctly 
 handle default domains.  I know that Michael Bowe did a lot of work on 
 that code recently -- are you using the latest release of Courier-IMAP? 
   I just took a look at 3.0.4, and it appears to do everything that it 
 should -- the call to parse_email should set Domain to the default 
 domain if there isn't an '@' in the email address.

Okay, here is what I now have installed (on a test box):

  Qmail 1.03
  Vpopmail 5.4.3
  Courier-IMAP 3.0.4

I have compiled Vpopmail and Courier-IMAP according to Michael Bowe's
guide at
http://www.pipeline.com.au/staff/mbowe/isp/webmail-server.htm, except
I added the '--enable-roaming-users' options for Vpopmail, and had to
add '--with-redhat', since I am compiling on a RH system; other than
that, all else is identical.

However, now *no* IMAP logins are able to occur, whenther from default
domain or all other domains.

 If not, make sure that ~vpopmail/etc/defaultdomain is world-readable,

It is.

 that could be part of the problem.  Keep in mind that ~vpopmail/etc/ 
 needs to be readable by the user that Courier-IMAP runs as.

~vpopmail/etc/ is owned by vpopmail:vchkpw, and has permissions of 755

Thank you, again, for your assistance in this matter.

Sincerely,

Alan Murrell