Re: [vchkpw] Re: vpopmaild patch

2006-06-16 Thread Rick Macdougall

Dmitriy MiksIr wrote:

* check_size
Syntax: check_size [EMAIL PROTECTED] requested_size[K|M]
Check quota of user and of domain. If current disk usage plus 
requested_size more than quota, answer is -ERR, else say +OK


* check_user
Syntax: check_user [EMAIL PROTECTED]
Check exist of [EMAIL PROTECTED] Answer is +OK, if [EMAIL PROTECTED] valid user, 
alias, maillist. Else, answer is -ERR, if [EMAIL PROTECTED] not exist or user 
set bounce_all_mail flag.




Hi Dmitriy,

Thanks for the patches but you might want to post them to the 
vpopmail-devel list at http://sourceforge.net/mail/?group_id=85937 
instead of to the main user list.


Regards,

Rick



Re: [vchkpw] Re: Vpopmaild backport to 5.4.13

2006-01-12 Thread Joshua Megerman

> 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. :)
>
1) I only just got into doing vpopmail development, so I didn't know about
that.
2) My only attempts to extract the current CVS version have met with
"connection refused", so I haven't even looked at the CVS code.
3) I needed to figure out if I could use vpopmaild or if I had to roll my
own, and I needed to figure it out _NOW_ :)

Josh
-- 
Joshua Megerman
SJGames MIB #5273 - OGRE AI Testing Division
You can't win; You can't break even; You can't even quit the game.
  - Layman's translation of the Laws of Thermodynamics
[EMAIL PROTECTED]




Re: [vchkpw] Re: vpopmaild

2005-11-28 Thread John Simpson

On 2005-11-28, at 0715, Robin Bowes wrote:

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.


i actually found vpopmaild.c and a "README.vpopmaild" file which  
"sorta" documents the protocol, in the vpopmail CVS area. my problem  
is that i haven't spent a lot of time dealing with vpopmail's  
internal data structures, and to be honest their variable naming  
scheme (i.e. "TheDomain", "ThePassword", etc.) just feels too  
"microsoft-ish" for me. i know it's legal and it works, it just  
leaves me feeling like i need to wash my hands after i look at it...


what i'm wondering is this- if all it uses is the functions exposed  
through libvpopmail, it should be possible to make it a separate  
package for those who need it. it would be usable for a qmail SMTP  
AUTH patch (qmail-smtpd would connect, send a "login" command, see if  
the first byte of the response is "+" or "-", then send a "quit" and  
disconnect) and with as many commands as are there, it looks like  
qmailadmin could use it instead of having to be compiled against  
libvpopmail, same for vqadmin (which REALLY needs updating), and  
anybody who wanted to roll their own program could use it as well.


another idea which occurred to me last night when i wrote that email,  
was a server that "worked the same" as vpopmaild (in terms of the  
command/response structure through the socket) but instead of calling  
libvpopmail functions, it would call courier-authlib functions. i  
threw together a quick-n-dirty little program that supports "login",  
"help", and "quit", and i plan on using this to test my qmail-smtpd  
patch- and once vpopmaild is ready for prime time (either as part of  
the main vpopmail package, or as a stand-alone package) a user with  
my patch would be able to use either vpopmaild or my "courierauthd"  
program, depending on their needs.



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...


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.



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.)


--
| John M. Simpson - KG4ZOW - Programmer At Large |
| http://www.jms1.net/   <[EMAIL PROTECTED]> |
--