Re: [vchkpw] Back up and disastor recovery

2002-08-15 Thread Robin Bowes

Chris,

I've not got any experience of this so I may be missing something crucial
but I would say that all you really need to worry about is backing up your
/home/vpopmail directory. In the event of a disaster coming to pass,
simply restore that directory.

R.

Chris said:
> I have just complete a move to qmail/sqwebmail/vpopmail and love it!
> Now I just need some final steps here.  I understand back up and
> recovery for qmail but how do I go about backing up my virtual domains
> and restoring in case of disastor?  Sorry this is so vague, simple links
> to helpful docs are just fine!

-- 
Robin Bowes | http://robinbowes.com
"I can't keep lookin' at loneliness, and tryin' to call it freedom."





Re: [vchkpw] Sorry, no mailbox here by that name. (#5.1.1)

2002-08-20 Thread Robin Bowes


Ron Parker said:
> Linux 7.2
> vpopmail 5.2
> qmail 1.04
 

Do you know something I don't?

R.
-- 
Robin Bowes | http://robinbowes.com
"I can't keep lookin' at loneliness, and tryin' to call it freedom."





[vchkpw] Filtering with maildrop

2003-01-07 Thread Robin Bowes
Hi,

I'm currently using qmail-1.03 with vpopmail-5.3.9, courier-imap-1.6.0,
and squirrelmail-1.3.3 / Outlook 2000. I have downloaded maildrop-1.5.1,
built the rpm and installed it.

Can anyone with a working filtering setup using maildrop point me at any
resources that might help me get simple filtering setup? All I'm really
interested in at this stage is to automatically filter messages from
mailing lists into folders. I currently do this using squirrelmail's mail
filtering but this is getting pretty slow as it is client-side.

Cheers,

R.
-- 
Robin Bowes | http://robinbowes.com




Re: [vchkpw] vpopmail from an old to a new mailserver

2003-01-11 Thread Robin Bowes
Peter,

You'll need to make sure that you migrate your qmail settings too.

In /var/qmail/control/ check rcpthosts and virtualdomains.

Also, in /var/qmail/users check assign and make sure cdb is rebuilt (using
qmail-newu)

R.

web4.hm - Peter Padberg

> Hi!
> :)
>
> I have a question and perhaps someone can help me.
>
> I have an old emailserver with vpopmail and i want to transfer
> all old domains and emailadresses to a newer vpopmail-server.
>
> The old vpopmail-server is a V4.9 (?) and the new-mailsever is a 5.2.1
>
> I only copied all files from
> /home/vpopmail/domains
> to the new vpopmail server (/home/vpopmail/domains , too of course),
> but noone can ask for new emails.
>
> When I add a new domain with the new vpopmail-server everyting is going
> good.
>
> Did i made something wrong?
> What can I do that I must do not create all domains with all
> pop3-accounts new?
>
> I will be very glad,
> if someone can help me.
>
> Viele Gruesse,
> Peter.
>
> btw: How can I find out the vpopmail Version ?
>
>
> --
> _
>
> Webagentur web4.hm
> Pyrmonter Str. 42
> D-31789 Hameln, Germany
>
> Tel.: +49-5151 - 60 99 70-0
> Fax:  +49-5151 - 60 99 70-1
>
> EMail: [EMAIL PROTECTED]
> Internet: http://web4.hm
> _
>
>
>
>


-- 
Robin Bowes | http://robinbowes.com




RE: [vchkpw] Authdaemond--mysql?

2003-01-16 Thread Robin Bowes
Hi,

[EMAIL PROTECTED]

> Hmmm. OK. Then I'm wondering what I'm doing wrong as authdaemond seems to
> "stop working" after a time. I've setup the rc file so that the daemon
> only loads the "authvchkpw" module at start time.
>
> When first started, all users can athenticate normally, but after an hour
> or so, it seems to start randomly failing on known good uname/pw combos.
> Only stopping and starting the daemon fixes this; using the restart
> command has no effect.
>
> I'm seeing this problem on two different boxes with identical installs
> running RedHat 6.2 and RedHat 7.3. I'm considering doing a third build on
> a Solaris box to see if the problem show up there as well.
>
> Can anyone suggest what could cause such a problem and what a fix might
> be?

The fix is to not use authdaemon.

Set "AUTHMODULES="authvchkpw" in /usr/lib/courier-imap/etc/imapd.

Cheers,

R.
-- 
Robin Bowes | http://robinbowes.com




[vchkpw] mysql - anything I should look out for?

2003-02-12 Thread Robin Bowes
Hi,

Having previously used vpopmail-5.3.12 with no database support I've just
converted to using mysql with vpopmail-5.3.16.

I built vpopmail using the following script:

./configure \
 --enable-tcpserver-file=/etc/tcprules.d/qmail-smtp \
 --enable-logging=e \
 --enable-log-name=vpopmail \
 --enable-default-domain=robinbowes.com \
 --enable-file-sync=n \
 --enable-auth-logging=y \
 --enable-qmail-ext=y \
 --enable-clear-passwd=y \
 --enable-valias=y \
 --enable-roaming-users=y \
 --enable-mysql=y \
 && make \
 && make install-strip

I then ran vconvert -c -m.

Is that it? Is that all I have to do? That seems outrageously easy!!

A couple of problems I've noticed.

vdominfo doesn't report the correct number of users per domain following
conversion and also, aliased domains are not reported correctly, ie they
are reported as being the same name as the aliased domain. For example,
see the following dump:

domain: robinbowes.com
uid:89
gid:89
dir:/home/vpopmail/domains/robinbowes.com
users:  0
domain: robinbowes.com
uid:89
gid:89
dir:/home/vpopmail/domains/robinbowes.com
users:  0
domain: robinbowes.com
uid:89
gid:89
dir:/home/vpopmail/domains/robinbowes.com
users:  0
domain: orhc.info
uid:89
gid:89
dir:/home/vpopmail/domains/orhc.info
users:  0
domain: orhc.info
uid:89
gid:89
dir:/home/vpopmail/domains/orhc.info
users:  0

This should show just two domains, one with two aliased domains and one
with one aliased domain. I have a handful of users in each of the two real
domains.

I've "fixed" this by updating the cur_users field in the dir_control table.

Also, when I did the conversion, entries were created in the vpopmail
table for users in all of the aliased domains. For example, I have a
domain robinbowes.com and an aliased domain skittle.demon.co.uk. In
robinbowes.com I have 5 users robin,chloe,emily,jane, and postmaster. When
I ran vconvert, entries were created in the vpopmail table for
[EMAIL PROTECTED], [EMAIL PROTECTED], etc. and also for
[EMAIL PROTECTED], [EMAIL PROTECTED], etc. Is this
supposed to happen? I've deleted these additional entries from the
vpopmail table without any apparent side effects, i.e. I can still login
as [EMAIL PROTECTED]

Cheers,

R.
-- 
Robin Bowes | http://robinbowes.com




[vchkpw] mysql - anything I should look out for?

2003-02-12 Thread Robin Bowes
Hi,

Having previously used vpopmail-5.3.12 with no database support I've just
converted to using mysql with vpopmail-5.3.16.

I built vpopmail using the following script:

./configure \
 --enable-tcpserver-file=/etc/tcprules.d/qmail-smtp \
 --enable-logging=e \
 --enable-log-name=vpopmail \
 --enable-default-domain=robinbowes.com \
 --enable-file-sync=n \
 --enable-auth-logging=y \
 --enable-qmail-ext=y \
 --enable-clear-passwd=y \
 --enable-valias=y \
 --enable-roaming-users=y \
 --enable-mysql=y \
 && make \
 && make install-strip

I then ran vconvert -c -m.

Is that it? Is that all I have to do? That seems outrageously easy!!

A couple of problems I've noticed.

vdominfo doesn't report the correct number of users per domain following
conversion and also, aliased domains are not reported correctly, ie they
are reported as being the same name as the aliased domain. For example,
see the following dump:

domain: robinbowes.com
uid:89
gid:89
dir:/home/vpopmail/domains/robinbowes.com
users:  0
domain: robinbowes.com
uid:89
gid:89
dir:/home/vpopmail/domains/robinbowes.com
users:  0
domain: robinbowes.com
uid:89
gid:89
dir:/home/vpopmail/domains/robinbowes.com
users:  0
domain: orhc.info
uid:89
gid:89
dir:/home/vpopmail/domains/orhc.info
users:  0
domain: orhc.info
uid:89
gid:89
dir:/home/vpopmail/domains/orhc.info
users:  0

This should show just two domains, one with two aliased domains and one
with one aliased domain. I have a handful of users in each of the two real
domains.

I've "fixed" this by updating the cur_users field in the dir_control table.

Also, when I did the conversion, entries were created in the vpopmail
table for users in all of the aliased domains. For example, I have a
domain robinbowes.com and an aliased domain skittle.demon.co.uk. In
robinbowes.com I have 5 users robin,chloe,emily,jane, and postmaster. When
I ran vconvert, entries were created in the vpopmail table for
[EMAIL PROTECTED], [EMAIL PROTECTED], etc. and also for
[EMAIL PROTECTED], [EMAIL PROTECTED], etc. Is this
supposed to happen? I've deleted these additional entries from the
vpopmail table without any apparent side effects, i.e. I can still login
as [EMAIL PROTECTED]

Cheers,

R.
-- 
Robin Bowes | http://robinbowes.com




Re: [vchkpw] Converting mbox to Maildir (in virtual domain)

2003-02-17 Thread Robin Bowes
Zafar,

On Mon, February 17, 2003 6:10 am, zafar rizvi said:

> hi sir
> i am using qmail and i have existing users on IMAIL server.
> and i want to convert that users email to qmail and also convert into
> Maildir structure..and i have create a one virtual domain for it...but i
> can't get any converter who convert it into the Maildir structure and also
> as a virtual domain user...
Your virutal domain users Maildirs are created under
/home/vpopmail/domains/your.domain.name/username.

So, all you need to do to convert a user's mbox to maildir is something like:

 su - vpopmail -c "mbox2mdir /path/to/mbox
/home/vpopmail/domains/your.domain.name/username/Maildir"

Disclaimer: I've just typed this in off the top of my head; it is probably
only valid as a concept - you may run into problems that I have not
thought of! (for example, the vpopmail user may not have a shell set by
default, in which case the su command won't work!)

I hope this gives you some ideas.

R.
-- 





Re: [vchkpw] Converting mbox to Maildir (in virtual domain)

2003-02-17 Thread Robin Bowes
Zafar,

On Mon, February 17, 2003 7:26 am, zafar rizvi said:
> hi
> i think its not working fine...plz give me some detail..

Can *you* please let *us* have more details? What steps are you taking to
try this? What is happening? Do you see an error messages?

R.
-- 
Robin Bowes | http://robinbowes.com




Re: [vchkpw] List ettiquite (was Re: [vchkpw] Moving qmail queue)

2003-02-18 Thread Robin Bowes
Andrew,

On Tue, February 18, 2003 5:00 pm, Andrew Kohlsmith said:

> Indiscriminately telling people "go there and try" is a little cold in my
> opinion, especially since it's so closely related to the list subject and
> you already know the answer.
>
> My father used to do something similar to me -- "What's [insert word here]
> mean?"  "Go look it up." -- He knew the answer, and it would have taken
> less energy and effort to just tell me in a single sentence or two, but
instead
> he made me go look it up -- what did it teach me?  Virtually nothing.

When I was starting to learn about qmail and vpopmail I had a former
colleague and good friend to call on as a resource. His answers to me
were, more often than not, along the lines of "man dot-qmail" or "What do
the logs say?". Sometimes this would frustrate me if I was looking for a
quick fix but I am eternally grateful to him for this approach as I now
know so much more about the subject (take a bow Mark P!)

As the saying goes:

"Give a man a fish; you have fed him for today.  Teach a man to fish; and
you have fed him for a lifetime."

Or, alternatively:

"Give a man a fish; you have fed him for today.  Teach a man to use the
Net and he won't bother you for weeks."

:o)

R.
-- 
Robin Bowes | http://robinbowes.com




[vchkpw] Configure options for MySQL support?

2003-02-25 Thread Robin Bowes
Hi,

I currently use a script to build vpopmail to mame sure I keep the same
configure options:

[EMAIL PROTECTED] tarballs]# cat vpopmail.config.sh
#!/bin/bash
./configure \
 --enable-tcpserver-file=/etc/tcprules.d/qmail-smtpd \
 --enable-logging=e \
 --enable-log-name=vpopmail \
 --enable-default-domain=robinbowes.com \
 --enable-file-sync=n \
 --enable-auth-logging=y \
 --enable-qmail-ext=y \
 --enable-clear-passwd=y \
 --enable-valias=y \
 --enable-roaming-users=y \
 --enable-mysql=y \
 && make \
 && make install-strip

I keep this in /home/tarballs along with my vpopmail tarballs:

[EMAIL PROTECTED] tarballs]# ls -d vpopmail*
vpopmail-5.2.1.tar.gz   vpopmail-5.3.16.tar.gz  vpopmail.config.sh
vpopmail-5.3.12.tar.gz  vpopmail-5.3.7.tar.gz
vpopmail-5.3.16 vpopmail-5.3.9.tar.gz

