RE: [vchkpw] Matt Simersons tcpserver-mysql patch how-to??

2003-09-24 Thread Jonathan Viney
 Add the -S switch to your qmail-smtpd script and restart the servers.
 
 You should now be running off the relay table in your database.
 
 cheers
 
 Shane
 

Hi,

Is it possible to use this patch in place of /etc/tcp.smtp.cdb for
permanently allowed hosts? I had a look a while back and noticed it
seemed to run on a timeout basis.

Also, does anyone have an example of the sql table structure needed?

Thanks,
Jonathan




Re: [vchkpw] vpopmail courierIMAP auth from MySQL

2003-09-24 Thread Jonathan Viney
Hi,

 Is it possible to get vpopmail  courierIMAP to auth from the same MySQL 
 database?

Yes, simply compile courier-imap with --with-authvchkpw to enable to
auth against vpopmail.

Cheers,
Jonathan




Re: [vchkpw] Matt Simersons tcpserver-mysql patch how-to??

2003-09-24 Thread Jonathan Viney
Hi,

 I just checked Matt's patch, and he indeed added that code. So it will
 work. You cannot set ENV-vars though!

Hi,

It must set RELAYCLIENT though I would have thought just had a quick
look at the code and yes:

!   if(usemysql) {
! if(flagdeny==2) {
!/* drop_db(); */
! } else if(!flagdeny) {
!env(RELAYCLIENT,);
! }
! flagdeny=0;
!   }

So if you wanted any other ENV variables set you could just add them
there under env(RELAYCLIENT,); . right?

Cheers,
Jonathan




Re: [vchkpw] vpopmail maildrop

2003-09-26 Thread Jonathan Viney
Hi,

On Sat, 2003-09-27 at 01:29, til wrote:
 Hi, 
 
 after fiddling around with my mailserver configuration, everything seems to 
 work now except for one thing. I'd like to Catch-All non existent accounts 
 to postmaster, so i tried to change the delivery instruction in .qmail / 
 .qmail-default to filter messages to postmaster. the problem is, that once i 
 change the delivery instructions, i catch ALL mail, even to other existing 
 accounts. anyone got a clue (although this may be a little offtopic on this 
 list) ? 

In your maildrop filter you could have something like...

# Get maildir to deliver to
VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
 
# If it wasn't a valid user... set user to postmaster
if ($RETURNCODE != 0)
{
EXT=postmaster
}

That would probably do what you are after.

Cheers,
Jonathan




[vchkpw] Valias and maildrop/vdelivermail, and valias bug?

2003-09-30 Thread Jonathan Viney
Hi,

I have been pondering this problem for a few days now and can't seem to
find a solution. I am trying to implement per user spam/virus prefs
using maildrop as the delivery agent. It is all working apart from two
problems, aliases ad catchall.

Maildrop script (partial):

VPOP=| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
# Get home directory to deliver to
VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]

# If it wasn't a valid user, deliver again with vdelivermail 
# in case it is an alias
if ($RETURNCODE != 0)
{
to $VPOP
}

The problem is that if I put 'to ! catchall' in the if statement it
will bounce for aliases (because vuserinfo doesn't check if the email is
an alias). I could run valias -s email but the valias exit code is
always 0 even if it is an invalid alias.

So, does anyone know how to make catchalls and aliases work nicely with
maildrop?

Also, I think I found a bug in valias (w/ MySQL). If I run the following
commands this is what I get:

[EMAIL PROTECTED]:~# /home/vpopmail/bin/valias -s cat.net
[EMAIL PROTECTED]:~# /home/vpopmail/bin/valias -i [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]:~# /home/vpopmail/bin/valias -i [EMAIL PROTECTED]
[EMAIL PROTECTED]
Error: alias [EMAIL PROTECTED] - [EMAIL PROTECTED] already exists.
[EMAIL PROTECTED]:~# /home/vpopmail/bin/valias -i [EMAIL PROTECTED]
[EMAIL PROTECTED]
Error: alias [EMAIL PROTECTED] - [EMAIL PROTECTED] already exists.
[EMAIL PROTECTED]:~# /home/vpopmail/bin/valias -s cat.net
[EMAIL PROTECTED] - [EMAIL PROTECTED]

