Re: [vchkpw] Aliases

2004-06-06 Thread chris . houtomo
at the moment I have
a console built in
php that talks to
vpopmail directly. I
am trying to figure
out what I need to
do if I were to
create aliases for
the pop accounts
that I have created
because I don't
think there is a
straight forward
command like
vadduser. Do you
have any ideas? I
have also found a
function in php
vpopmail_add_user_alias().
Have you ever used
this before?

Regards

 


[EMAIL PROTECTED]
wrote:
 
  How do I
manage/create
aliases for an email
account created with
vpopmail? Please
  Help
 
 You can do it the
easy way, or the
hard way...
 
 
 The easy way: 
(Requires a web
server on the mail
server machine.)
 

http://sourceforge.net/projects/qmailadmin/
 
 
 The hard way:
 
 Create .qmail
files in the domain
directory of the
domain where you
 want the alias. 
There many
possibilities for
the .qmail files, so
if
 you want to go
this way, please be
more specific about
what you want the
 alias to do.  It
usually works best
if you give specific
examples.
 
 
 
 





Re: [vchkpw] Strange Error

2004-06-06 Thread François Wautier
Hi,

Duly noting the near absolute lack of interest in my previous email (Only 
Devendra Singh  responded indicating he had the same problem),  I decided to 
go and figure out things my way.

At first, I wrote a small script that would look for the Delivered-To line 
emails found in the catch-all account and would redirect them 
appropriately.

But that was too much of a hack, so I did look at the problem itself.

And now, the end is near and so I face the final problem. My Friends, I'll say 
it clear, I'll state my case, I'm almost certain. I've looked the source in 
full, I've followed each and every pathway. But more, I found the bug and 
killed it my way.

In vmysql.c, the function vauth_open_update works like this