If I need to build vpopmail (any version), I so the following:

[EMAIL PROTECTED] tarballs]# tar zxf vpopmail-5.3.12.tar.gz
[EMAIL PROTECTED] tarballs]# cd vpopmail-5.3.12
[EMAIL PROTECTED] vpopmail-5.3.12]# ../vpopmail.config.sh
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...

This worked perfectly until I enabled MySQL support. Now I must edit
vmysql.h to include the server/user/password for mysql.

Would it be possible to add in a few options for configure to supply these
values on the command line, e.g.:

./configure \
 --with-mysql-update-server=servername \
 --with-mysql-update-user=username \
 --with-mysql-update-password=password \
 --with-mysql-read-server=servername \
 --with-mysql-read-user=username \
 --with-mysql-read-password=password

The "--with-mysql-read-*" options could be optional, i.e. use the update
server values if the read server is not present.

I'd hack this myself, but I'm afraid I know little about writing configure
scripts.

Thanks,

R.
-- 
Robin Bowes | http://robinbowes.com



Re: [vchkpw] Configure options for MySQL support?

2003-02-25 Thread Robin Bowes
David,

On Tue, February 25, 2003 2:13 pm, David Richardson said:

> I don't plan on changing my MySQL params very often, but I'm _certain_
> that I'll forget to update vmysql.h during a recompile and I'll foobar my
> Vpopmail.

Can you guess what bit me resulting in my raising this as an issue?!!

> Perhaps we could just cobble together a helper perl script to query for
> and rewrite the vmysql.h params as part of the compile script(s) you use.

That's another possibility...

> Without a lot of other "me too" votes, is there interest from the vpopmail
> team in having this idea go a particular direction (into config/make or
> external perl)?  Is this even the appropriate venue to ask???

Let's wait and see...

R.
-- 
Robin Bowes | http://robinbowes.com



[vchkpw] Using maildrop with vpopmail

2003-03-12 Thread Robin Bowes
Hi,

Can anyone point me at any documentation describing how to use maildrop with
vpopmail / courier-imap / qmail ?

Thanks,

R.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 26/02/2003




Re: [vchkpw] more weirdness with vdelivermail and maildrop

2003-03-14 Thread Robin Bowes
Dave,

On Fri, March 14, 2003 2:24 am, "Dave Weiner" said:
> I've been playing with a squirrelmail plugin to let the user turn
> this all on or off.

I'd be *really* interested in seeing a squirrelmail plugin to do this. I
use squirrelmail filters at the moment and it's pretty sloow! I'm
looking into using maildrop instead but I am aware that that would mean
editing .mailfilter files - OK for me but my computer illiterate other
half and 11 year-old daughter might struggle!

Actually, thinking about it, not everybody using vpopmail uses
squirrelmail so this would be better as a separate tool, or possibly
integrated with qmailadmin.

Would it be possible to hack some code from courier into qmailadmin to
manage the maildrop filters?

R.
-- 
Robin Bowes | http://robinbowes.com



Re: [vchkpw] About to release new devel version 5.3.20

2003-03-25 Thread Robin Bowes
Ken,

- Original Message - 
From: "Ken Jones" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 24, 2003 7:53 PM
Subject: [vchkpw] About to release new devel version 5.3.20


> I'm about to release a new 5.3.20 devel version.
> 
> Does anyone have any patches they  would like to submit?

No, but would it be difficult to move mysql options from vmysql.h to configure 
options, e.g.

./configure \
 --with-mysql-update-server=servername \
 --with-mysql-update-user=username \
 --with-mysql-update-password=password \
 --with-mysql-read-server=servername \
 --with-mysql-read-user=username \
 --with-mysql-read-password=password

The "--with-mysql-read-*" options could be optional, i.e. use the update
server values if the read server is not present.

I'd really like to see this.

Cheers,

R.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 17/03/2003



[vchkpw] Trying to get to bottom of courier-imap / vpopmail issue

2003-03-26 Thread Robin Bowes
Hi,

Someone on the courier-imap list had posted an issue about problems using
courier-imap with vpopmail and Sam (Varshavik) had replied with:

>> Known vpopmail bug.  The vpopmail mailing list is down the hall, last door
>> on your left.

I responded with:

> Is it? Or would it be more accurate to class this as a known problem
when using
vpopmail with courier-imap?
>
> If you're sure this is a vpopmail problem can you tell us what the issue
is?

To which he replied:

> The issue is that some function in vpopmail does not clear the buffer that
> holds the login id, and does not null-terminate the string.  Therefore, if
> the second login request uses a shorter loginid than the first loginid, the
> loginid gets garbled.

Is this something that we can track down and resolve?

Or is it not a vpopmail issue?

R.
-- 
Robin Bowes | http://robinbowes.com



Re: [vchkpw] Trying to get to bottom of courier-imap / vpopmail issue

2003-03-26 Thread Robin Bowes
Jesse,

On Wed, March 26, 2003 3:01 pm, "Jesse Guardiani" said:
> On Wednesday 26 March 2003 07:30, Robin Bowes wrote:
>> Hi,
>>
>> Someone on the courier-imap list had posted an issue about problems
>> using
>>
>> courier-imap with vpopmail and Sam (Varshavik) had replied with:
>> >> Known vpopmail bug.  The vpopmail mailing list is down the hall, last
>> >> door on your left.
>
> Could you describe the symptoms? Is it an authdaemon issue? I don't have
> any
> background to work with here.

What happens is as follows:

login as [EMAIL PROTECTED] -> works OK
logout
login as [EMAIL PROTECTED] -> works OK
logout
login as [EMAIL PROTECTED] -> doesn't work

Notice that "user1" is longer than "user". The issue seems to be that the
previous login is being "remembered" somewhere along the line; I don't
know if it's within vpopmail or authdaemon or some interaction between the
two.

As many people often say, don't use authdaemon and vpopmail works fine.
However, they don't work together very well because of the above issue.

R.
-- 
Robin Bowes | http://robinbowes.com



[vchkpw] bogofilter with vpopmail?

2003-03-30 Thread Robin Bowes
Hi,

Has anyone got much experience using bogofilter with vpopmail?

I'm looking into implementing it but not having much look.

Here's what I've got so far:

In /home/vpopmail/domains/robinbowes.com/robin/.qmail:

|condredirect robin-bogo-spam /usr/bin/bogofilter
./Maildir/

In /home/vpopmail/domains/robinbowes.com/robin/.qmail-bogo-spam:

./Maildir/.Spam.unverified

However, I'm finding that this causes looping.

I move the .qmail file out of the way and just tried with the .qmail-bogo-spam file 
and found that this is what is not working. Mail
sent to [EMAIL PROTECTED] gets delivered to [EMAIL PROTECTED] inbox rather than 
straight to the spam directory as I
would like.

Am I missing something basic here? I suspect I am...

Any suggestions gratefully received...

Thanks,

R.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 17/03/2003




Re: [vchkpw] bogofilter with vpopmail?

2003-03-31 Thread Robin Bowes
Hi Justin,

On Mon, March 31, 2003 12:54 pm, "Justin Heesemann" said:
> On Monday 31 March 2003 09:01, Robin Bowes wrote:
>> Hi,
>>
>> Has anyone got much experience using bogofilter with vpopmail?
>>
>> I'm looking into implementing it but not having much look.
>>
>> Here's what I've got so far:
>>
>> In /home/vpopmail/domains/robinbowes.com/robin/.qmail:
>> |condredirect robin-bogo-spam /usr/bin/bogofilter
>>
>> ./Maildir/
>>
>> In /home/vpopmail/domains/robinbowes.com/robin/.qmail-bogo-spam:
>>
>> ./Maildir/.Spam.unverified
>
> at least you should add a / to that line. and use maildirmake to create
> .Spam.unverified

That's a typo - I have the trailing slash in my .qmail-xxx file, and I did
use maildirmake to create the Maildir (or perhaps I created it from a MUA
via Courier-IMAP - either way it's created correctly!)

> furthermore you might want to try move the .qmail-bogo-spam  file to
> /home/vpopmail/domains/robinbowes.com/.qmail-bogo-spam
> and move the .qmail file to
> /home/vpopmail/domains/robinbowes.com/.qmail-robin

Would this catch everything delivered to [EMAIL PROTECTED]

> I'm using bogofilter but instead of moving mail to some other Maildir, i'm
> using the -p option to add a X-Bogosity Header and have my MUA filter it
> (Outlook Express can't but most others can filter userdefined headers)

I'd be happy to consider that approach, in fact, when I get round to it, I
intend integrating bogofilter into qmail to process messages for my whole
server instead of just me, and then using maildrop to filter the
X-Bogosity-tagged messages.

There are two things stopping me:

1. I need to install a patched version of qmail. I'm currently running
1.03 vanilla.

2. I've previously struggled with maildrop and vpopmail, and haven't made
the time to bottom it out.

I'll give your suggestions a go.

Cheers,

R.
-- 
Robin Bowes | http://robinbowes.com



Re: [vchkpw] bogofilter with vpopmail?

2003-03-31 Thread Robin Bowes

On Mon, March 31, 2003 2:51 pm, "Justin Heesemann" said:
>
> the problem is: i think vpopmail completly ignores
> ~vpopmail/domain.com/user/.qmail-ext  files.

Does it? Bummer! Is this a design decision, or a "feature"?

> so you could stick with your
> /home/vpopmail/domains/robinbowes.com/robin/.qmail
> file to catch all [EMAIL PROTECTED] mail

Yeah, I was going to reply again and say that part of my setup was working
in as much as mail was being sent to [EMAIL PROTECTED]

> and use a /home/vpopmail/domains/robinbowes.com/.qmail-robin-bogo-spam
> file to catch mail for
> [EMAIL PROTECTED]  (mail to this adress won't be processed by
> the robin/.qmail file)

OK, I'll give that a whirl.

Have you got anything special in your /etc/bogofilter.cf to work with
vpopmail? I'm just using it out of the box at the moment (then again, I've
not got a tested working set up yet!)

Cheers,

R.

-- 
Robin Bowes | http://robinbowes.com



Re: [vchkpw] bogofilter with vpopmail?

2003-04-02 Thread Robin Bowes
Justin,

On Mon, March 31, 2003 2:51 pm, "Justin Heesemann" said:
>> > furthermore you might want to try move the .qmail-bogo-spam  file to
>> > /home/vpopmail/domains/robinbowes.com/.qmail-bogo-spam

This works.

>> > and move the .qmail file to
>> > /home/vpopmail/domains/robinbowes.com/.qmail-robin
>> Would this catch everything delivered to [EMAIL PROTECTED]
>
> the problem is: i think vpopmail completly ignores
> ~vpopmail/domain.com/user/.qmail-ext  files.

At the risk of repeating myself, is there any particular reason for this?
Is there any work around?

>
> so you could stick with your
> /home/vpopmail/domains/robinbowes.com/robin/.qmail
> file to catch all [EMAIL PROTECTED] mail
> and use a /home/vpopmail/domains/robinbowes.com/.qmail-robin-bogo-spam
> file to
> catch mail for
> [EMAIL PROTECTED]  (mail to this adress won't be processed by
> the
> robin/.qmail file)

I've done this and it works.

However, this is rather awkward to use for several users. I guess a more
centralised way to do this would be to run bogofilter from qmail-queue and
to use maildrop to filter the messages as they are delivered, or even
filter in the MUA.

Any thoughts on this?

R.
-- 
Robin Bowes | http://robinbowes.com



[vchkpw] [Fwd: Re: 1 domain on 3 different location problem]

2003-07-23 Thread Robin Bowes
Hi,

I read this today on the qmail list.

This is not the first bad word I've heard said against vpopmail.

Would the any of the authors care to respond?

R.

 Original Message 
Subject: Re: 1 domain on 3 different location problem
From:"Russell Nelson" <[EMAIL PROTECTED]>
Date:Wed, July 23, 2003 2:33 pm
To:  [EMAIL PROTECTED]
--

Peter Mikeska writes:
 > I have qmail+vpopmail for company.com, but they have 3 departments
located in other cities, these 3 locations are connected on slow lines.
Problem is, that poeople in all 3 locations using same domain for mail
adresses.

Yup, that's a problem.  Fortunately, there's a solution.  Enumerate all
the local users on each machine, and insert them into
virtualdomains like this (using example.com instead of company.com):

[EMAIL PROTECTED]:alias-forward
[EMAIL PROTECTED]:alias-forward
[EMAIL PROTECTED]:alias-forward


And then you need a ~alias/.qmail-forward file which has this:

|forward [EMAIL PROTECTED]

I have no idea how to make this work with vpopmail.  I don't use
vpopmail, nor do I recommend that anybody else use it.  I've read the code
for vpopmail, and although it's written to industry standards, it's crap. 
Total and unmitigated crap.  Fixed-length buffers
everywhere, #ifdef every time you turn around, null-terminated strings
instead of counted strings, it's crap; crap, crap, crap.  I understand
that not everybody can afford a custom-crafted solution from Crynwr
Software, but sometimes you only get what you pay for in the open
source world.

-- 
Robin Bowes | http://robinbowes.com



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

2003-10-02 Thread Robin Bowes
Jonathan Viney  wrote on 01 October 2003 13:43:
> 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 "! "
>   include "$VDOMHOME/.catchall"
>   }
>   # if the .catchall file didn't exist then bounce with
>   # vdelivermail so msg includes bounce details
>   to "$VPOP"
>   }
> }

