Re: [vchkpw] multimaildir in .qmail

2004-02-04 Thread Luca Morettoni
Tom Collins, il 03/02/2004 alle 07:48, mi scrisse...
 I'm pretty sure that vdelivermail is assuming the second line is an 
 address and not a Maildir since it doesn't contains the string 
 /Maildir/.  I'll look into updating vpopmail to do Maildir delivery 
 if the line starts with . or /.

this is a little patch for my 5.3.30 installation, it chech if is a
valid maildir name (start with a slash or a dot and end with a slash
too), I hope it could be applied to the 5.4.x revision (I try later)

Enjoy this patch:

--- vdelivermail.c.orig Mon Oct 20 20:59:57 2003
+++ vdelivermail.c  Wed Feb  4 09:44:43 2004
@@ -470,10 +470,11 @@
 return(0);
 }
 
-/* Contains /Maildir/ ? Then it must be a full or relative
- * path to a Maildir 
+/* Contains a Maildir delivery? Then it must be a full or relative
+ * path to a Maildir (must start with a dot or a slash and end with a slash)
+ * Patched by Luca Morettoni 
  */ 
-else if ( strstr(address, /Maildir/) != NULL ) {
+else if ((*address == '.' || *address == '/')  *(address+strlen(address)-1) == 
'/') {
 
 /* if the user has a quota set */
 if ( strncmp(quota, NOQUOTA, 2) != 0 ) {


-- 
Luca Morettoni [EMAIL PROTECTED] - http://morettoni.net
GPG keys avaiable at: http://morettoni.net/key
Key fingerprint: D69411BB/C329AED4592319826F12 3036B51E664FD69411BB
Current system: FreeBSD 5.2-CURRENT, up 3 days, 17 hrs, 51 mins, 2 secs


Re: [vchkpw] qmail-scanner replacement

2004-02-04 Thread Rick Macdougall
Eduardo M. Bragatto wrote:

Hi,

I would like to know if there's some program to replace 
qmail-scanner (I don't even need the anti-spam feature, I wanna just 
scan my messages with ClamAV). I have lots of mail servers and some of 
them are too large to run things written in perl. I'm looking for 
something made with real programming language, like C or C++.
Hi,

http://sourceforge.net/projects/clamdmail/

Haven't tried it myself but there you go.

Regards,

Rick



[vchkpw] Re: qmail-scanner replacement

2004-02-04 Thread Peter Palmreuther
Hello Eduardo,

On Wednesday, February 4, 2004 at 5:08:21 PM you wrote (at least in
part):

 I would like to know if there's some program to replace qmail-scanner
 (I don't even need the anti-spam feature, I wanna just scan my messages
 with ClamAV).

Yes.

http://freshmeat.net/projects/qscanq/
 - http://budney.homeunix.net:8080/users/budney/software/qscanq/
 
 I have lots of mail servers and some of them are too large
 to run things written in perl. I'm looking for something made with real
 programming language, like C or C++.

qscanq meets your requirements.
-- 
Best regards
Peter Palmreuther

Rave on darlin', rave on, I'll buy you clothes of rayon...



Re: [vchkpw] qmail-scanner replacement

2004-02-04 Thread Tom Collins
On Feb 4, 2004, at 9:08 AM, Rick Macdougall wrote:
Hi,

http://sourceforge.net/projects/clamdmail/

Haven't tried it myself but there you go.

Regards,

Rick
I don't recommend it.  It isn't stable, and has high memory 
requirements (it would sometimes lose large emails if I didn't crank up 
my softlimit).

I recommend qscanq (URL posted by Peter Palmreuther in another 
message).  I am curious about qmail-qfilter though...

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


[vchkpw] vpopmail auth issues with mysql

2004-02-04 Thread Hetrick, Greg C.
Hello all, I am having some Auth issue, currently running qmail+vpopmail+mysql.

[EMAIL PROTECTED] vpopmail]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK [EMAIL PROTECTED]
user [EMAIL PROTECTED]
+OK
pass XXX
-ERR unable to write pipe
Connection closed by foreign host.

I have checked other suggestions and removed the softlimit incase that was causing 
issues. 

the following is what was configured.
./configure --enable-mysql=y --enable-auth-logging=n --enable-mysql-logging=n 
--enable-logging=e --enable-valias=y --enable-passwd=n --enable-defaultquota=NOQUOTA 
--enable-roaming-users=y --enable-incdir=/usr/local/mysql/include 
--enable-libdir=/usr/local/mysql/lib
Any Ideas?
Thanks,
Greg


Greg Hetrick 
Unix Systems Administrator 
West Corporation - Interactive Division 
402-716-0507



[vchkpw] Re: qmail-scanner replacement

2004-02-04 Thread Peter Palmreuther
Hello Tom,

On Wednesday, February 4, 2004 at 6:29:58 PM you wrote (at least in
part):

 I am curious about qmail-qfilter though...

It's only a wrapper for you being able to use a arbitrary filter
program. You'd have to write one that extracts the mail first and
passes it parts to AV-scanner nevertheless when using qmail-qfilter.

All instructions in qmail-qfilter I've found point at least to shell
scripts as interim, surely a plus over loading Perl engine all the
time, but not the goal IMHO. qmail-qscan execs 'ripmime' (a C
written program as well) to extract messages and than invokes (for
performance: hopefully C written) AV-scanner. It finally passed the
message (when AV test returned negative) to qmail-queue (unless one
modified the config, as I did ;-) ).

IMHO this is (from PoV performance) not comparable with
qmail-qfilter or qmail-scanner. But if one does not need the full
power of qmail-scanner a good choice as it seems.
-- 
Best regards
Peter Palmreuther

There is no 'I' in 'team', yet there is an MVP.



Re: [vchkpw] what's wrong?

2004-02-04 Thread Alejandro Ortega Páez
El mar, 03-02-2004 a las 07:46, -0700, Tom Collins escribió: 
 On Feb 3, 2004, at 5:59 AM, Alejandro Ortega Páez wrote:
   I've just updated my vpopmail to new 5.4.0. I always install every 
  new version you release.
   But from 25.4.0-preX I have noticed authentication with cram-md5 
  passwords fails.
   I hoped that installing the fresh stable 5.4.0 all this issue would 
  leave apart, but it still continue.
 
 5.4.0 ChangeLog:
 
  Tom Collins
 IF USING SMTP AUTH PATCH TO QMAIL-SMTPD
 
* This release of vpopmail includes fixes for vchkpw that may break
  certain SMTP AUTH implementations.  If SMTP AUTH fails after
  installing vpopmail 5.4.x, you may need to use the
  qmail-smtpd-auth-0.4.2 patch included in the contrib directory.
 
* If you do switch to the 0.4.2 SMTP AUTH patch, you may need to 
 update
  your qmail-smtpd run file (the first parameter to qmail-smtpd should
  now be the path to vchkpw and not the hostname).
Oh, oh... thank you... indeed. 

I always update my vpopmail with so a complete safety, than I never read
README, CHANGELOG or more files like these.
Very sorry for this. 

Well, but... I have applied again auth patch and now it's impossible to
get that qmail remakes right. Errors and more errors are the only thing
I get. I used before this patch (and many others that it's used to be
usual to install), and I don't know whether qmail code is a mere mess of
patches now. 

So I'm not a programmer or a code hacker, I will have to resign myself
to use vpopmail 5.4.0pre2 version... Moreover there is a thing you said
that disappoints me: [...] the first parameter to qmail-smtpd should
now be the path to vchkpw and not the hostname. What's does it mean?
Must I write the run command this way: /var/qmail/bin/qmail-smtpd 
/home/vpopmail/bin/vchkpw myhost.com /bin/true 21?

I pledge your pardon for my every time more forgotten English. And of
course, I repeat my thanks, Tom.

Alejandro Ortega



RE: [vchkpw] qmail-scanner replacement

2004-02-04 Thread Tom Walsh
   I would like to know if there's some program to replace 
 qmail-scanner 
 (I don't even need the anti-spam feature, I wanna just scan 
 my messages 
 with ClamAV). I have lots of mail servers and some of them 
 are too large 
 to run things written in perl. I'm looking for something made 
 with real 
 programming language, like C or C++.
 
   
   Eduardo M. Bragatto.

As another alternative... Check out:

http://projects.gasperino.org/scrubber/

Threaded, daemonized, modular, scanning. (Linux only we think.)

We are looking this over right now... Very fast... But seems to be very
beta...

Tom Walsh
Network Administrator
http://www.ala.net/




Re: [vchkpw] what's wrong?

2004-02-04 Thread Erwin Hoffmann
Hi,

At 19:37 04.02.04 +0100, you wrote:
El mar, 03-02-2004 a las 07:46, -0700, Tom Collins escribió: 
 On Feb 3, 2004, at 5:59 AM, Alejandro Ortega Páez wrote:
   I've just updated my vpopmail to new 5.4.0. I always install every 
  new version you release.
   But from 25.4.0-preX I have noticed authentication with cram-md5 
  passwords fails.
   I hoped that installing the fresh stable 5.4.0 all this issue would 
  leave apart, but it still continue.
 
 5.4.0 ChangeLog:
 
  Tom Collins
 IF USING SMTP AUTH PATCH TO QMAIL-SMTPD
 
* This release of vpopmail includes fixes for vchkpw that may break
  certain SMTP AUTH implementations.  If SMTP AUTH fails after
  installing vpopmail 5.4.x, you may need to use the
  qmail-smtpd-auth-0.4.2 patch included in the contrib directory.
 
* If you do switch to the 0.4.2 SMTP AUTH patch, you may need to 
 update
  your qmail-smtpd run file (the first parameter to qmail-smtpd should
  now be the path to vchkpw and not the hostname).
Oh, oh... thank you... indeed. 

I always update my vpopmail with so a complete safety, than I never read
README, CHANGELOG or more files like these.
Very sorry for this. 

Well, but... I have applied again auth patch and now it's impossible to
get that qmail remakes right. Errors and more errors are the only thing
I get. I used before this patch (and many others that it's used to be
usual to install), and I don't know whether qmail code is a mere mess of
patches now. 

So I'm not a programmer or a code hacker, I will have to resign myself
to use vpopmail 5.4.0pre2 version... Moreover there is a thing you said
that disappoints me: [...] the first parameter to qmail-smtpd should
now be the path to vchkpw and not the hostname. What's does it mean?
Must I write the run command this way: /var/qmail/bin/qmail-smtpd 
/home/vpopmail/bin/vchkpw myhost.com /bin/true 21?

I pledge your pardon for my every time more forgotten English. And of
course, I repeat my thanks, Tom.

Alejandro, pls read:

http://www.fehcom.de/qmail/smtpauth.html

regards.
--eh.

Alejandro Ortega




Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/
Wiener Weg 8, 50858 Cologne | T: +49 221 484 4923 | F: ...24


Re: [vchkpw] what's wrong?

2004-02-04 Thread Alejandro Ortega Páez
El mié, 04-02-2004 a las 21:01, +, Erwin Hoffmann escribió:
 Hi,
 
Hi,
 
 Well, but... I have applied again auth patch and now it's impossible to
 get that qmail remakes right. Errors and more errors are the only thing
 I get. I used before this patch (and many others that it's used to be
 usual to install), and I don't know whether qmail code is a mere mess of
 patches now. 
 
 So I'm not a programmer or a code hacker, I will have to resign myself
 to use vpopmail 5.4.0pre2 version... Moreover there is a thing you said
 that disappoints me: [...] the first parameter to qmail-smtpd should
 now be the path to vchkpw and not the hostname. What's does it mean?
 Must I write the run command this way: /var/qmail/bin/qmail-smtpd 
 /home/vpopmail/bin/vchkpw myhost.com /bin/true 21?
 
 I pledge your pardon for my every time more forgotten English. And of
 course, I repeat my thanks, Tom.
 
 Alejandro, pls read:
 
 http://www.fehcom.de/qmail/smtpauth.html
 
 regards.
 --eh.

Good. So what? 

Alejandro Ortega.



Re: [vchkpw] what's wrong?

2004-02-04 Thread Tom Collins
On Feb 4, 2004, at 11:37 AM, Alejandro Ortega Páez wrote:
So I'm not a programmer or a code hacker, I will have to resign myself
to use vpopmail 5.4.0pre2 version... Moreover there is a thing you said
that disappoints me: [...] the first parameter to qmail-smtpd should
now be the path to vchkpw and not the hostname. What's does it mean?
Must I write the run command this way: /var/qmail/bin/qmail-smtpd
/home/vpopmail/bin/vchkpw myhost.com /bin/true 21?
No, just take 'myhost.com' out completely.

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


[vchkpw] Working on single Command

2004-02-04 Thread Matt Jarjoura
Hello Everyone,

My name is Matt Jarjoura and I've been using vpopmail at my company for 
over a year now and it works great.  Also, I have created a few 
in-house programs using the library.

Anyway, I wanted to get opinions and ideas for creating a unified 
command line tool for executing vpopmail commands.  Possibly in an 
attempt to move this to /usr/local/sbin on the admin's system in the 
future?!

Attached to this email is my starting point, let me know what you think.

Thanks,
Matt Jarjoura
/*
 * $Id$
 * Copyright (C) 2004 Matt Jarjoura. [EMAIL PROTECTED]
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 */

#include stdio.h
#include stdlib.h
#include unistd.h
#include string.h
#include pwd.h
#include sys/types.h
#include sys/stat.h
#include fcntl.h
#include signal.h
#include getopt.h

#include config.h
#include vpopmail.h
#include vauth.h

/* Version 5.3.8 */
#define OLD_VPOPMAIL

#define MAX_BUFF 256
//static int mode_flag = 0;

typedef unsigned char BOOL;
#define TRUE 1;
#define FALSE 0;

typedef struct _vpop_info
{
char User[MAX_BUFF];
char Domain[MAX_BUFF];
char Quota[MAX_BUFF];
BOOL Random;
} VpopInfo;

static VpopInfo info;

typedef struct _vpop_modes
{
char *mode;
unsigned char flag;
} VpopModes;

static VpopModes const modes[] = {
{change-password, 'p'},
{set-quota, 'q'},
{NULL, 0}
};

static struct option const long_options[] = {

/* Change Password Options */
{random,  no_argument, NULL,   'r'},

/* Change Quota Options */
{quota,   required_argument,   NULL,   'q'},

/* For Most Options */
{password,optional_argument,   NULL,   'p'},
{domain,  required_argument,   NULL,   'd'},
{user,required_argument,   NULL,   'u'},

/* Generic Options */
{help,no_argument, NULL,   '?'},
{version, no_argument, NULL,   'v'},
{NULL, 0, NULL, 0}
};


int change_user_quota(char *User, char *Domain, char *Quota);
int validate_domain(char *Domain);
int change_password(char *User, char *Domain, BOOL Random);
void dump_help(void);
void dump_version(void);

int main(int argc, char *argv[])
{
int c = 0;
int option_index = 0;
int retValue = 0;

if ( !(argc  1) )
{
dump_version();
dump_help();
return vexit(0);
}

do {
c = getopt_long (argc, argv, ?d:p:ru:v, long_options, option_index);

switch (c)
{
//fprintf(stdout, Changing Password.\n);
//return change_password(info.User, info.Domain, info.Random);
//break;

case 'd':
snprintf(info.Domain, MAX_BUFF, %s, optarg);
retValue = validate_domain(info.Domain);

if (retValue != 0)
vexit(retValue);

break;   

case 'u':
snprintf(info.User, MAX_BUFF, %s, optarg);
break;

case 'q':
snprintf(info.Quota, MAX_BUFF, %s, optarg);
break;

case 'r':
info.Random = TRUE;
break;

case 'v':
dump_version();
return vexit(0);
break;

default:
case '?':
dump_version();
dump_help();
return vexit(0);
break;
}
} while (c != -1);

return vexit(0);
}

int validate_domain(char *Domain)
{
if ( vget_assign(Domain, NULL, 0, NULL, NULL) == NULL ) 
{
fprintf(stderr, Error: %s\n, verror(VA_DOMAIN_DOES_NOT_EXIST));
return VA_DOMAIN_DOES_NOT_EXIST;
}

return 0;
}

int change_user_quota(char *User, char *Domain, char *Quota)
{
int ret;

if ((ret = vsetuserquota( User, Domain, Quota )) != VA_SUCCESS) 
{
printf(Error: %s\n, verror(ret));
return ret;
}

return 0;
}

int change_password(char *User, char *Domain, BOOL Random)
{
char Email[MAX_BUFF];
char Passwd[MAX_BUFF];
int i;

/* create email for 

Re: [vchkpw] qmail-scanner replacement

2004-02-04 Thread Ted Deppner
On Wed, Feb 04, 2004 at 10:29:58AM -0700, Tom Collins wrote:
 message).  I am curious about qmail-qfilter though...

It doesn't appear to allow filtering on envelope information.  Didn't
dig too far, but didn't see any examples of it, and the examples shown
didn't appear to have any hooks.

KLEZ was easily handled by simple envelope checks.

-- 
Ted Deppner
http://www.deppner.us/


Re: [vchkpw] load balance suggestions

2004-02-04 Thread Ted Deppner
On Wed, Feb 04, 2004 at 10:44:36AM -0800, Joe Boyce wrote:
 RM Hello guys I would like what would you suggest for load balance with
 RM vpopmail and mysql any suggestions on how to set it up?  I would also like
 RM to have Round robin with DNS etc.. 
 
 We are using Linux Virtual Server to accomplish this:

LVS is getting much easier to setup and maintain, but a simple round
robin dns system is also quite easy to put together for a perl coder[1].
None of the mail servers need any sort of LVS magic, and nothing about
mail is really CPU bound (other than AV), and mail systems nicely
distribute themselves when given the opportunity to.

[1] we use mon, a custom alert script, and djbdns' tinydns.  Very
lightweight and failover is seconds.

-- 
Ted Deppner
http://www.deppner.us/