valias won't let me add any more than 1 alias to the domain or so it
seems. The valias table shows:

mysql select * from valias;
+---+-++
| alias | domain  | valias_line|
+---+-++
| dog   | cat.net | [EMAIL PROTECTED] |
+---+-++


Is this a bug or am I missing something?

Cheers,
Jonathan




Re: [vchkpw] Valias and maildrop/vdelivermail, and valias bug?

2003-10-01 Thread Jonathan Viney
Hi,

 What if valias exited with -1 if it's an invalid alias?  I just changed  
 it to do so in the CVS repository, and it will be in 5.3.28.
 

Cheers, most appreciated :).

I am still wondering about the catchall stuff though. If I can check
valias as well then I could use something like:

VPOP=| ~vpopmail/bin/vdelivermail '' bounce-no-mailbox
VHOME=`~vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
if ($RETURNCODE != 0) {
VALIAS=`~vpopmail/bin/valias -s [EMAIL PROTECTED]
if ($RETURNCODE != 0) {
VDOMHOME=`~vpopmail/bin/vdominfo -d $HOST`
exception {
# this .catchall file could have the line 
# to ! catchall
include $VDOMHOME/.catchall
}
# if the .catchall file didn't exist then bounce with
# vdelivermail so msg includes bounce details
to $VPOP
}
}

I'll have a play around and try to get this working tomorrow.

This does seem odd to me though.., none of the maildrop scripts I have
seen seem to deal with aliases!

Thanks,

Jonathan





Re: [vchkpw] Re: How to Stop Spam

2003-10-01 Thread Jonathan Viney
Hi,

  This will allow any valid vpopmail user to use their email address and
  password as an SMTP login.
 
 However, the most popular qmail-smtpd-auth patch has CRAM-MD5 as one of 
 the auth methods and as far as I know vpopmail [at least in standard 
 installation, where all passwords are stored as encrypted] will not work 
 with this mode of authorization. Supposively one has to disable the CRAM-
 MD5 announcement in the patch source. If one doesn't do that, clients 
 that do have CRAM-MD5 as one of the AUTH methods [supposively for example 
 Pegasus], will try that by default and it will fail.
 
 Am I correct in the above assumption or has something changed?

Well, I hadn't thought of that but it is quite possibly correct.
Although, I just tried out Evolution with method set to CRAM-MD5 and was
able to auth with the SMTP-auth patch and vpopmail. But I don't know if
Evolution will fall back on plain or login if it fails MD5 I
wouldn't have thought so but you never know.

Anyone else been able to use CRAM-MD5 with vpopmail?

Cheers,
Jonathan




Re: [vchkpw] Vpopmail 5.3.28 released

2003-10-03 Thread Jonathan Viney
Hi,

On Sat, 2003-10-04 at 06:57, Tom Collins wrote:
 To the best of my knowledge, the only critical errors holding up
 astable release are as follows:

Great to see it moving to a stable release!

One thing I just noticed is that configure appears to run again when
running make. ie:

./configure
make

causes configure to be run twice is this intentional?

Cheers,
Jonathan




Re: [vchkpw] Vpopmail 5.3.28 released

2003-10-03 Thread Jonathan Viney
Hi,

   My guess is that it has to do with the date/timestamps on the various
   configure files.  It shouldn't be a problem, since configure is re-run
   with the same options.
 

This would appear to be right. Running touch ac* config* causes
configure to only be run once although there are still warnings:

cd .  automake --foreign Makefile
cd . \
   CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating Makefile
cd .  autoheader
WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
WARNING: and `config.h.top', to define templates for `config.h.in'
WARNING: is deprecated and discouraged.
 
WARNING: Using the third argument of `AC_DEFINE' and
WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
WARNING: `acconfig.h':
 