On my system (5.3.20), valias can return several aliases, particularly for ezmlm 
mailing lists, e.g.:

[EMAIL PROTECTED] -> |/usr/bin/ezmlm-reject 
'/home/vpopmail/domains/robinbowes.com/acoustics'
[EMAIL PROTECTED] -> |/usr/bin/ezmlm-issubn 
'/home/vpopmail/domains/robinbowes.com/acoustics'
'/home/vpopmail/domains/robinbowes.com/acoustics/digest' '/home/vpopmail/domains/robin
[EMAIL PROTECTED] -> bowes.com/acoustics/allow' 
'/home/vpopmail/domains/robinbowes.com/acoustics/mod' || { echo "Sorry, only
subscribers may post. If you are a subscriber, please f
[EMAIL PROTECTED] -> orward this message to [EMAIL PROTECTED]
m to get your new address included (#5.7.2)"; exit 100 ; }
[EMAIL PROTECTED] -> |/usr/bin/ezmlm-send 
'/home/vpopmail/domains/robinbowes.com/acoustics'
[EMAIL PROTECTED] -> |/usr/bin/ezmlm-warn 
'/home/vpopmail/domains/robinbowes.com/acoustics' || exit 0
lrwxrwxrwx1 vpopmail vchkpw 54 Aug 12  2002 .qmail-acoustics -> 
/home/vpopmail/domains/robinbowes.com/acoustics/editor
lrwxrwxrwx1 vpopmail vchkpw 55 Aug 12  2002 .qmail-acoustics-default ->
/home/vpopmail/domains/robinbowes.com/acoustics/manager
lrwxrwxrwx1 vpopmail vchkpw 53 Aug 12  2002 .qmail-acoustics-owner ->
/home/vpopmail/domains/robinbowes.com/acoustics/owner
lrwxrwxrwx1 vpopmail vchkpw 55 Aug 12  2002 
.qmail-acoustics-return-default ->
/home/vpopmail/domains/robinbowes.com/acoustics/bouncer

This will most likely cause problems with your script.

R.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 29/09/2003




Re: [vchkpw] HELP! Upgrading to Mysql 4.1 problem

2004-10-01 Thread Robin Bowes

On Fri, October 1, 2004 14:10, [EMAIL PROTECTED] said:
> I've just upgraded to mysql 4.1. Now vpopmail can't find the
> libmysqlclient.so.12 library. When accessing the db I get the error:
>
> "error while loading shared libraries: libmysqlclient.so.12: cannot open
> shared object file: No such file or directory"
>
> I reconfigured and re-compiled vpopmail with original config etc. with no
>  luck.
>
Ron,

You need to install the shared compatibility libraries.

For example, on my Fedora Core 2 box:

[EMAIL PROTECTED] opt]# rpm -qi MySQL-shared-compat
Name: MySQL-shared-compat  Relocations: (not relocatable)
Version : 4.1.4 Vendor: MySQL AB
Release : 0 Build Date: Tue 31 Aug 2004
11:38:37
BST
Install Date: Sun 05 Sep 2004 19:40:15 BST  Build Host: build.mysql.com
Group   : Applications/DatabasesSource RPM:
MySQL-shared-compat-4.1.4-0.nosrc.rpm
Size: 2697506  License: GPL
Signature   : DSA/SHA1, Tue 31 Aug 2004 11:39:18 BST, Key ID 8c718d3b5072e1f5
Packager: Lenz Grimmer <[EMAIL PROTECTED]>
URL : http://www.mysql.com/
Summary : MySQL shared libraries for MySQL 4.1.4 and 3.23.58
Description :
This package includes the shared libraries for both MySQL 3.23.58 and
MySQL 4.1.4. Install this package instead of "MySQL-shared", if you
have applications installed that are dynamically linked against MySQL
3.23.xx but you want to upgrade to MySQL 4.0.xx without breaking the library
dependencies.

R.
--
http://robinbowes.com



Re: [vchkpw] Vpopmail 5.4.8 released

2004-11-18 Thread Robin Bowes
Tom Collins wrote:
http://vpopmail.sf.net/
Released 12-Nov-2004.
Can I suggest that you tidy up the Files page on SourceForge?
I just came to install vpopmail on a new system and thought 5.4.2 was 
the latest version as it appears at the top in the Devel section (Stable 
version will be older than Devel, right?).

Vistors to that page have to scroll down quite a way to find the latest 
Stable version (on my system, page down twice before Stable appears at 
the bottom of the screen - once more to get it at the top.)

Cheers,
R.
--
http://robinbowes.com


[vchkpw] Custom Maildir Structure

2004-11-23 Thread Robin Bowes
Hi,
I use bincimap with vpopmail and use the IMAPDir structure which looks 
like this:

domains
 |
 +-domain
|
+-user
|
+-IMAPDir
|   |
|   +-INBOX -> ../Maildir
|
+-Maildir
   |
   +-new
   |
   +-cur
   |
   +-tmp
Is it possible to configure vpopmail (i.e. vadduser) and, by extension, 
qmailadmin to create this structure automatically when I new user is added?

i.e. Does vpopmail support the concept of a skel directory like the 
adduser command uses /etc/skel ?

Thanks,
R.
--
http://robinbowes.com


Re: [vchkpw] Custom Maildir Structure

2004-11-27 Thread Robin Bowes
Jeremy Eder wrote:
I know of a patch currently under development (very near done, must
be translated to English) for this exact function. Coder calls it
"/etc/skel functionality for vpopmail".
If anyone else knows of another patch/method, please post.
I will post a link to the patch when it's complete. Also, I
understand it will be submitted to Inter7 for their review...
Jeremy,
Any news on this patch?
R.
--
http://robinbowes.com


Re: [vchkpw] Custom Maildir Structure

2004-11-28 Thread Robin Bowes
Tom Collins wrote:
There is a patch on SourceForge to add skel directory support to 
vpopmail, but we decided not to include it since it uses a system call 
to 'cp' to copy the files -- it would be better to do the copying within 
vpopmail itself.
Tom,
Can you you point me to a link to this patch -  I can't seem to find it 
on vpopmail.sf.net.

R.
--
http://robinbowes.com


Re: [vchkpw] Custom Maildir Structure

2004-11-29 Thread Robin Bowes
Tom Collins wrote:
On Nov 28, 2004, at 6:59 AM, Robin Bowes wrote:
Can you you point me to a link to this patch -  I can't seem to find 
it on vpopmail.sf.net.

I guess I was mistaken -- the patch never made it to SourceForge.  Here 
it is.  I declined to add it because it runs cp via a system() call.  
I'd prefer to have vpopmail manage the copying itself.
So, basically all that's required is a copy_directory function to 
replace the system call the "cp"? And you'll accept the patch?

R.
--
http://robinbowes.com


Re: [vchkpw] Custom Maildir Structure

2004-11-29 Thread Robin Bowes
Tom Collins wrote:
On Nov 29, 2004, at 5:19 AM, Robin Bowes wrote:
So, basically all that's required is a copy_directory function to 
replace the system call the "cp"? And you'll accept the patch?

Yes.  Absolutely.  Maybe a configuration option for the location of the 
directory, but that isn't a huge deal.

I'd like to see it use the default Maildir creation if the skel 
directory doesn't exist (or isn't readable) and copy the skel directory 
(which will need to contain Maildir (or .maildir) and its subdirs new, 
cur and tmp) if it does exist.
This should be configurable - if you've got an infrastructure that 
relies on a particular mailbox structure then you want to know if it 
doesn't get created correctly when a user is added.

Also, I envisage allowing different skel dirs per domain, i.e. look in 
/etc/skel first, then /etc/skel, then create the 
default Maildir structure.

R.
--
http://robinbowes.com


Re: [vchkpw] Custom Maildir Structure

2004-11-29 Thread Robin Bowes
Tom Collins wrote:
On Nov 29, 2004, at 10:56 AM, Robin Bowes wrote:
Also, I envisage allowing different skel dirs per domain, i.e. look in 
/etc/skel first, then /etc/skel, then create 
the default Maildir structure.

Consider /@skel/ as the source.  Using /etc/skel causes 
problems if someone wants to use "skel" as an email address or mailing 
list.  Since a username can't have @ in it, it should be a safe 
directory character to use.
That makes sense.
David Winkler has sent me a version of vpopmail that uses a copytree 
function. When I get time, I'll apply the existing patch, include the 
copytree functionality and /skel and /@skel 
support and produce a new patch.

Any preferences as to which source I should patch against? What command 
would you like me to use to make the patch?

That also got me to thinking about how bigdir support means it's not 
possible to have one-letter email addresses/lists.  By using @a, @b, @c, 
etc. as the directory names, any email address would be possible.
I'll leave that to you! :)
R.
--
http://robinbowes.com


[vchkpw] Trying out vhostadmin

2005-04-30 Thread Robin Bowes
Hi,
After some years using qmailadmin (admittedly, not in a mission critical 
environment) I'm checking out vhostadmin.

What I'm ultimately aiming to do is create a mambo module that can 
administer domains, e.g. users, mailing lists, etc.

I've downloaded vpopmail-5.5.3 and installed it using my "standard" 
install script:

#!/bin/bash
./configure \
 --enable-roaming-users \
 --enable-logging=e \
 --disable-passwd \
 --enable-clear-passwd \
 --disable-domainquotas \
 --disable-many-domains \
 --enable-auth-logging \
 --enable-valias \
 --enable-log-name=vpopmail \
 --enable-file-sync \
 --enable-qmail-ext \
 --enable-tcpserver-file=/etc/tcp.smtp \
 && make \
 && make install-strip
I've installed vhostadmin )CVS from 30/04/05 and I can login and the 
interface "does stuff".

However, I don't see any of the users or mailing lists that exist in my 
domains.

Is there more config/setup I need to do to see this details, e.g. set up 
admin privileges, etc. How do I do that?

Thanks,
R.
--
http://robinbowes.com


[vchkpw] vpopmail version confusion

2005-08-22 Thread Robin Bowes

Hi,

Can someone please summarise the current status of the various versions 
of vpopmail?


From SourceForge, 5.4.12 seems to be the latest dev version

However, I see a v5.5.3 is available from inter7.com and on 29th July, 
Ken Jones said in a post [1] to the vchkpw list:


"Excellent. I'll update that 5.5.3 test version."

[1] http://www.mail-archive.com/vchkpw@inter7.com/msg22188.html

Then in a post about 5.5.3 on 19th August, Tom Collins said:

"5.4.12's vdelivermail is newer than all other releases..."

The reason I'm asking is that I currently use vpopmaild but I must have 
an "old" version from a previous 5.5.3 install as I'm currently using 
vpopmail 5.4.12 which doesn't have vpopmaild. I'd like to write a plugin 
for qpsmtpd that talks to vpopmaild to validate local delivery addresses.


Is there any chance that all the latest code could be syncronised into a 
new dev. version? Or is CVS up-to-date with *all* the latest code?


Thanks,

R.
--
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?



[vchkpw] Re: vpopmail version confusion

2005-08-22 Thread Robin Bowes

Tom Collins wrote:

On Aug 22, 2005, at 1:47 PM, Robin Bowes wrote:


Hi,

Can someone please summarise the current status of the various 
versions of vpopmail?



I'm managing the 5.4 branch, Ken Jones, Rick Widmer and others are 
managing the 5.5 branch.


Hmmm, are these independent development efforts or do you work together?

I need to integrate vpopmaild into the 5.4 branch, along with some other 
changes (most likely).


Is there any particular purpose for having two branches, e.g. one 
stable, the other more experimental? Or could you just not get on? :)



From SourceForge, 5.4.12 seems to be the latest dev version



By date, yes.

However, I see a v5.5.3 is available from inter7.com and on 29th July, 
Ken Jones said in a post [1] to the vchkpw list:


"Excellent. I'll update that 5.5.3 test version."

[1] http://www.mail-archive.com/vchkpw@inter7.com/msg22188.html

Then in a post about 5.5.3 on 19th August, Tom Collins said:

"5.4.12's vdelivermail is newer than all other releases..."



Correct.  5.5 should include most everything that was in 5.4.9, but none 
of the changes between 5.4.9 and 5.4.12.


OK, so is there a plan to merge the branches at some stage to produce a 
single version?


The reason I'm asking is that I currently use vpopmaild but I must 
have an "old" version from a previous 5.5.3 install as I'm currently 
using vpopmail 5.4.12 which doesn't have vpopmaild. I'd like to write 
a plugin for qpsmtpd that talks to vpopmaild to validate local 
delivery addresses.


Is this something vpopmaild is currently capable of? e.g. check the 
validity of an email address and return the "real" delivery address


For example, when supplied with the address "[EMAIL PROTECTED]", check 
for things like qmail extensions being enabled, whether [EMAIL PROTECTED] 
exists, is there a catchall for the domain, etc.


