[vchkpw] Merging maildrop and mailbot into vdelivermail

2003-07-29 Thread Gerald Villemure
- Original Message - 
From: spork [EMAIL PROTECTED]

 When the next devel cycle happens, I think it would be worthwhile to
look
 at turning vpopmail into a fully db-backed delivery agent.  Some goals
 that that would help accomplish are:

 -easy development of a web frontend in any language that can talk SQL
 -easy integration with other web products, such as squirrelmail
 -ability to use vpopmail with other MTAs
 -easy integration with many billing backends
 -more efficiency; instead of having to read upwards of five files for
 every delivery and executing as many programs, one db call and one
call
 to a filteing program.

 It seems to me that vdelivermail is very close to being able to do
this.

Hmmm interesting... vdelivermail could stop trying to use .qmail files
altogether and simply rely totaly on SQL.

One way to do this would be to merge maildrop's filtering laguage and
mailbot's autoresponder functionalty into vdelivermail.  Perhaps
something like a sub-module.

The point here is that vdelivermail would read ALL the settings from SQL
and take care of everything right down to dropping the mail in the
Maildir.

Well that would take care of our SETUID problems.

My 2 cents,
Gérald




[vchkpw] A new tools for vpopmail

2003-07-22 Thread Gerald Villemure
There is been some talk about getting qmailadmin to run with PHP and
other environments.

The problem is, how to you get a web server that is running as nobody
to run commands as vpopmail?  The answer has been to set qmailadmin
SETUID vpopmail.  The problem with that is. What if you want to develop
your own front-end in PHP for example?

One answer is to introduce a new command in the base distribution of
vpopmail which would run SETUID vpopmail which could then be called by
whatever front-end you care to design.

This means a tool like qmailadmin or at least of subset if it could be
easily created in mod_perl or mod_php or whatever.  Modules for many of
the webmail solutions out there would popup in no time.

Included is a mock man page for the new command to give you an idea of
what I am talking about.

Let me know what you all think.
Gérald
==
NAME
 vadm - user level vpopmail admin tool

SYNOPSIS
 vadm [options] command [command_args]

DESCRIPTION
 vadm is a tools to provide non interactive user level commands for
vpopmail.
 The binary is SETUID to vpopmail so any user on the system can use
it.
 This greatly simplifies the creating of a web front-end for
example.

OPTIONS
 -b, --base64
 The password is BASE64 encoded.  This is especially useful when
providing
 the password at the command line.

 -p PASS, --password=PASS
 Provide the authentication password for the execution of the
command.
 Its better to use the VADM_PASS environment variable if
possible.

 -u EMAIL_ADDRESS, --user=EMAIL_ADDRESS
 Provide the authentication user name for the execution of the
command.
 You can also set this in the VADM_USER environment variable.

COMMAND SUMMARY
 You must authenticate with a valid user/pass for any commands to be
executed.
 Some commands will only execute if the user/pass has admin rights
on the
domain in question.

 info
 This will output a coma delimited line of info about the user
trying to authenticate.
 If the supplied user/pass fails to authenticate then it exits
with a 1.

 list_users [DOMAIN] [OFFSET] [MAX]
 If DOMAIN is not supplied then assume the domain of the
authenticated user.
 OFFSET and MAX is to handle cases when the list of users is
quite large.
 If the authenticated user has admin rights to the domain then
this command
 will return a list of all users for that domain.  The list
output is one line per
 user with coma delimited info for every user.

 update USER SETTING
 USER is the email address of the account to be updated.
 SETTING is a coma delimited settings in a format similar to
that returned by
 the info command.
 If USER is equal to the authenticated user then the command is
accepted
 otherwise the authenticated user must have admin right to that
domain.

 password USER [-b] [NEW_PASSWORD]
 USER if the email address of the account to be updated.
 -b here indicated if the new pass is BASE64 encoded
 If [NEW_PASSWORD] is not supplied then read the new password
from the
 environment variable VADM_NEWPASS

 newacct USER [SETTING]
 The authenticated user must have admin rights on the domain to
execute
 this command.

 rmacct [-f] USER
 This will remove an account and if the [-f] if supplied it will
also delete all
 the users email. Some checking is done to make sure no forwards
pointing
 to this account.

 setfallback DOMAIN EMAIL
 This will set the fallback address for the domain.

 list_forwards [DOMAIN] [OFFSET] [MAX]
 newfwd USER EMAIL
 rmfwd USER

 etc.. I am sure there are a few more commands that would be
needed.

ENVIRONMENT VARIABLES
 It is recommended that the credentials of the user be set with
environment variable
 rather then at the commend line for security reasons.

 VADM_USER
 This variable specifies the email address of the user
requesting the execution
 of the command.

 VADM_PASS
 This variable specifies the password user requesting the
execution of the
 command.
 The password can be encoded in BASE64 if the -b is supplied.

 VADM_NEWPASS
 This variable hold the new password user requesting to change a
password.
 The password can be encoded in BASE64 if the -b is supplied.

DIAGNOSTICS
 Normally, exit status is 0 with output on STDOUT and 1 otherwise.

BUGS
 This tool does not exist yet.





Re: [vchkpw] Vpopmail + Mysql. Tables not created?

2002-09-25 Thread Gerald

The ./configure options for vpopmail are as follow..

./configure --enable-roaming-users=y --enable-logging=y \
--enable-defaultquota=150 --enable-ip-alias-domains=y \
--enable-mysql=y --enable-sqllibdir=/usr/local/lib/mysql/ \
--enable-sqlincdir=/usr/local/include/mysql/



- Original Message -
From: Clayton Weise [EMAIL PROTECTED]
To: Gerald [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, September 25, 2002 1:45 AM
Subject: RE: [vchkpw] Vpopmail + Mysql. Tables not created?


 Please paste your ./configure line for vpopmail.

 -Original Message-
 From: Gerald [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 24, 2002 10:32 AM
 To: [EMAIL PROTECTED]
 Subject: [vchkpw] Vpopmail + Mysql. Tables not created?


 Hi there
 I've compiled support for mysql in qmail and vpopmail. I've read
 README.mysql and went thru the guide at
 (http://matt.simerson.net/computing/qmail.toaster.shtml) However, when I
add
 a virtual domain, a mysql table wasn't created, and instead, a .cdb file
was
 produced. Why is that so?

 Programs which are installed on my system:
 qmail-1.03
 vpopmail-5.2.1
 mysql-server-3.23.52_1
 FreeBSD 4.7-RC

 Help would be greatly appreciated,
 Thanks

 Gerald






[vchkpw] Vpopmail + Mysql. Tables not created?

2002-09-24 Thread Gerald

Hi there
I've compiled support for mysql in qmail and vpopmail. I've read
README.mysql and went thru the guide at
(http://matt.simerson.net/computing/qmail.toaster.shtml) However, when I add
a virtual domain, a mysql table wasn't created, and instead, a .cdb file was
produced. Why is that so?

Programs which are installed on my system:
qmail-1.03
vpopmail-5.2.1
mysql-server-3.23.52_1
FreeBSD 4.7-RC

Help would be greatly appreciated,
Thanks

Gerald