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

Re: [vchkpw] [OT] Recommened Mailing List Manager

2005-11-28 Thread Rick Macdougall

Andrew Niemantsverdriet wrote:

Dose anybody have a mailing List Manager that they would recommend? We
are currently using ezmlm and are unhappy with being able to moderate
messages sent (as in it does not work like it should) and moderators not
being able to post to a moderated list.

Of course it needs to work well with vpopmail and qmail :)



Ezmlm works fine here and moderators can do what they wish.

I think maybe you need to check your settings.

There are some ezmlm settings that you need to set for mods to post 
instantly that are not available in qmailadmin, man ezmlm for more help.


I have run MailMan under qmail/vpopmail but it was a hassle and ezmlm 
worked much better.


Regards,

Rick



[vchkpw] [OT] Recommened Mailing List Manager

2005-11-28 Thread Andrew Niemantsverdriet
Dose anybody have a mailing List Manager that they would recommend? We
are currently using ezmlm and are unhappy with being able to moderate
messages sent (as in it does not work like it should) and moderators not
being able to post to a moderated list.

Of course it needs to work well with vpopmail and qmail :)



Re: [vchkpw] vpopmail + ldap addressbook questions

2005-11-28 Thread Will Stringer

Thanks.

Though this isn't exactly what I would like to do, I used it to make 
several scripts that tie in with qmailadmin's hooks.  As soon as I have 
some time to clean them up a bit I will post them somewhere.


--
Will


On Sat, 26 Nov 2005, [EMAIL PROTECTED] spewed forth with great vigilance:


hi,

i.m using mysql+vpopmail configuration and export users with scripts

i have created 3 scripts in sequence for export users of vpopmail to LDAP

1- LDAP REMOVE - Execute the command (ldap_remove.sh > remove.ldif)
2- LDAP CREATE OU - Execute the command (ldap_create_ou.sh > ou.ldif)
3- LDAP IMPORT USERS - Execure the comand (ldap_create.sh > users.ldif)

After the files .ldif created, import to LDAP using ldapadd.

OBS: config the outlook and webmail to access the base for LDAP
(ou=Addressbook,dc=teste)

Verify the scripts bellow:

# ldap_remove.sh ###
date > /usr/util/Gerar_OU_Lista_Remocao.log
for domains in `ls ~vpopmail/domains`
do
   OU="$domains"
   OBJCLASS1="objectClass: top"
   OBJCLASS2="objectClass: organizationalUnit"
   DN="ou=$domains,ou=AddressBook,dc=test"

   printf "$DN\n"

done

date >> /usr/util/Gerar_OU_Lista_Remocao.log
exit 1

# ldap_rcreate_ou.sh ###
#!/bin/bash

date > /usr/util/Gerar_OU_Lista.log
for domains in `ls ~vpopmail/domains`
do
   OU="$domains"
   OBJCLASS1="objectClass: top"
   OBJCLASS2="objectClass: organizationalUnit"
   DN="ou=$domains,ou=AddressBook,dc=test"

   printf "dn: $DN\n"
   printf "ou: $domains\n"
   printf "$OBJCLASS1\n"
   printf "$OBJCLASS2\n\n"
done

date >> /usr/util/Gerar_OU_Lista.log
exit 1
# ldap_create_ou.sh ###

# ldap_create.sh ###
#!/bin/bash

date > /usr/util/Gerar_Lista.log
for domains in `ls ~vpopmail/domains`
do
   OBJO=`echo $domains|cut -d. -f1`

   for NOME in `/home/vpopmail/bin/vuserinfo -D "$domains" -n`
   do
   MAIL="[EMAIL PROTECTED]"
   CN=`~vpopmail/bin/vuserinfo -c $MAIL`
   OBJCLASS1="objectClass: top"
   OBJCLASS2="objectClass: inetOrgPerson"
   DN="$CN,OU=$domains,OU=AddressBook,dc=test"

   printf "dn: cn=$DN\n"
   printf "mail: $MAIL\n"
   printf "cn: $CN\n"
   printf "sn: $CN\n"
   printf "o: $OBJO\n"
   printf "$OBJCLASS1\n"
   printf "$OBJCLASS2\n"
   printf "\n"
   done
done
date >> /usr/util/Gerar_Lista.log
exit 1
# ldap_create.sh ###




I have successfully setup the LDAP authentication backend for vpopmail
without too many problems, and it is working.  What I would like to do now
is integrate this with an LDAP addressbook for my corporate users.  I
haven't had much luck in finding definate solutions for this yet, so I'm
hoping someone here has done this before.

--
Will







--
Will


[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?