Assume extensions are enabled, and the following users are defined:

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

This is what I'd expect to see returned

email address   "real address"
==  
[EMAIL PROTECTED]/com [EMAIL PROTECTED]
[EMAIL PROTECTED]   [EMAIL PROTECTED]
[EMAIL PROTECTED]  [EMAIL PROTECTED]
[EMAIL PROTECTED]  [EMAIL PROTECTED]

Is there any chance that all the latest code could be syncronised into 
a new dev. version? Or is CVS up-to-date with *all* the latest code?



I'll work on bringing vpopmaild into 5.4, and try to determine what else 
the 5.4 branch is missing from 5.5.


Would it be a good idea to consider why there are two branches and work 
towards bringing them together?


What version is the CVS on sourceforge tracking?

Thanks,

R.

--
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?



[vchkpw] Re: vpopmail version confusion

2005-08-23 Thread Robin Bowes

John Simpson wrote:


if you can write a plug-in which reads a cdb file, i've already  written 
a script which generates a list of every valid email address  on a 
vpopmail system. i wrote it because i also wrote a patch for  
qmail-smtpd which checks RCPT TO arguments against the cdb file.


John,

How will this handle extensions?

For example, [EMAIL PROTECTED]

Would I need to strip the extensions and look up [EMAIL PROTECTED]

Also, what about catchall? If a domain has a catch all then I'd need to 
look it up and use that.


How is the cdb generated? Presumably it must be re-created either at 
regular intervals or whenever users are added/deleted/modified?


http://qmail.jms1.net/patches/validrcptto.cdb.shtml explains the  patch, 
and the bottom half of the page talks about the script. if it  can help 
you, feel free...


I can't read your web page as IE is the corporate standard in my 
workplace and I am not able to change it easily.


R.

--
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?



[vchkpw] vpopmail skel dir (again!)

2005-11-19 Thread Robin Bowes
Hi,

Almost a year ago I was looking at adding skel dir capability to
vpopmail (check the archives - 23/11/04 !).

For one reason or another I never quite got round to it.

However, tonight I've started putting something together.

The thing is, I've not done much programming in C before. Pascal, sure.
Perl - I'm a wizard :)

So, I've put together a section of code, which may or may not be valid
C, and would appreciate comments.

Introduction

This code is intended to add skel dir functionality to vpopmail.

It first looks for a domain-specific skel dir in:

 /home/vpopmail/etc/domains//skel

It then looks for a installation-specific skel dir in;

  /home/vpopmail/etc/skel

If neither are found, it creates the default maildir structure.

= snippet of vpopmail.c ==
/* Initialise a couple of strings to hold directory paths
char skel_dir[MAX_BUFF];
char skel_location[MAX_BUFF];


/* initialise skel dir to empty */
strcpy(skel_dir,"");

/* first directory to check */
snprintf(skel_location, sizeof(skel_location),
 "%s/etc/domains/%s/skel",
 VPOPMAILDIR, domain);

/* check if it exists + is readable */
if (check_dir_readable(skel_location)) {

  /* set the skel dir */
  snprintf(skel_dir, sizeof(skel_dir), "%s", skel_location)

} else {

  /* next directory to check */
  snprintf(skel_location, sizeof(skel_location),
   "%s/etc/skel",
   VPOPMAILDIR);

  /* check if it exists + is readable */
  if (check_dir_readable(skel_location)) {

/* set the skel dir */
snprintf(skel_dir, sizeof(skel_dir), "%s", skel_location);

  }
};

/* if one of the skel dirs exists, use it */
if (skel_dir <> "") {

  /* copy it to the newly-created user dir */
  copydir(skel_dir, ".");

} else {

  /* otherwise, create the default dir structure*/
  /* (this is core vpopmail code)   */
  for (i = 0; i < sizeof(dirnames)/sizeof(dirnames[0]); i++) {
if (mkdir(dirnames[i],VPOPMAIL_DIR_MODE) == -1){
  fprintf(stderr, "make_user_dir: failed on %s\n", dirnames[i]);
  /* back out of changes made above */
  chdir("..");
  vdelfiles(username);
  chdir(calling_dir);
  return(NULL);
}
  }
}

= snippet of vpopmail.c ==

I've not yet written the check_dir_readable() or copydir() functions;
check_dir_readable may be really easy (it is in Perl :) ) but I've not
looked into how to implement it. copydir() is probably already available
somewhere if I have a quick google.

I'd appreciate any comments before I go any further with this.

Thanks,

R.



[vchkpw] vpopmail skel dir (again!)

2005-11-20 Thread Robin Bowes
Hi,

Almost a year ago I was looking at adding skel dir capability to
vpopmail (check the archives - 23/11/04 !).

For one reason or another I never quite got round to it.

However, tonight I've started putting something together.

The thing is, I've not done much programming in C before. Pascal, sure.
Perl - I'm a wizard :)

So, I've put together a section of code, which may or may not be valid
C, and would appreciate comments.

Introduction

This code is intended to add skel dir functionality to vpopmail.

It first looks for a domain-specific skel dir in:

 /home/vpopmail/etc/domains//skel

It then looks for a installation-specific skel dir in;

  /home/vpopmail/etc/skel

If neither are found, it creates the default maildir structure.

= snippet of vpopmail.c ==
/* Initialise a couple of strings to hold directory paths
char skel_dir[MAX_BUFF];
char skel_location[MAX_BUFF];


/* initialise skel dir to empty */
strcpy(skel_dir,"");

/* first directory to check */
snprintf(skel_location, sizeof(skel_location),
 "%s/etc/domains/%s/skel",
 VPOPMAILDIR, domain);

/* check if it exists + is readable */
if (check_dir_readable(skel_location)) {

  /* set the skel dir */
  snprintf(skel_dir, sizeof(skel_dir), "%s", skel_location)

} else {

  /* next directory to check */
  snprintf(skel_location, sizeof(skel_location),
   "%s/etc/skel",
   VPOPMAILDIR);

  /* check if it exists + is readable */
  if (check_dir_readable(skel_location)) {

/* set the skel dir */
snprintf(skel_dir, sizeof(skel_dir), "%s", skel_location);

  }
};

/* if one of the skel dirs exists, use it */
if (skel_dir <> "") {

  /* copy it to the newly-created user dir */
  copydir(skel_dir, ".");

} else {

  /* otherwise, create the default dir structure*/
  /* (this is core vpopmail code)   */
  for (i = 0; i < sizeof(dirnames)/sizeof(dirnames[0]); i++) {
if (mkdir(dirnames[i],VPOPMAIL_DIR_MODE) == -1){
  fprintf(stderr, "make_user_dir: failed on %s\n", dirnames[i]);
  /* back out of changes made above */
  chdir("..");
  vdelfiles(username);
  chdir(calling_dir);
  return(NULL);
}
  }
}

= snippet of vpopmail.c ==

I've not yet written the check_dir_readable() or copydir() functions;
check_dir_readable may be really easy (it is in Perl :) ) but I've not
looked into how to implement it. copydir() is probably already available
somewhere if I have a quick google.

I'd appreciate any comments before I go any further with this.

Thanks,

R.
-- 
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?



[vchkpw] Re: vpopmaild and php

2005-11-24 Thread Robin Bowes
Ken Jones said the following on 07/11/2005 15:43:
> Cristiano Deana wrote:
> 
>> Hi,
>>
>> is 'vpopmaild' project still open?
>> I have seen  from cvs vpopmaild.c file hasn't been modified since dec
>> 2004, why?
>> And php => vpopmaild?
> 
> 
> Yep. It's still active. Last week I started a vpopmaild documentation page.
> http://www.qmailwiki.org/Vpopmaild/

It's actually:

http://www.qmailwiki.org/Vpopmaild

R.
-- 
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?



[vchkpw] Re: vpopmaild and php

2005-11-24 Thread Robin Bowes
Robin Bowes said the following on 24/11/2005 11:06:
> Ken Jones said the following on 07/11/2005 15:43:
> 
>>Cristiano Deana wrote:
>>
>>
>>>Hi,
>>>
>>>is 'vpopmaild' project still open?
>>>I have seen  from cvs vpopmaild.c file hasn't been modified since dec
>>>2004, why?
>>>And php => vpopmaild?
>>
>>
>>Yep. It's still active. Last week I started a vpopmaild documentation page.
>>http://www.qmailwiki.org/Vpopmaild/
> 
> 
> It's actually:
> 
>   http://www.qmailwiki.org/Vpopmaild

Where can we download the latest version of vpopmaild? I need to use it
for smtp auth authentication for qpsmtpd as I can't get vchkpw to work.

Thanks,

R.
-- 
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?



[vchkpw] Re: vpopmaild

2005-11-28 Thread Robin Bowes
John Simpson said the following on 27/11/2005 23:40:
> and a suggestion: how about adding a "exists [EMAIL PROTECTED]" 
> command, which would check whether the address is  "deliverable"
> (meaning it exists as a mailbox, an alias, a ".qmail- mailbox" file in
> the domain's directory, or the domain has a ".qmail- default" file which
> doesn't contain "bounce-no-mailbox") and return a  yes/no answer of some
> kind... and that one command would not require  a valid login to use.

I'd also find something like this useful.

> where this is all going... i would like to write a patch for qmail-
> smtpd which would use vpopmaild to replace both the need for an AUTH 
> handler to fork/exec a checkpassword program,

I've already writen an auth plugin for qpsmtpd using vpopmaild...

> and my own 
> "validrcptto.cdb" patch (which rejects mail sent to non-existent 
> mailboxes, uses a cdb file containing every valid email address on  the
> system, and correctly handles "-default" aliases... http://
> qmail.jms1.net/patches/validrcptto.cdb.shtml has more information  about
> the patch.)

... and it would be nice to add a validrcptto plugin using vpopmaild.

R.
-- 
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?



[vchkpw] Re: vpopmaild

2005-11-29 Thread Robin Bowes
John Simpson said the following on 29/11/2005 01:21:
> googling for "qpsmtpd vpopmaild" only brings back two archived posts 
> from this mailing list- and i think you wrote both of them. is there  a
> URL where i can look at the code? i won't be able to directly copy  it
> (my patch will be in C rather than perl) but having a known  reference
> to look at will help me to make sure i'm on the right track.

It's not available anywhere yet.

Here's the auth sub:

sub auth_vpopmaild {
my ( $self, $transaction, $method, $user, $passClear, $passHash,
$ticket )
= @_;

# Read these from a config file
my $vpopmaild_host = 'localhost';
my $vpopmaild_port = 89;

# create socket
my $vpopmaild_socket =
IO::Socket::INET->new(PeerAddr => $vpopmaild_host,
  PeerPort => $vpopmaild_port,
  Proto=> "tcp",
  Type => SOCK_STREAM)
or return (DECLINED);

# send login details
print $vpopmaild_socket "login $user $passClear\n\r";

# get response from server
my $login_response = <$vpopmaild_socket>;

close ($vpopmaild_socket);

# check for successful login
if ($login_response =~ /\+OK.*/) {
return ( OK, "authcheckpassword" );
} else {
return (DECLINED);
}
}

It's about as simple as it could get!

>>> and my own
>>> "validrcptto.cdb" patch (which rejects mail sent to non-existent
>>> mailboxes, uses a cdb file containing every valid email address  on  the
>>> system, and correctly handles "-default" aliases... http://
>>> qmail.jms1.net/patches/validrcptto.cdb.shtml has more information  
>>> about
>>> the patch.)
>>
>>
>> ... and it would be nice to add a validrcptto plugin using vpopmaild.
> 
> 
> one of the reasons i wrote it to use a cdb file was that the cdb file 
> could be scp'd out to "mailhubs", which would be able to reject mail  to
> non-existent mailboxes in domains which exist, without having to  call
> back to the mailbox server at all. sure, there's a delay between  the
> mailbox being added (or password being changed) and the servers 
> "knowing" about the change, but you can use a cron job or a  background
> service to compare timestamps and rebuild and copy cdb  files as needed-
> my own server sees any changes within fifteen seconds.
> 
> as for writing a plug-in for validrcptto... it would actually be  really
> easy in perl. the trick is to correctly handle "-default"  aliases, and
> that's just a loop which does regex transforms to walk  through a series
> of addresses...
> 
> [EMAIL PROTECTED] (the original address)
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> @domain.xyz (if the domain's .qmail-default !~ /vdelivermail.*bounce
> \-no\-mailbox/ )
> 
> it tries each address in turn. once it finds a match (from a cdb  file,
> a libvpopmail function, a courier-authlib function, or whatever  flavour
> of voodoo you practice) it accepts the recipient. if it  reaches the end
> of the list without finding any matches, the  recipient is rejected. if
> you look at qmail-smtpd.c with the  validrcptto.cdb patch, the logic is
> there in the vrtcheck() function  (it's in C, and uses djb's string
> functions, but once you get used to  them the logic is fairly
> straightforward.)

There is already such a plugin for qpsmtpd - I was just pointing out
that something that talks to vpopmaild would be a nice solution.

R.
-- 
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?



[vchkpw] Re: Feature for vdelivermail

2006-01-03 Thread Robin Bowes
[EMAIL PROTECTED] said the following on 03/01/2006 15:28:
> Hi,
> 
> after the resultless search for a filter for emails tagged by
> spamassassin I now want to add some small code to vdelivermail. The
> plan: When the mail is tagged by spamassassin vdelivermail should not
> deliver to $DOMAIN/$USER/Maildir/new but to
> $DOMAIN/$USER/Maildir/.Spam/new. This feature should be domainbased and
> customizable via a controlfile like tcp.smtp or simcontrol.

As someone has already replied, maildrop can do this for you.

This sort of code does not belong in vdelivermail.

R.
-- 
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?



[vchkpw] Re: Vpopmaild backport to 5.4.13

2006-01-12 Thread Robin Bowes
Joshua Megerman said the following on 12/01/2006 15:20:
> However, this morning I took another gander at it and started by
> commenting out everything that cause compile errors of vpopmaild.c against
> 5.4.13, and then worked (almost) everything back in.  So here's my patch
> to bring vpopmaild into the main vpopmail branch.  The changes in the
> patch are as follows:

http://thread.gmane.org/gmane.mail.qmail.vpopmail.devel/41

Come on, keep up. :)