WARNING:   AC_DEFINE([NEED_MAIN], 1,
WARNING: [Define if a function `main' is needed.])
 
WARNING: More sophisticated templates can also be produced, see the
WARNING: documentation.

Cheers,
Jonathan




[vchkpw] Vadddomain should create limits entry in MySQL

2003-10-06 Thread Jonathan Viney
Hi,

I have just checked with 5.3.28 and when creating a new domain with
vadddomain, an entry is not added for the domain in the limits table.
This means that the vmoddomlimits command doesn't work and fails with
Failed to vget_limits.

I suggest that either a) an entry is created with the domain or b)
vmoddomlimits creates one if necessary.

Thanks,

Jonathan




Re: [vchkpw] Vadddomain should create limits entry in MySQL

2003-10-06 Thread Jonathan Viney
Hi,

This is easily fixed manually, just run 'INSERT INTO limits (domain)
VALUES ('example.net')' to create an entry and vmoddomlimits works fine.
It is just that this should be done automatically at some point.

 Failed to vget_limits.
 
 when i use vpopmail with enable-mysql-limits and try to read them via 
 vmoddomlimits.
 I also noticed that the mysql table limits has no entries when i add a 
 domain via e.g. qmailadmin.
 
 looks like a bug! :-)

Cheers,
Jonathan




Re: [vchkpw] Vpopmail + Apache

2004-01-25 Thread Jonathan Viney
X-Istence

Install seemed to have went ok so far, but I have one problem.  When I go
 to
make a virtual domain with vadddomain, I get the following error:

Failure while attempting to remove_line() the locals file
Error. Failed to add domain to assign file
Error: Could not update file

Sorry if this has already been addressed in a previous posting.  I just
joined this mailing list yesterday.  I will continue to look around and
 see
if I can find a solution that's been posted already.

JAM




 I have not seen that error before and would not know what is causing it.

 Are you root while doing these actions?

 X-Istence


I have had that error a number of times but I've never seen it documented
anywhere. Simply run 'touch /var/qmail/control/locals' to fix it. It
happens when the locals file doesn't exist, ususally because the install
of qmail didn't create it.

Let me know if that helps.

Thanks,
Jonathan
-- 
Jonathan Viney
Bluewire Solutions
Position: Partner, Systems Admin
Contact: 021 039 7515
Website: www.bluewire.net.nz
Email: [EMAIL PROTECTED]


RE: [vchkpw] Vpopmail + Apache

2004-01-25 Thread Jonathan Viney
 I have had that error a number of times but I've never seen it documented
 anywhere. Simply run 'touch /var/qmail/control/locals' to fix it. It
 happens when the locals file doesn't exist, ususally because the install
 of qmail didn't create it.



 As I mentioned to X-Istence, that's what I ended up doing and it resolved
 the problem.  You're right, I didn't really see anything documented
 either.

Tom, possibly something could be added to the docs somewhere, or
vadddomain could produce a more helpful error message.

Cheers,
Jonathan


Re: [vchkpw] XFS Problems

2004-05-07 Thread Jonathan Viney
On Fri, 2004-05-07 at 13:16 +0200, Alejandro Alfonso wrote:
 XFS don't seem to be the problem. Most of my mail servers
 works with XFS, over IDE, SCSI and even RAID by sofware.

I agree, I've been using XFS with vpopmail for a while now and haven't
had any problems.

Jonathan



[vchkpw] Generate password in MySQL

2004-04-26 Thread Jonathan Viney
Hi all,

Can someone tell me how I can generate a password which could be used in 
the pw_passwd field in MySQL?

If possible, I'd like MySQL to generate the password, can anyone give me 
some pointers?

Cheers,
Jonathan


Re: [vchkpw] Generate password in MySQL

2004-04-26 Thread Jonathan Viney
Thanks for the replies (Michael and David). Very helpful.

Cheers,
Jonathan
Michael Bowe wrote:

- Original Message - 
From: Jonathan Viney [EMAIL PROTECTED]

 

Hi all,

Can someone tell me how I can generate a password which could be used in 
the pw_passwd field in MySQL?

If possible, I'd like MySQL to generate the password, can anyone give me 
some pointers?
   

ASP and PHP examples are available via this link :
http://www.mail-archive.com/[EMAIL PROTECTED]/msg15037.html
Michael.