If (NOT OK(Connect to given Host/Database) {
   If( OK (Connect to given Host)
Create the Database;
} else Complain
   } else Use it.

The initial test is done using the 
mysql_real_connect function

When given both a Host and a Database (+ user name, password and so on) It 
sometimes fails. The reason stated being Lost connection to MySQL server 
during query. The subsequent connect, without a DB name, succeeding, the 
system tries to create the (already existing) database... and it's all 
downhill from there.

The change I made was to to change the logic to

If(Not OK(Connect to given host)
Complain and return

If(Not OK (Select given Database)
Created it and select it

Use it.


And, in my case at leat, it solved the problem.

I do not know why the problem occurred with the apparently correct original 
code, all I can say is that I now longer have the problem I described before.

I attache a patch in case someone is foolhardy enough to try it.


Cheers,
François

 Hi,

 I am new to this list.

 I recently installed on a Gentoo linux

   qmail  1.03 (r13)
   vpopmail 5.4.0
   maildrop 1.5.3
   qmail-scanner 1.16  ( With some modifs)


 Everything was working well until today.

 Today, I took my local domain and made it a virtual domain on my hosts.

 Things are mostly working, but every now and then I get the following error
 message

 @400040b3436602b4f094 delivery 2035: success:
 vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/vmy
sql:_sql_error[3]:
 _No_Database_Selected/could_not_create_limits_table_CREATE_TABLE_limits_(_d
  The whole SQL query..
 _No_Database_Selected/user_does_not_exist,but_will_deliver_to_/var/vpopmail
/domains/mydomain/mycatchall/


 Because I have a catchall account, the emails get delivered there instead
 of the correct mailbox. I can see that the Delivered-To header is set to
 the correct user.   I can't seem to find a pattern in the occurrence of the
 problem  The only thing is that I get the feeling it is related to the use
 of aliases  ( .qmaol-myalias)  but I am not sure.

 Has anyone experienced the same problem? Has anyone found a solution?

 Thanks
   François Wautier
diff -ru vpopmail-5.4.0/vmysql.c vpopmail-5.4.0-fw1/vmysql.c
--- vpopmail-5.4.0/vmysql.c	2004-01-14 06:56:41.0 +0700
+++ vpopmail-5.4.0-fw1/vmysql.c	2004-06-06 16:10:54.848660760 +0700
@@ -203,41 +203,36 @@
 mysql_init(mysql_update);
 mysql_options(mysql_update, MYSQL_OPT_CONNECT_TIMEOUT, (char *)timeout);
 
-/* Try to connect to the mysql update server with the specified database. */
+/* Try to connect to the mysql update server */
 if (!(mysql_real_connect(mysql_update, MYSQL_UPDATE_SERVER,
-MYSQL_UPDATE_USER, MYSQL_UPDATE_PASSWD,
-MYSQL_UPDATE_DATABASE, MYSQL_UPDATE_PORT, NULL, 0))) {
-
-/* Could not connect to the update mysql server with the database
- * so try to connect with no database specified
- */
-if (!(mysql_real_connect(mysql_update, MYSQL_UPDATE_SERVER,
-MYSQL_UPDATE_USER, MYSQL_UPDATE_PASSWD, NULL, MYSQL_UPDATE_PORT,
-NULL, 0))) {
-
-/* if we can not connect, report a error and return */
-verrori = VA_NO_AUTH_CONNECTION;
-return(VA_NO_AUTH_CONNECTION);
-}
-
-/* we were able to connect, so create the database */ 
-snprintf( SqlBufUpdate, SQL_BUF_SIZE, 
-create database %s, MYSQL_UPDATE_DATABASE );
-if (mysql_query(mysql_update,SqlBufUpdate)) {
-
-/* we could not create the database
- * so report the error and return 
- */
-fprintf(stderr, vmysql: sql error[1]: %s\n, mysql_error(mysql_update));
-return(-1);
-} 
-
-/* set the database */ 
-if (mysql_select_db(mysql_update, MYSQL_UPDATE_DATABASE)) {
-fprintf(stderr, could not enter %s database\n, MYSQL_UPDATE_DATABASE);
-return(-1);
-}
+			 MYSQL_UPDATE_USER, MYSQL_UPDATE_PASSWD, NULL, 

RE: [vchkpw] vpopmail installation on a Client MySQL Server

2004-06-06 Thread Kirti S. Bajwa
Hello:

Yesterday, I posted this message  many people responded. I was following
document http://www.pipeline.com.au/staff/isp/webmail-server.htm;. 


When I tried to add a domain I will get an error:

/home/vpopmail/bin/vadddomain: error while loading shared libraries:
libmysqlclient.so.12: cannot open shared object file: no such file or
directory

Several people on this list responded. That made me thinking. Finally, I
figured it out:

During the build of vpopmail, include full path to the directory, as
follows:

./configure \
(several options)
--enable-incdir=/usr/local/mysql/include/mysql 
--enable-libdir=/usr/local/mysql/lib/mysql 


This did the trick. This post is for future information.

Kirti


[vchkpw] Vpopmail MySQL

2004-06-06 Thread Kirti S. Bajwa
Hello:

I had posted a similar question couple of days ago. I have done quite a bit
research  actual installation and would like to post the following question
for somebody's help and/or recommendation:

I have setup a MAIL server with RH9, qmail, mysql, vpopmail, etc. I have
tested vpopmail by adding a domain  it works. I also have setup a DATA
server with RH9  Master MySQL. My goal is to keep all MySQL data on the
DATA server. MAIL server  RADIUS servers go to the DATA server for MySQL
records. Latency is not a problem because all these servers are connected on
a private (192.168.237.X) network.

After I tested the MAIL server, I tried for it to create a domain on DATA
server vpopmail database. On the MAIL server I changed the
/home/vpopmail/etc/vpopmail.mysql from:

localhost|0|vpopmailuser|vpoppasswd|vpopmail  -to-
192.167.237.16|0|vpopmailuser|vpoppasswd|vpopmail 

where 192.167.237.16 is the IP address of the DATA server. I also have tried
various other techniques but nothing seem to work. When I try adding a
domain, I get error message:

vmysql: sql error[c]: MYSQL server has gone away
(and slew of other similar error messages)

Therefore, my question is:

(1) Has anybody tried setting up vpopmail with MySQL backend data being on
server (but on the same LAN/network)?
(2) Is it even possible?
(3) If not possible, how can I move the user data to the backend MySQL DATA
server so other servers (such as RADIUS for authentication) can use it?

I have spent about two weeks on this project. Your help is highly
appreciated.

Thanks in advance.

Kirti


Re: [vchkpw] Vpopmail MySQL

2004-06-06 Thread Jeremy Kitchen
On Sunday 06 June 2004 08:37 pm, Kirti S. Bajwa wrote:
 Hello:

 I had posted a similar question couple of days ago. I have done quite a bit
 research  actual installation and would like to post the following
 question for somebody's help and/or recommendation:

 I have setup a MAIL server with RH9, qmail, mysql, vpopmail, etc. I have
 tested vpopmail by adding a domain  it works. I also have setup a DATA
 server with RH9  Master MySQL. My goal is to keep all MySQL data on the
 DATA server. MAIL server  RADIUS servers go to the DATA server for MySQL
 records. Latency is not a problem because all these servers are connected
 on a private (192.168.237.X) network.

right, a relatively common configuration.  I've done multiple mysql-replicated 
setups (this isn't replication, but vpopmail is configured very similarly.

 After I tested the MAIL server, I tried for it to create a domain on DATA
 server vpopmail database. On the MAIL server I changed the
 /home/vpopmail/etc/vpopmail.mysql from:

 localhost|0|vpopmailuser|vpoppasswd|vpopmail  -to-
 192.167.237.16|0|vpopmailuser|vpoppasswd|vpopmail

ok.  make sure your mysql server is listening on TCP port 3306 (which is the 
default) and that you can connect to it from the 'MAIL' server.  Telnet 
should suffice.  Once you've determined you can connect to it, make sure you 
are able to perform operations on the database using the 'mysql' command line 
interface (from the MAIL server).

 where 192.167.237.16 is the IP address of the DATA server. I also have
 tried various other techniques but nothing seem to work. When I try adding
 a domain, I get error message:

various other techniques of doing what?  I don't see how this is difficult, to 
be honest.

 vmysql: sql error[c]: MYSQL server has gone away
 (and slew of other similar error messages)

and those other error messages are?

Usually 'mysql server has gone away' means that the password didn't work.

 Therefore, my question is:

 (1) Has anybody tried setting up vpopmail with MySQL backend data being on
 server (but on the same LAN/network)?

yes.

 (2) Is it even possible?

yes.

 (3) If not possible, how can I move the user data to the backend MySQL DATA
 server so other servers (such as RADIUS for authentication) can use it?

well, if it wasn't possible (which it is) you're asking how to do the 
impossible  I don't see how you could expect a solution to an impossible 
question :)


 I have spent about two weeks on this project. Your help is highly
 appreciated.

setting up vpopmail with mysql backend shouldn't take more than about 3 
minutes.

-Jeremy

-- 
Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc.
  [EMAIL PROTECTED] ++ www.inter7.com ++ 866.528.3530 ++ 847.492.0470 int'l
kitchen @ #qmail #gentoo on EFnet ++ scriptkitchen.com/qmail