R.
-- 
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?



[vchkpw] Re: SMTP after POP

2006-02-14 Thread Robin Bowes
[EMAIL PROTECTED] said the following on 02/14/2006 09:30 PM:
> I have installed vpopmail -5.4.2. I am having a problem with smtp. The
> open-smtp file does not exist. I have tried re-installing it is still not
> created. When I create it manually smtp after pop still does not work.
> SHould I also create open-smtp.lock. Any advice would be appreciated.

My advice would be to use SMTP AUTH :)

R.



[vchkpw] 5.4.14 - any news?

2006-02-20 Thread Robin Bowes
Hi,

I'm just doing a new install for a client. Any news on whether v5.4.14
is ready yet?

R.



[vchkpw] Re: 5.4.14 - any news?

2006-02-20 Thread Robin Bowes
Jeremy Kister said the following on 02/21/2006 01:34 AM:
> On 2/20/2006 8:10 PM, Robin Bowes wrote:
> 
>> I'm just doing a new install for a client. Any news on whether v5.4.14
>> is ready yet?
> 
> 
> 
> Don't think so, but here's an important patch to 5.4.13
> 
> http://jeremy.kister.net/code/vpopmail-5.4.13-pound-and-err.patch

I actually found 5.4.14 on sourceforge - not listed in the file list but
if you click on 5.4.13 and change '13' to '14' in the download link it
works :)

Is this patch in 5.4.14 ?

BTW, 5.4.14 builds OK for me as I'm not using any MySQL stuff which was
causing the problems.

R.



[vchkpw] Re: 5.4.14 - any news?

2006-02-20 Thread Robin Bowes
Tom Collins said the following on 02/21/2006 02:04 AM:
> On Feb 20, 2006, at 5:52 PM, Robin Bowes wrote:
> 
>> I actually found 5.4.14 on sourceforge - not listed in the file list but
>> if you click on 5.4.13 and change '13' to '14' in the download link it
>> works :)
>>
>> Is this patch in 5.4.14 ?
>>
>> BTW, 5.4.14 builds OK for me as I'm not using any MySQL stuff which was
>> causing the problems.
> 
> 
> Then you should be OK.
> 
> I released QmailAdmin 1.2.10 today because it was quick and ready to go
> out.  I just haven't found the time to wrap up 5.4.15 and get it out. 
> I'll try for this week...

Cool. I need qmailadmin for the new install too!

R.



[vchkpw] Re: 5.4.14 - any news?

2006-02-20 Thread Robin Bowes
Billy Huddleston said the following on 02/21/2006 02:05 AM:
> what's new with 1.2.10 ?
> 

http://sourceforge.net/project/shownotes.php?release_id=395211&group_id=6691

R.



[vchkpw] Re: 5.4.15 onchange patch

2006-03-27 Thread Robin Bowes
John Simpson wrote:
> i have written a patch against vpopmail-5.4.15 which causes any  changes
> to trigger "~vpopmail/etc/onchange", if it exists and if it  is
> executable to the userid which is running the vpopmail program.  the
> patch can be downloaded, and simple directions found, at the  bottom of
> this page:
> 
> http://qmail.jms1.net/patches/
> 
> i am running this on my own server as we speak- it seems to work well 
> so far, and i will be writing the scripting to have it build a new 
> validrcptto.cdb over the next day or two.
> 
> my hope is that there is enough interest in this functionality that  it
> can be integrated into a future verison of vpopmail.

John,

Can this be modified to pass parameters to the program/script? For
example, the action that has just occurred, plus any data associated
with that action? e.g. "onchange useradd [EMAIL PROTECTED]"

Also, have you tried this with vqadmin/qmailadmin? The reason I mention
this is that I'm having a bugger of a job getting my code that
implements skel dirs to work with vqadmin - it works fine from the
command line (as root) but I get a permission denied error when
executing from vqadmin.

I really must get a built-in function working...

R.



[vchkpw] Re: 5.4.15 onchange patch

2006-03-28 Thread Robin Bowes
Charles J. Boening wrote:
> Why not use the .qmail-default to process your skeleton directories?
> Have it call a script that can test for the existence of the directory
> and then copy the skeleton as appropriate.

Because that would add overhead to every mail delivery for something
that is a one-time creation task. This would be significant in large ISP
installations.

R.



[vchkpw] Re: 5.4.15 onchange patch

2006-03-28 Thread Robin Bowes
Michael Krieger wrote:
>  The reason
> I mention this is that I'm having a bugger of a job getting
> my code that implements skel dirs to work with vqadmin - it
> works fine from the command line (as root) but I get a
> permission denied error when executing from vqadmin.
> 
> Have you thought at all about just wrapping your qmail programs executed
> from tcpserver and doing it at run-time instead of account creation?
> 
> Example that I use for creating an IMAP folder structure for use with
> bincimap
> # /var/qmail/bin/linkwrapper #
> #!/bin/sh
> test -d IMAPdir || mkdir IMAPdir
> test -e IMAPdir/INBOX || ln -sf ../Maildir IMAPdir/INBOX
> exec $@
> 
> Then in my service run file, I have
> tcpserver  \< br> /home/vpopmail/bin/vchkpw \
> /var/qmail/bin/linkwrapper \
> /var/qmail/bin/bincimapd
> 
> I don't see why you couldn't do the same with your pop daemon or smtp
> daemon to do some basic parameters (and maybe extend it to keep
> additional information).
> 
> Something to consider.  On a run of qmail-smtpd, test the timestamp of a
> file to the cdb file and rebuild if needed.

Borrowing a famous perl acronym, TMTOWTDI

It is indeed possible to use wrappers as you do, but this adds overhead
to every invocation of [insert progran here] which I'd rather avoid.

Have you seen qpsmtpd? There's an example of how extensibility should be
done. It's incredibly easy to add or modify functionality to qpsmtpd
because of the plugin hooks that are built-in.

Anyway, I've solved the IMAPdir issue a different way (see separate post).

R.



[vchkpw] Patch to create IMAPdir

2006-03-28 Thread Robin Bowes
Hi all,

After struggling for sometime to get skeldir functionality to work, I've
given up for now.

The primary reason for wanting skeldirs was so that new accounts could
be created with IMAPdir support for use with bincimap.

The following patch modifies vpopmail to create an IMAPdir directory.

It also modifies r_chown to work correctly with symlinks (required since
IMAPdir contains a symlink IMAPdir/INBOX -> ../Maildir/)

R.

--- vpopmail-5.4.15/vpopmail.c  2006-01-17 11:30:52.0 -0800
+++ vpopmail-5.4.15-IMAPdir/vpopmail.c  2006-03-27 11:30:50.0 -0800
@@ -1298,11 +1298,16 @@
   while((mydirent=readdir(mydir))!=NULL){
 if ( strncmp(mydirent->d_name,".", 2)!=0 &&
  strncmp(mydirent->d_name,"..", 3)!=0 ) {
-  stat( mydirent->d_name, &statbuf);
-  if ( S_ISDIR(statbuf.st_mode) ) {
-r_chown( mydirent->d_name, owner, group);
+  lstat( mydirent->d_name, &statbuf);
+  // don't recurse into symlinks - just chown symlink to owner:group
+  if ( S_ISLNK(statbuf.st_mode) ) {
+lchown(mydirent->d_name,owner,group);
   } else {
-chown(mydirent->d_name,owner,group);
+if ( S_ISDIR(statbuf.st_mode) ) {
+  r_chown( mydirent->d_name, owner, group);
+} else {
+  chown(mydirent->d_name,owner,group);
+}
   }
 }
   }
@@ -2115,7 +2120,7 @@
  struct vqpasswd *mypw;
  char calling_dir[MAX_BUFF];
  char domain_dir[MAX_BUFF];
- const char *dirnames[] = {"Maildir", "Maildir/new", "Maildir/cur",
+ const char *dirnames[] = {"Maildir", "IMAPdir", "Maildir/new",
"Maildir/cur",
"Maildir/tmp"};
  int i;

@@ -2175,6 +2180,16 @@
 }
   }

+  // Add the symlink IMAPdir/INBOX -> ../Maildir/
+  if (symlink("../Maildir/", "IMAPdir/INBOX") == -1) {
+fprintf(stderr, "make_user_dir: failed to symlink %s\n",
"IMAPdir/INBOX");
+/* back out of changes made above */
+chdir("..");
+vdelfiles(username);
+chdir(calling_dir);
+return(NULL);
+  }
+
   /* set permissions on the user's dir */
   r_chown(".", uid, gid);



[vchkpw] Re: 5.4.15 onchange patch

2006-03-28 Thread Robin Bowes
Michael Krieger wrote:
> It is indeed possible to use wrappers as you do, but this adds overhead
> to every invocation of [insert progran here] which I'd rather avoid.
> 
> How much overhead do you think executing a shell script and an internal
> call to test implements?  How often do you think IMAP connections are
> made?  Think of all the calls that already wrap around shells.  Think of
> how many exec calls (or their variiants in this case) are made to run
> tcpserver, authentication programs, bincimap-up, and bincimapd?  Why not
> modify bincimap or bincimap-up to do the same thing on invocation and
> provide the patch to the bincimap folks instead- a likely better way to
> do things.
> 
> Just don't get caught up in the hype as to how much faster c programs
> are- when the shell is probably kept in memory, and the stat calls used
> by test are cached, this isn't a huge performance hit- especially for a
> connection like imap that is more persistant.
> 
> I run about 10K+ users on bincimap through this linkwrapper and
> generally see almost no load... I know that's vague, but I've never
> benchmarked the use with or without a simple shell script.

All valid points, and I do take the point that the actual "real-world"
hit might not be too bad.

However, I see that doing "stuff" when you create users logically
belongs with the program that creates users - vpopmail in this case. So
to my "perfectionist" mind, I'd rather make vpopmail do this once when
the user is added than checking for it every time the account is
accessed for the lifetime of the account.

> It's incredibly easy to add or modify functionality to qpsmtpd
> because of the plugin hooks that are built-in.
> 
> I'd suggest that:
>  1. qpsmtpd lacks many plugins and doesn't seem to have a lot of support
> in the community, along with the various plugin methods to qmail-smtp
> d.  I'm sure there's a good chunk of overhead in there as well, not to
> mention difficulties like plugin ordering, etc.

qpsmtpd functionality is almost all implemented as plugins. If you've
not checked it out it's really worth a look.

>  2. vpopmail manages qmail users and delivers mail.  I'm weary of making
> it even more of a kitchen sink to start adding plugins and management
> functions that would likely be used by a small number.  It's still
> changing considerably between major releases.

I agree with your sentiment, but vpopmail already creates the directory
into which the mail is delivered. All I'm suggesting is that there is
some degree of flexibility in the structure of that mail directory.

> Anyway, I've solved the IMAPdir issue a different way (see separate
> post).
> 
> Saw it- thumbs up.  Glad you solved your issue.

Yeah, should have done it this way in the first place but I went looking
for a (generic|perfect|correct ) solution.

All working nicely now though.

R.



[vchkpw] Re: Patch to create IMAPdir

2006-03-28 Thread Robin Bowes
Michael Krieger wrote:
> Did you see my post last night about the same issue and wrapping a shell
> script and exec call around bincimap?  It means you don't have to deal
> with this problem for pop/smtp uses, but only imap.
> 
> Why modify vpopmail to do something specific to another program?

For completeness, yes I did see your other post.

My other recent reply in this thread answers the same question.

As to the question of "why modify vpopmail"? Well, vpopmail manages
users, including the creation of the mail directory. Also, many people
have expressed an interest in having a custom directory structure for
new users. So, to me, it seems that vpopmail is the right place to
implement a custom structure.

Possible examples are:

 - welcome mail for all new users
 - custom IMAP directories (e.g. Spam)

Thanks for the interest.

R.



[vchkpw] Re: 5.4.15 onchange patch

2006-03-28 Thread Robin Bowes
Tom Collins wrote:
> On Mar 28, 2006, at 10:37 AM, Robin Bowes wrote:
> 
>> However, I see that doing "stuff" when you create users logically
>> belongs with the program that creates users - vpopmail in this case. So
>> to my "perfectionist" mind, I'd rather make vpopmail do this once when
>> the user is added than checking for it every time the account is
>> accessed for the lifetime of the account.
> 
> 
> I agree with this as well.  A single patch to vpopmail to add "hooks"
> for adding and deleting users and domains allows for a lot of flexibility.
> 
> I've seen requests to automatically send a welcome message to new
> users.  Instead of adding it as a feature to vpopmail, it can be a
> script that gets called automatically.
> 
> Robin's original requirement (and one that others have had) is to have
> an alternate Maildir directory layout, with symbolic links.  Again, this
> is easily accommodated (and updated) by calling a script/program on user
> add.

Tom,

One possible issue with using hooks is that they won't work in
vqadmin/qmailadmin because the httpd process won't allow the CGI scripts
to fork a shell process.

Or at least that's what I think was stopping my code to copy skel dirs
using a system("cp -r") command from working.

R.



[vchkpw] Re: 5.4.15 onchange patch

2006-03-30 Thread Robin Bowes
John Simpson wrote:
> On 2006-03-27, at 1304, Robin Bowes wrote:
>> John,
>>
>> Can this be modified to pass parameters to the program/script? For
>> example, the action that has just occurred, plus any data associated
>> with that action? e.g. "onchange useradd [EMAIL PROTECTED]"
> 
> 
> i guess it's not impossible... i hadn't thought of doing that, but it 
> shouldn't be hard.
> 

Nice - just what I had in mind.

>> Also, have you tried this with vqadmin/qmailadmin? The reason I  mention
>> this is that I'm having a bugger of a job getting my code that
>> implements skel dirs to work with vqadmin - it works fine from the
>> command line (as root) but I get a permission denied error when
>> executing from vqadmin.
> 
> 
> i've tried it with qmailadmin, and i've tried it with the command  line
> tools, and i've tried it from a vpopmaild service. all seem to  trigger
> the script when they should. however you couldn't pay me to  use vqadmin
> in its current form (nothing personal, i understand you  guys are
> working on other things- and to be honest i'm happier adding  and
> removing domains with the command line tools any way.)

Me too, but I've got a customer who uses it so it has to work (in the
absence of any other way to add new domains from a web interface.

I'll try your patch and see if it works for me with vqadmin.

Thanks for doing this.

> http://qmail.jms1.net/vpopmaild.shtml shows a clearer example of how  to
> run vpopmaild under daemontools, by the way.

Clearer than what? I just use:

#!/bin/sh
#
# vpopmaild - used by qpsmtpd auth_vpopmaild plugin for authentication
# with vpopmail.
HOST=127.0.0.1
PORT=89
VPOPMAILD=/var/vpopmail/bin/vpopmaild

exec /usr/local/bin/tcpserver \
-vHRD \
$HOST \
$PORT \
$VPOPMAILD \
2>&1

One of these days I'll get round to using envdir ... :)

R.



[vchkpw] Re: Global addressbook support

2006-03-31 Thread Robin Bowes
John Simpson wrote:
> 
> if by "the hook support" you are referring to the "oncall" patch i  sent
> to the list a few days ago, that would be me- and i think robin  bowes
> is playing with it, although i think he's focusing more on  using an
> oncall script rather than editing the oncall code itself.

Actually, I'm not sure when I'll get chance to check it out. I'm using a
different patch to create an IMAPdir which scratched my immediate itch.
I'll throw it on a test server as soon as I get chance.

R.



[vchkpw] Re: 5.4.15 onchange patch

2006-04-02 Thread Robin Bowes
John Simpson wrote:
> On 2006-04-01, at 0547, Rick Widmer wrote:
> 
>> John Simpson wrote:
>>
>>> let me suggest an alternative- instead of "login user pass 
>>> compact",  how about "login/compact user pass"? this allows the 
>>> password to be  the last thing on the line, and therefore contain 
>>> spaces, and still  allows for a "compact" option.
>>
>>
>> What do you think about login | clogin | slogin?

Can we just take step back here...?

We are proposing alternative login methods because the current "login"
method returns all user information after a successful login, yes?

Why not change the behaviour so that "login" does just that - it logs
in, and add another command that returns the information, e.g. "get"

So, a system only needing to validate credentials would just need to
login and quit.

"get" would take parameters, e.g:

get name
get user_dir

There could also be a "set" command which ... you guessed it!

set name "New Name"
set system_admin_privileges 1

What do you think?

R.



[vchkpw] Re: 5.4.15 onchange patch

2006-04-03 Thread Robin Bowes
Rick Widmer wrote:
> 
> I was under the impression your interest is based on Robin Bowes
> suggestion about the validrcptto.cdb patch, so it is "does this mailbox
> exist."   We may as well make it easy, it should be a popular function.

Yes - having this functionality would obviate the need to maintain the
validrcptto list. Any tool that wants to check the existence of a
mailbox for a given email address on a given host would just need to
telnet to port 89 and supply a command like "exists [EMAIL PROTECTED]". An
"OK" responose would mean it does exist. It should not quite
automatically to allow the checking of several addresses in sequence, e.g:

connect
exists [EMAIL PROTECTED]
exists [EMAIL PROTECTED]
exists [EMAIL PROTECTED]
quit

Does vpopmaild fork? i.e. Does it allow multiple connections? I guess it
uses tcpserver to run it so tcpserver will do all the work. Cool.

R.

> p.s.  I got a kick out of this: "with a working vpopmaild service it
> becomes possible to write a program like vqadmin or qmailadmin which
> does all of its work using vpopmaild commands."  That's _exactly_ what
> vpopmaild was written to allow.  I couldn't have said it better.

I look forward to seeing a php/perl/python/whatever replacement for both
vqadmin and qmailadmin.

R.



[vchkpw] Re: 5.4.15 onchange patch

2006-04-03 Thread Robin Bowes
John Simpson wrote:
> 
> (2) have qmail-smtpd open a socket to a vpopmaild service, or a 
> courierauthd service (i wrote a simple widget which handles the 
> "login", "help", and "quit" commands, but uses courier-authlib  instead
> of libvpopmail) and uses that to verify the ID and password  which were
> entered. http://qmail.jms1.net/courierauthd.shtml talks  about it. the
> page is not really finished but the code is very simple  and it works,
> if you can link it- there are issues with how BSD  handles linking with
> the courier-authlib library and i don't have a  BSD system to play with.

This is how I've implemented a plugin for qpsmtpd that auths against
vpopmaild.

It's extremely easy:

# create socket
my $vpopmaild_socket = IO::Socket::INET->new(PeerAddr => vpopmaild_host,
 PeerPort => vpopmaild_port,
 Proto=> "tcp",
 Type => SOCK_STREAM)
or return (DECLINED);

# send login details
print $vpopmaild_socket "login $user $passClear\n\r";

# get response from server
my $login_response = <$vpopmaild_socket>;

close ($vpopmaild_socket);

# check for successful login
if ($login_response =~ /\+OK.*/) {
return ( OK, "authcheckpassword" );
} else {
return (DECLINED);
}


Of course, qpsmtpd is written in perl so this sort of thing *is* pretty
easy!

> the "auth.cdb" idea is a lot easier to write, and to me it makes more 
> sense. however, the idea of using vpopmaild for this purpose is also 
> intriguing from a programming standpoint (i.e. CAN i write this code, 
> how can i make a single version of qmail-smtpd which can handle all 
> three AUTH schemes- fork/exec vchkpw, auth.cdb, and vpopmaild.)

You really should check out qpsmtpd. It can handle several auth types
easily.

R.



[vchkpw] Re: ONCHANGE behavior

2006-04-15 Thread Robin Bowes
Rick Widmer wrote:
> John Simpson & Robin Bowes
> 
> Do you really want the onchange function to be called three times on an
> add_domain operation, and two times on an add_user operation?  I find it
> problematic that you are notified of the mod_user before the add_user,
> and personally would prefer only one call per operation.  (That means
> you have to assume the postmaster user was added when you add a domain.)
> 
> At the very least I would like to block the mod_user notification in an
> add_user operation.  I think it is a good idea to block the add_user
> [EMAIL PROTECTED] operation on an add_domain too.  I'll handle coding it
> if it is ok with you two.

Rick,

I must admit I've not actually looked at John's code.

However, my thoughts (based on your comments) are as follows:

add_user should be called as well as add_domain when a new domain is
created - these are separate actions that happen to both occur when you
first create a domain.

I don't really have a problem with both mod_user and add_user triggering
in an add_user operation. What happens to cause mod_user to trigger as
well as add_user? I guess the user is added and then modified - the
password is set, perhaps? BUt I would need to look at the code to see
what actually happens. Bottom line; If the user is being added and then
modified then it makes sense to have both hooks triggered.

Why do you want to change this?

What is the problem you are trying to solve?

> 
> README.onchange
> ---
> If --enable-onchange-script is added to the ./configure command
> many vpopmail commands, and calls into the library will call the
> script ~vpopmail/etc/onchange when they have completed execution.
> 
> When the script is called, it will be passed the following values
> on the command line to indicate what was changed.
> 
> add_user[EMAIL PROTECTED]
> del_user
> mod_user
> 
> add_domaindomain
> del_domain
> add_alias_domain

Does there need to be a "del_alias_domin" hook? How about a mod_domain,
or mod_alias_domain (not sure if these two would be necessary)?

> valias_insert[EMAIL PROTECTED]
> valias_remove
> valias_delete

What's the difference between valias_remove and valias_delete ?

Does there need to be a valias_mod?

Why is this not add_valias, del_valias? (to make it the same as the
user/domain hooks) ?

R.



[vchkpw] Re: ONCHANGE behavior

2006-04-16 Thread Robin Bowes
Rick Widmer wrote:
> 
> I see no problem with that.  You will get:
> 
> add-domain example.com  - when they run vadddomain
> 
> add-user [EMAIL PROTECTED]  - when they run vadduser
> 
> mod-user [EMAIL PROTECTED]  - when they run vmoduser
> 
> del-user [EMAIL PROTECTED]  - when they run vdeluser
> 
> 
> instead of
> 
> add-domain example.com
> mod-user [EMAIL PROTECTED]  *
> add-user [EMAIL PROTECTED]  * - when they run vadddomain
> 
> mod-user [EMAIL PROTECTED]  *
> add-user [EMAIL PROTECTED]  - when they run vadduser
> 
> mod-user [EMAIL PROTECTED]  - when they run vmoduser
> 
> del-user [EMAIL PROTECTED]  - when they run vdeluser
> 
> 
> Can you keep a straight face and tell me the * lines are anything but
> noise?  :)

I really don't think the multiple calls cause any problem at all and add
clarity, i.e. they reflect what's actually happening rather than
requiring the sysadmin to make assumptions about what's going on behind
the scenes. For example, assuming that a postmaster user is created when
a domain is added.

I have less of a problem with supressing the mod-user call that triggers
when add-user is called, but I really think that creating a domain
should trigger an add-domain action and an add-user action.

If this code was called for every delivery on an underpowered box
receiving millions of deliveries per day then it might cause a problem,
but it will only be called when domains/users/aliases are being managed,
and that's hardly a synchronous task. It seems like premature
optimisation to me.

R.



[vchkpw] Re: ONCHANGE behavior

2006-04-16 Thread Robin Bowes
Rick Widmer wrote:
> Robin Bowes wrote:
>> What is the problem you are trying to solve?
> 
> No real problem, just something I consider wasteful of resources.  For
> example, if all you are doing is rebuilding a validrcptto database
> currently you are doing it three times every time you add a domain.  Two
> of them are instantly thrown away as soon as they finish.

But what problem does this cause? This only happens when managing
domains/users/aliases, etc. and does need to be particularly fast. The
extra calls won't cause any real problems and add clarity.


>>> valias_insert[EMAIL PROTECTED]
>>> valias_remove
>>> valias_delete
>>
>>
>> What's the difference between valias_remove and valias_delete ?
> 
> Assume an alias  [EMAIL PROTECTED] that forwards to [EMAIL PROTECTED] and
> [EMAIL PROTECTED]
> 
> valias_remove [EMAIL PROTECTED] would indicate that the alias no longer
> forwards to [EMAIL PROTECTED]
> 
> valias_delete [EMAIL PROTECTED] would indicate the alias was removed
> entirely.

What is [EMAIL PROTECTED] also forwards to [EMAIL PROTECTED] How does
valias_remove [EMAIL PROTECTED] know which alias to remove?

R.



[vchkpw] Re: ONCHANGE behavior

2006-04-16 Thread Robin Bowes
John Simpson wrote:
> On 2006-04-15, at 1917, Rick Widmer wrote:
>> Robin Bowes wrote:
>>> What is the problem you are trying to solve?
>>
>> No real problem, just something I consider wasteful of resources.  For
>> example, if all you are doing is rebuilding a validrcptto database
>> currently you are doing it three times every time you add a domain. 
>> Two of them are instantly thrown away as soon as they finish.
> 
> actually, i'm not- but you do have a point. whoever writes an "onchange"
> script does need to worry about this issue- but i don't think it's right
> to give up the flexibility in order to not have to write proper
> "onchange" scripts.

I agree with John.

>>> Why is this not add_valias, del_valias? (to make it the same as the
>>> user/domain hooks) ?
>>
>> I don't know.  John?
> 
> the idea was that the names were are all the same as vpopmaild commands.
> however, these functions don't exist in vpopmaild, so i used the names
> of the actual functions within the vpopmail source code.
> 
> would it be better to use the vpopmail function names for all of the
> notifications, so that they are all consistent? if so, now is the time
> to make the decision, since nobody (as far as i know) has written any
> onchange scripts which would look for specific strings.

I don't relaly care, as long as they're consistent, i.e. either add_user
or user_add.

R.



[vchkpw] Re: ONCHANGE behavior

2006-04-16 Thread Robin Bowes
Rick Widmer wrote:
> I don't see any value in reporting a delete operation after the fact,
> other than to log it.  On the other hand it might be a good idea to move
> the script before the delete.  That  would give you a chance to take a
> snapshot of the resource usage right before delete, or maybe make a backup.

If you look at qpsmtpd (which is where I believe the idea of onchange
hooks came from), it is moving to the idea of pre- and post- hooks for
all actions.

It also calls different "scripts" for each hook rather than having one
monolithic "something's changed" script. Would that be a better approach
for vpopmail?

It could work something like this [warning: pseudo-code alert]:

if (defined $user_add_pre) {
  if ( exists $user_add_pre ) {
$hook_return = execute $user_add_pre;
if $hook_return = failure {
  warning/error "user_add pre-hook execution failed (error here)"
  # bail out here?
}
  } else {
warning/error "user_add pre-hook defined but not found"
# bail out here?
  }
}

# Now, add the user
if $hook_return = OK {
  user_add;
}

if (defined $user_add_post) {
  if ( exists $user_add_post ) {
$hook_return = execute $user_add_post;
if $hook_return = failure {
  warning/error "user_add post-hook execution failed (error here)"
  # bail out here?
}
  } else {
warning/error "user_add post-hook defined but not found"
# bail out here?
  }
}


>> would it be better to use the vpopmail function names for all of the 
>> notifications, so that they are all consistent? if so, now is the 
>> time to make the decision, since nobody (as far as i know) has 
>> written any onchange scripts which would look for specific strings.
> 
> I don't really care.  Robin - what do you think the names should be?
> 
> As far as I'm concerned, all I need is a complete list in front of me
> when I sit down to write the script.

I don't really care either, but they should be consistent - add_user or
user_add, but not a mix.

R.



[vchkpw] Re: ONCHANGE behavior

2006-04-16 Thread Robin Bowes
John Simpson wrote:
> (re-arranging things so the sequence of my answers makes sense...)
> 
> On 2006-04-15, at 2237, Rick Widmer wrote:
>> John Simpson wrote:
>>> for me, the trick is dealing with the fact that input may arrive on 
>>> the pipe at any time- including three notifications within the space
>>> of a second. i know that (for my purposes) if an "add_domain xyz"
>>> message arrives, for example, that i can wait 10 seconds before
>>> doing  anything (to give the vpopmail program time to finish and send
>>> any  other messages), and that any "add_mailbox [EMAIL PROTECTED]" or
>>> "mod_user [EMAIL PROTECTED]" messages which arrive less than 5 seconds
>>> after i'm done can be safely ignored.
>>
>> It seems to me it is much easier to eliminate the noise at the source.
> 
> much easier to write an "onchange" script, yes... but less flexible.
> 
> and while it may seem like "noise" to a human being, to a computer it's
> just a sequence of messages. and unless the server itself is already
> overloaded, the extra CPU load involved is minimal.
> 
> besides, if we decide in the future to allow users the option to use
> something other than "postmaster" for that function, then seperate
> messages will be necessary and it would not be proper to assume that an
> "add_domain" notification will always imply an "add_user [EMAIL PROTECTED]"
> notification.
> 
> i don't feel right giving up that flexibility. the flexibility is why i
> wrote the "onchange" patch to run a script- my first idea was to have it
> write to a named pipe, since that's what i'm actually doing on my own
> server. i figured if i wrote it to call a shell script, and then had
> that script write the data to the pipe, the fact that there's a shell
> script in the middle would make it a lot easier for other people to
> write their own "onchange" handlers (or to combine two of them if needed.)
> 
> i can see collapsing multiple messages into a single invocation of the
> "onchange" script if we follow that route, but i'm still not convinced
> that we should do away with the multiple messages entirely- not even
> with blocking the mod_user notification within add_user within
> add_domain, because somebody in the future may decide that they want to
> track quotas with the "onchange" mechanism for some reason. i don't
> think it's right to arbitrarily lock them out of such a possibility,
> especially when it's easy enough to write the "onchange" script so that
> it's not an issue.
> 
> robin? anybody else? thoughts about this?

I agree with John.

Removing the multiple messages is a premature optimisation.

Having thought about this some more, I think that a better approach
would be to have both pre- and post- hooks for each action and to call a
separate script for each hook.

The benefit to this is that you would only call the hook if the script
exists. So, by default, there would be no scripts so no hooks would be
called. To create a hook, admin simply drops a script in
VPOPMAILHOME/hooks/ (e.g. add_user_pre).

> yeah, i've been complaining about the "fixed order" stuff for about four
> years now.
> 
> for those who don't know what we're talking about- if you think of a
> ".qmail" file, it may have multiple lines in it. the first line might
> run spamassassin, the second line might use "condredirect" to store the
> message somewhere (or simply not deliver it) based on the score, and
> then the third line would order everything else delivered to the normal
> inbox folder.
> 
> when aliases are stored in a SQL database, there is no field in the
> database to hold what order the entries should be executed in. doing a
> "SELECT * FROM valias" query might return these same three items in any
> random order, because there is no "ORDER BY" clause in the query,
> because there is no field by which to order the results. and if it
> happens to return the steps in the wrong order, your filtering doesn't
> work.
> 
> what needs to happen is that some kind of sequence field needs to be
> added to the table(s), and the alias-related functions need to be
> re-written to properly work with these fields, as well as deal with
> existing databases where there is no sequence value. we probably also
> need a utility to retroactively "fix" any existing databases- for
> single-item aliases, put an explicit 0 in the sequence field so it's no
> longer NULL. for multi-item aliases, print out the alias and the lines,
> so that the administrator can manually fill in the sequence field on
> each record.

Why not just store the whole .qmail as a multi-line text object?

>>> would it be better to use the vpopmail function names for all of the 
>>> notifications, so that they are all consistent? if so, now is the 
>>> time to make the decision, since nobody (as far as i know) has 
>>> written any onchange scripts which would look for specific strings.
>>
>> I don't really care.  Robin - what do you think the names should be?
>>
>> As far as I'm concerned, all I need is a complet

[vchkpw] Re: ONCHANGE behavior

2006-04-16 Thread Robin Bowes
Rick Widmer wrote:
> Robin Bowes wrote:
>> Having thought about this some more, I think that a better approach
>> would be to have both pre- and post- hooks for each action and to call a
>> separate script for each hook.
> 
> This has some possibilities.  There would be an advantage if most of the
> hooks were empty, and a liability if there was a lot of duplicate code.
>  It would require several identical files to support John's existing
> setup.  I'm happy with a single script and a switch() on the command
> that was executed.

If you have duplicate code you would just symlink a single script
containing your switch() statement - best of both worlds!

> 
> I would still argue that the hooks should match the calls in the vopmail
> api, and not an arbitrary subset of the operations within them.

Why? Why not make the hooks reflect the "useful" operations rather than
just what goes in internal to vpopmail?

>> Why not just store the whole .qmail as a multi-line text object?
> 
> The biggest problem, it would break every program that currently updates
> valias entries.  The other minor detail, can every back end support it?
>   I don't know.  I use CDB, test mysql and pgsql, and can't even list
> all the other back ends off the top of my head.  I have no idea how you
> would implement valias in them, and I don't believe any of them have it
> yet.  There is very little interest in keeping them current with the big
> three.  They usually get updated just enough to scratch the itch of the
> person who contributes a patch...  unless you want it bad enough to pay.
>  Inter7 and Tom Collins will both do sponsored work that usually finds
> its way back into the distribution.


It was just an idea - I don't know the details of the code.

R.



[vchkpw] Re: ONCHANGE behavior

2006-04-16 Thread Robin Bowes
John Simpson wrote:
> On 2006-04-16, at 0639, Robin Bowes wrote:
> 
>> It also calls different "scripts" for each hook rather than having one
>> monolithic "something's changed" script. Would that be a better approach
>> for vpopmail?
> 
> i don't think so. if you want to use this kind of approach, you can
> create an "onchange" script which looks like this:
> 
> #!/bin/sh
> if [ -e ~vpopmail/etc/$1 ]
> then
> exec ~vpopmail/etc/$*
> fi
> logger -t onchange ignoring command "$*"
> exit 0
> 
> and then create scripts in ~vpopmail/etc with names matching the "cmd"
> parameter sent to the "onchange" script.

That will still exec the script for every OnChange event.

>>>> would it be better to use the vpopmail function names for all of the
>>>> notifications, so that they are all consistent? if so, now is the
>>>> time to make the decision, since nobody (as far as i know) has
>>>> written any onchange scripts which would look for specific strings.
>>>
>>> I don't really care.  Robin - what do you think the names should be?
>>>
>>> As far as I'm concerned, all I need is a complete list in front of me
>>> when I sit down to write the script.
>>
>> I don't really care either, but they should be consistent - add_user or
>> user_add, but not a mix.
> 
> since nobody really cares, i'm just going to leave them the way they are.

Ahem, I said I didn't care as long as they were consistent!

R.



[vchkpw] Re: ONCHANGE behavior

2006-04-17 Thread Robin Bowes
Tom Collins wrote:
> On Apr 16, 2006, at 10:41 PM, Rick Widmer wrote:
>>
>> Throwing in add-user and mod-user is arbitrarily picking _some_ of the
>> internal functionality of the add-domain operation.  If you want them
>> why don't we throw in:
> 
> I think I agree with Robin on this.
> 
> If I've written on onchange script that needs to apply to every user on
> the system, I don't want to have to special-case the new-domain
> condition with a hack to run my script for postmaster.

Tom,

That's pretty much exactly why I think we should not supress OnChange
calls, but I never managed to articulate it very clearly!

R.



[vchkpw] Re: Segfaulting in vadddomain

2006-06-15 Thread Robin Bowes
Manuzhai wrote:
 > What trips up vpopmail: the localhost line. I'm not sure whether this
> *should* be valid or not, but the extract_domain() function in
> vpopmail.c sure doesn't like it. 

I hit this problem too:

http://sourceforge.net/mailarchive/forum.php?thread_id=9950580&forum_id=34827

R.



[vchkpw] Re: Segfaulting in vadddomain

2006-06-21 Thread Robin Bowes
Rick Widmer wrote:
> Rick Widmer wrote:
> 
>> The fix is in head, and a die is enclosed.
> 
> s/die/diff/

Heh, I was wondering ...

R.



[vchkpw] Re: QMail Forward

2006-08-17 Thread Robin Bowes
Austin Jorden wrote:
> and what's the syntax?
> 

man qmail-control

... shows you that the control file "smtproutes" is used by the program
"qmail-remote".

man qmail-remote

... tells you all you need to know.

Alternatively, I'm sure many folk on this list are available on a
professional consultancy basis if you'd really like it doing for you.

R.



[vchkpw] List of all domains?

2006-08-25 Thread Robin Bowes
Hi,

Just wondering what the canonical way is to get a list of all domains on
a server?

I've come up with this:

vdominfo | \
perl -ne 'if ((/^domain: /) && !(/alias of/)) \
{ s/^domain: //; print; }'

For clarity, the perl code is equivalent to:

while (<>) {
if ( (/^domain: /) && !(/alias of/)) {
s/^domain: //;
print;
}
}

The algorithm is:

For every line:
  if it starts with "domain: " and does not contain the text "alias of"
delete "domain: " from the start of the line
print the line


Any other ideas?

R.



[vchkpw] Mail to all users?

2006-09-04 Thread Robin Bowes
Hi,

In an ISP situation, i.e. with many domains, each with many users,
what's the easiest/best way to send a mail to all users?

Here's my thoughts so far:

vpopbull
 - would need to loop over all domains and run vpopbull once for each
domain - not a major issue
 - Seems to write directly to the Maildir so it ignores any forwards

ezmlm mailing list
 - Would be a bit of a pain to keep all addresses current, i.e. to keep
the list members syncronised with the accounts on the server

Any further ideas?

Thanks,

R.



[vchkpw] Re: Mail to all users?

2006-09-04 Thread Robin Bowes
Tom Collins wrote:
> 
> Or, set up an ezmlm mailing list that doesn't allow users to subscribe
> or unsubscribe.  Before sending an announcement, delete all subscribers
> and re-subscribe them by piping the output of vpopbull -n to ezmlm-sub.

Thought of that.

All very well unless some users want to unsubscribe and not receive the
emails. But I suppose that's only the same as using vpopbull, i.e. all
users would get vpopbull messages and not be able to opt out.

It's a bit of a pain that vpopbull doesn't recognise any forwards. Any
chance of getting that modified?

John's hooks would be a another possible solution. I could setup the
list containing everybody then use a trigger that subs/unsubs users as
they are added/deleted. Might look into that. Did his hook code make it
into the codebase yet?

R.



[vchkpw] Re: List to send email for everybody for domain.

2006-09-22 Thread Robin Bowes
Krzysiek Włodarczak wrote:
> Juliano Souza - Tecnologia napisał(a):
>> How I can build an list [EMAIL PROTECTED] to send emails for everyone for
>> domain?
> 
> Try ezalm: http://www.ezmlm.org/

I've had the same issue. A client (ISP) wants to send mail to all users
in all domains hosted on a particular server.

Creating an ezmlm list for all users would be feasible, but would be
impossible to maintain as users are added/removed.

vpopbull will apparently do this (if you leave off the domain parameter
it apparently sends to all domains) *but* it doesn't recognise any
forwarding settings, i.e. it just drops the mail in the Maildir on the
filesystem without checking .qmail files.

Would it be possible to modify vpopbull so it uses std qmail delivery?

Thanks,

R.


!DSPAM:4513c4ae289661973912509!



[vchkpw] Re: auth error help please - RESOLVED

2006-10-04 Thread Robin Bowes
Dave Richardson wrote:
> Hmmm. Strange.  softlimit raised from 400 to 800 seems to fix it.
> 
> However I'm running softlimit at 400 on a Fedora box without issue.
> I support RH EL4 has "bigger" libraries or more of them?

The RHEL4 box is not 64-bit, by any chance is it?

R.



[vchkpw] Re: [toaster] filtering outgoing emails

2006-10-26 Thread Robin Bowes
John Simpson wrote:
> you are aware that there are other patches out there which do the same
> thing that "chkuser" does, which do work with AUTH, TLS, and SSL, and
> which don't rely specifically on vpopmail (i.e. when you upgrade
> vpopmail you don't have to re-compile qmail)?
> 
> i mention this because i wrote such a patch- instead of looking directly
> at vpopmail's files (or mysql database, or however you have vpopmail
> configured) it reads a single cdb file where the keys are email
> addresses, and the values (for now) are ignored. it also handles
> "-default" addresses in the expected manner (i.e. if the validrcptto.cdb
> file contains "[EMAIL PROTECTED]", qmail-smtpd will accept
> "[EMAIL PROTECTED]".)

I can vouch for this. I'm happily using John's scripts to generate the
CDB. I even wrote an auth plugin for qpsmtpd that uses it. It works great.

R.



[vchkpw] Re: vpopmail sans qmail.

2006-12-15 Thread Robin Bowes
Darrel O'Pry wrote:
> I'm currently considering replacing qmail in my mail systems.
> 
> I was wondering if anyone had tried vpopmail with postfix or exim and
> what their experiences were.
> 
> I'd like to make the mail server change without changing my user
> management tool set. I've got too much tied to vpopmail. 

Which bit of the mail server do you want to change? And why?

I think you'll struggle to remove the local delivery part as vpopmail is
pretty much tied to qmail, but you could always use a different smtp
server as a front end to a system running qmail internally.

Personally, I run qmail/vpopmail with qpsmtpd as the smtpd server.

R.



[vchkpw] Re: spamd vpopmail qmail

2007-02-13 Thread Robin Bowes
kalin mintchev wrote:
>> I was wondering whether it is plain (a) stupidity, (b) ignorance, (c)
>> arrogance, or any combination of these, that made you mail _three_ mailing
>> lists with the same question, none of them being the qmail-scanner mailing
>> list.
>>
>> Don't do that again. Ever.
> 
> or what? you'll sue me, dumbass?! did i insult you intelligence?! or it's
> just pms?!
> 
> now...  ask me again...  politely.

Er, and you expect people to help you?

*plonk*

R.



[vchkpw] Re: Dead aliases and EZMLM lists

2007-04-20 Thread Robin Bowes
Max Esquivel wrote:
> I recently installed the magicmail-smtpd drop in replacement for the
> standard qmail-smtpd, which adds a significant number of spam control
> possibilities.  Actually, spam traffic on my server, dropped to about
> half after the installation.  Nonetheless, after installing, qmailadmin
> created aliases dont work (I can create, modify and delete, but)
> messages sent to an alias result in a "User does not exist" error and
> the message is bounced back.  The same problem exists with ezmlm lists. 
> I can create, modify, etc via qmailadmin, but messages sent to the lists
> get bounced back with the same "User does not exist" error.
> 
> Any ideas?

I've not tried magicmail, but you might like to try qpsmtpd - another
drop-in replacement for qmail-smtpd. I saw similar spam reduction since
installing it. Actually, more like a 90% reduction since activating my
check_validrcptto_cdb plugin [1].

As it's written in perl, with a documented plugin architecture, it's
very easy to extend and customise.

Don't fall into the trap of thinking that because it's written in perl
it's slow - it isn't. Plus, because it can reject so much spam at the
"front door", overall system load is dramatically reduced.

I had one client who was running vanilla qmail and seeing load averages
of up to 30 (!). Since installing qpsmtpd (and my plugin) the system
tickles along at a load average of 0.5.

R.

[1] http://robinbowes.com/projects/check_validrcptto_cdb



[vchkpw] Re: segfault vdeluser 5.4.21

2007-09-21 Thread Robin Bowes
John Simpson wrote:
> On 2007-09-20, at 1236, mlist wrote:
>>
>> Now when I try to delete a user I get a segfault:
>>
>> mail:/home/vpopmail/bin # vdeluser [EMAIL PROTECTED]
>> Segmentation fault
> 
> first, why would you want to delete a domain's "postmaster" mailbox?
> 
> second, i would have thought the vdeluser command, or the vdeluser()
> function, would refuse to delete a "postmaster" mailbox... however
> looking at the code, i see that this is not the case. given that RFC
> 2821 section 4.5.1 seems to say that it's required, is there ever a
> valid reason to allow a postmaster mailbox to be deleted?

Without looking at the RFC, I seem to recall is says that you must
accept mail for [EMAIL PROTECTED] That's not the same as having a
vpopmail user named "postmaster" for the "example.com" domain.

However, it seems to me to be pretty perverse to delete the
[EMAIL PROTECTED] user, replace it with "[EMAIL PROTECTED]" and
then create an alias "[EMAIL PROTECTED]" pointing to
"[EMAIL PROTECTED]" !!!

R.



[vchkpw] Re: Mysql table

2007-09-21 Thread Robin Bowes
Tom Collins wrote:
> On Sep 20, 2007, at 12:56 PM, Rick Widmer wrote:
>> If I remember right, speed was the reason for separate tables, but
>> testing showed it was not faster.  I think the single table works
>> better because all your mail users are accessing the same table, and
>> its indexes so they stay loaded all the time.  If you use separate
>> tables it is always thrashing the cache as different files need to be
>> accessed.
> 
> If we were really looking for speed, we could move to a "ng" (next
> generation) table format that was more relational.  Provide tools to
> migrate from the old to the new for those people who only access the
> data through vpopmail's APIs.  Continue to support the old method for
> people who have home-grown apps that access the data.
> 
> The domains should be in a table of their own, and the users table
> should index the domains table.  Having an index in the users table on
> an int (and the resulting size savings) would be measurable.
> 
> The biggest change would be updating the selects and inserts in the
> code.  Not a huge change -- just a join between the tables.
> 
> Something to consider, and perhaps discuss further (on this list or
> vpopmail-devel).

I understand what you're proposing, but I would suggest that it would
add complexity for little gain. Of course, that would need benchmarking
to establish which is the faster method.

If someone can give me a large dataset, I'm happy to crunch some numbers.

R.



[vchkpw] Re: Mysql table

2007-09-21 Thread Robin Bowes
Rick Macdougall wrote:
> Robin Bowes wrote:
>> Tom Collins wrote:
>>
>> I understand what you're proposing, but I would suggest that it would
>> add complexity for little gain. Of course, that would need benchmarking
>> to establish which is the faster method.
>>
>> If someone can give me a large dataset, I'm happy to crunch some numbers.
>>
>> R.
>>
> 
> How large ?  5k, 15k, 100k ?

What sort of size of database are folk using in the real world? How many
users?

What's the most common no. of users?

R.




[vchkpw] Re: Mysql table

2007-09-21 Thread Robin Bowes
Rick Macdougall wrote:
> Robin Bowes wrote:

>> What sort of size of database are folk using in the real world? How many
>> users?
>>
>> What's the most common no. of users?
>>
>> R.
>>
> 
> I'm guessing 200 - 2000 but that's based on the servers I manage for
> clients (around 20 or so).
> 
> The biggest installation I manage is around 18k users and I could export
> that with munged domain names / passwords if you wanted something that big.


It's hardly worth bothering with for ~2000 users. The difference in
memory/disk use would be minimal.

An 18k user table would be interesting.

R.



[vchkpw] Re: [OT] VPS recommendations to offload spam/virus scanning?

2007-10-25 Thread Robin Bowes
Adam Cantwell wrote:

>> My plan is to do a full Shupp Toaster install, but leave out apache
>> and SquirrelMail.  I'll use rsync from my main server to sync
>> ~vpopmail/domains (minus Maildir directories) so chkuser will work. 
>> I'll sync the appropriate files from /var/qmail/control, and add an
>> smtproutes file built from the rcpthosts and morercpthosts files (it
>> will just point to my server's IP).
>>
> If you're going to split things up, you should look at John Simpson's
> validrcptto patch instead of chkuser.  Only one file needs to be synced
> across.  http://qmail.jms1.net/mailhub.shtml

Taking that concept one step further...

I would run an instance of qpsmtpd [1] with my check_validrcptto_cdb
plugin [2]. You might find you don't even need another server - I found
that the reduction in load caused by rejecting mail at the SMTP
conversation rather than accepting it and bouncing it was quite staggering.

R.

[1] http://smtpd.develooper.com/
[2] http://robinbowes.com/projects/check_validrcptto_cdb



[vchkpw] Re: Qmail rejection of overquota messages instead of bouncing

2007-12-10 Thread Robin Bowes
Tom Collins wrote:
> On Dec 9, 2007, at 6:03 AM, [EMAIL PROTECTED] wrote:
>> I'm using John Simpsons last combined patch... I'm trying to know if I
>> could any way... cause qmail to reject messages at smtp dialogue if users
>> we're trying to deliver is overquota instead of bouncing it... black
>> lists
>> are nowadays becoming quite crazy IMHO but they're know blacklisting this
>> servers who bounce overquota... well infact now all servers that bounce
>> directly... it would be a nice idea to reject messages for overquoted
>> mailboxes...
> 
> 
> I've proposed the following solution, a few times over the years, and I
> still think it's a good one.  It would fit your needs (and most people's
> needs) well.
> 
> Someone needs to make a qmail-smtpd patch that calls an external program
> to verify an account.  That way, there's a single qmail-smtpd patch and
> you can come up with whatever program (chkuser, validrcptto, etc.) you
> want to verify an account.
> 
> You'd pass in the sender's address and the attempted recipient address. 
> The program can have different exit codes for different conditions, and
> can even output a custom reject message.  This would allow for handling
> lots of conditions:
> 
> * Temporary failure, user is over quota
> * Permanent failure, user is over quote
> * Permanent failure, account does not exist
> * Permanent failure, "account closed, please use [EMAIL PROTECTED] instead"
> * Accepted
> * Accepted (by catchall)
> * Rejected, "this account does not accept mail from [EMAIL PROTECTED]"
> 
> Hopefully someone with some time on their hands will take this on.

Alternatively, replace qmail-smtpd with qpsmtpd and use one of the many
plugins.

R.


!DSPAM:475d9dcf32001128017368!



[vchkpw] Re: Qmail Tap tap only incoming mail

2008-04-24 Thread Robin Bowes

Andrew Niemantsverdriet wrote:

Is it possible to make Qmail tap only tap the incoming mail? My
problem is that I am trying to get mail to deliver to two places to
ease the transition to a new mail server. Qmail tap allows that
functionality but breaks down on inter-domain email. The person who
sends it typically gets the mail in the new mail box and the person
receiving it does not get a copy depending on where the names are in
the qmail  tap control file. Is there a way to make qmail tap do what
I want it to do or is there a better solution?


There's a better solution.

Set up qmail-qmqpd on the new server.

Replace qmail-queue with a symlink to qmail-qmqpc in the old server.

See [1], and [2].

R.

1. http://cr.yp.to/qmail/mini.html
2. "qmail", John R. Levine, O'Reilly


!DSPAM:4810d3e7120501023650739!



[vchkpw] Re: vhostadmin problem (KMM6374095I87L0KM)

2008-06-17 Thread Robin Bowes

Wouter van der Schagt wrote:

Just ignore it and delete it.

- Original Message - From: "f m" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, June 17, 2008 11:37 PM
Subject: Re: [vchkpw] vhostadmin problem (KMM6374095I87L0KM)



Can someone/anyone explain what this email to the list is, and how it
might have happened?

thanks,

ComputekIE


And please, try to trim replies and don't top post.

R>


!DSPAM:4857e33032358287619993!