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



Re: [vchkpw] nasty bug: vpopmail 5.4.10 vdeldomain on alias destroys original domain

2006-03-27 Thread Tom Collins

On Mar 24, 2006, at 4:01 PM, Kurt Bigler wrote:
I'm sure.  I triple checked.  I have a text file of the shell session. 
 I've

attached a contiguous unedited excerpt from the shell session.


I'm not familiar with how versions of vpopmail prior to the 5.4 series 
handled alias domains, but the directory structure in the shell session 
you posted doesn't match the way alias domains are handled now.


When you run vdeldomain, it looks in /var/qmail/users/assign to find 
the domain.  If it's an alias (the first two columns don't match), it 
just deletes the domain from the /var/qmail/control/* and 
/var/qmail/users/assign files.


If the old way of handling alias domains was to create unique entries 
in users/assign and then use links to map the directories, I could see 
how vdeldomain could end up deleting the underlying directory.  I'll 
make a note to look at vdeldomain and have it act differently if the 
domain directory is a link to another directory.


--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/



Re: [vchkpw] qmail-inject deferrals

2006-03-27 Thread Tom Collins

On Mar 27, 2006, at 11:49 AM, Jeremy Kister wrote:

On 3/25/2006 12:25 PM, Jeremy Kitchen wrote:

In the interim, I'm still looking for opinion on whether or not the
proposed patch makes everyone happy.  I tested it briefly, and it 
seems
to deal with fatal, deferral, and successful qmail-inject codes 
correctly.

looks good to me, but it's still a bandaid imo.



Tom,

Can you tell me if you're going to accept the given patch for the next 
release?


I haven't had a chance to look closely at it, but I will probably 
include it in the next release.


Regardless of whether using qmail-inject over qmail-queue is a 
band-aid, we should be looking at the exit code and behaving properly.


--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/



Re: [vchkpw] nasty bug: vpopmail 5.4.10 vdeldomain on alias destroys original domain

2006-03-27 Thread Kurt Bigler
on 3/27/06 11:45 AM, Tom Collins [EMAIL PROTECTED] wrote:

 On Mar 24, 2006, at 4:01 PM, Kurt Bigler wrote:
 I'm sure.  I triple checked.  I have a text file of the shell session.
 I've
 attached a contiguous unedited excerpt from the shell session.
 
 I'm not familiar with how versions of vpopmail prior to the 5.4 series
 handled alias domains, but the directory structure in the shell session
 you posted doesn't match the way alias domains are handled now.
 
 When you run vdeldomain, it looks in /var/qmail/users/assign to find
 the domain.  If it's an alias (the first two columns don't match), it
 just deletes the domain from the /var/qmail/control/* and
 /var/qmail/users/assign files.

It looks like for my old alias domains, the first two columns do match, but
the pathname column doesn't:

+middendorfbreath.org-:middendorfbreath.org:89:89:/var/vpopmail/domains/midd
endorfbreath.com:-::

which is curious since there is no reference to the directory symlink.

 If the old way of handling alias domains was to create unique entries
 in users/assign and then use links to map the directories, I could see
 how vdeldomain could end up deleting the underlying directory.  I'll
 make a note to look at vdeldomain and have it act differently if the
 domain directory is a link to another directory.

Yes, I created those alias domains long ago.

I don't think there was any utility to run to do a conversion of domain
aliases?  I'm pretty sure I read the readme pretty carefully whenever I did
an upgrade.  Did I miss something?

So what *should* I do now with all my old-style domain aliases?  Do I have
to mess with the qmail config files by hand?  I'm happy to just delete the
old domain aliases and recreate them the new way.  Should I just:

delete the lines from /var/qmail/users/assign

remove the directory symlinks

or if there something else in the qmail configuration that I need to change
somewhere.  I've really always depended on vpopmail to do these things so I
don't know my way around qmail.

Is there anyone who remembers enough about how things were done that many
years back?

Thanks.

-Kurt



Re: [vchkpw] converting old-style domain aliases to the new style

2006-03-27 Thread Tom Collins

On Mar 27, 2006, at 12:51 PM, Kurt Bigler wrote:

Yes, I created those alias domains long ago.

I don't think there was any utility to run to do a conversion of domain
aliases?  I'm pretty sure I read the readme pretty carefully whenever  
I did

an upgrade.  Did I miss something?

So what *should* I do now with all my old-style domain aliases?  Do I  
have

to mess with the qmail config files by hand?


The easiest/safest would be to do the following

Edit the users/assign file as follows.  Change lines like this:

+middendorfbreath.org-:middendorfbreath.org:89:89:/var/vpopmail/ 
domains/middendorfbreath.com:-::


To:

+middendorfbreath.org-:middendorfbreath.com:89:89:/var/vpopmail/ 
domains/middendorfbreath.com:-::


i.e., get the second entry to match the directory name (the real  
domain for the alias).  This assumes that domains/middendorfbreath.com  
is the real directory that the various symlinks point to.


Run /var/qmail/bin/qmail-newu to recreate the users/cdb file from  
users/assign.


Check the vpasswd files for the alias domains and see what they're  
using for the Maildir paths.  If they're using the real directory,  
you can safely remove the symlinks in ~vpopmail/domains.


--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/



Re: [vchkpw] relay, smtp after pop

2006-03-27 Thread Andrew Simon
Wanted to thank everyone for their input. It turned out to be an outlook 
issue. Once we set it to pop first the problem went away. Thank you Jeremy


Andrew

.
- Original Message - 
From: Paul Theodoropoulos [EMAIL PROTECTED]

To: vchkpw@inter7.com
Sent: Friday, March 24, 2006 5:08 PM
Subject: Re: [vchkpw] relay, smtp after pop



At 02:02 PM 3/24/2006, you wrote:

On Friday 24 March 2006 12:39, Paul Theodoropoulos wrote:
 At 11:47 AM 3/24/2006, Michael Krieger wrote:
 unless you're doing it in mysql. which works dandy.

or with Bruce Guenter's relay-ctrl package, which doesn't involve any
overly-specific hacks to tcpserver.

http://untroubled.org/relay-ctrl


perhaps, but the existing patch to tcpserver is extremely tiny, and 
doesn't interfere with use for other purposes. i personally don't have a 
problem with hacks. otherwise, i wouldn't be running qmail (and the dozen 
or more needed hacks for assorted shortcomings, however minor).



Paul Theodoropoulos
http://www.anastrophe.com
http://www.smileglobal.com
http://www.forumgarden.com











RE: [vchkpw] Re: 5.4.15 onchange patch

2006-03-27 Thread Charles J. Boening
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.

I guess it would depend on where in the process a non-existing user
directory gets created.  If vdelivermail does it or if it's done higher
up the chain.  If vdelivermail creates the initial directory then you'd
want to call your script afterwords.  This is all assuming you're just
putting users into a database and letting vpopmail auto create the
directory when a user checks their email or gets their first email.

Charlie
 

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Robin Bowes
 Sent: Monday, March 27, 2006 10:04 AM
 To: vchkpw@inter7.com
 Subject: [vchkpw] Re: 5.4.15 onchange patch
 
 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.
 
 


Re: [vchkpw] qmail-inject deferrals

2006-03-27 Thread Jeremy Kister
On 3/27/2006 3:12 PM, Tom Collins wrote:
 I haven't had a chance to look closely at it, but I will probably 
 include it in the next release.
 
 Regardless of whether using qmail-inject over qmail-queue is a 
 band-aid, we should be looking at the exit code and behaving properly.

Here's [what seems to be] the correct way to fix the problem:

--- vdelivermail.c.orig 2006-03-27 21:58:21.810949000 -0500
+++ vdelivermail.c  2006-03-27 21:58:52.741031000 -0500
@@ -672,8 +672,9 @@

   close(fdm);
   waitpid(inject_pid,child,0);
-  if (wait_exitcode(child) == 0) return;
-  vexiterr (EXIT_DEFER, system error);
+  unsigned int xcode = wait_exitcode(child);
+  if (xcode == 0) return;
+  vexiterr (xcode, system error);
 }
 }

-- 

Jeremy Kister
http://jeremy.kister.net./




RE: [vchkpw] Re: 5.4.15 onchange patch

2006-03-27 Thread Michael Krieger
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 parameters and programs \   /home/vpopmail/bin/vchkpw \  
 /var/qmail/bin/linkwrapper \   /var/qmail/bin/bincimapdI 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.-M

Re: [vchkpw] nasty bug: vpopmail 5.4.10 vdeldomain on alias destroys original domain

2006-03-27 Thread Rick Widmer

Tom Collins wrote:


On Mar 24, 2006, at 4:01 PM, Kurt Bigler wrote:

I'm sure.  I triple checked.  I have a text file of the shell session. 
 I've

attached a contiguous unedited excerpt from the shell session.



I'm not familiar with how versions of vpopmail prior to the 5.4 series 
handled alias domains, but the directory structure in the shell session 
you posted doesn't match the way alias domains are handled now.



I believe you will find in 5.4.13 that


vadddomain one.com password

vaddaliasdomain two.com one.com

vdeldomain one.com


Will delete one.com, and all of ~vpopmail/domains/one.com/, but leave 
traces of two.com in /var/qmail/control and /var/qmail/users.  The fix 
is already in 5.4.15 where the vdeldomain command will complain that 
virtual domains exist, list them, and suggest you use the -f flag to 
force the delete if you want to.  If the -f flag is used, it will delete 
each of the virtual domains before the parent.



I just tested it with Bill Shupp's toaster based on vpopmail 5.4.13, but 
including his patch to add the daemaon.  I was getting ready to send a 
patch, but when I looked at 5.4.15 it was already there.



Rick






Re: [vchkpw] converting old-style domain aliases to the new style

2006-03-27 Thread Kurt Bigler
on 3/27/06 1:36 PM, Tom Collins [EMAIL PROTECTED] wrote:

 On Mar 27, 2006, at 12:51 PM, Kurt Bigler wrote:
 So what *should* I do now with all my old-style domain aliases?  Do I
 have
 to mess with the qmail config files by hand?
 
 Edit the users/assign file as follows.  Change lines like this:
 
 +middendorfbreath.org-:middendorfbreath.org:89:89:/var/vpopmail/
 domains/middendorfbreath.com:-::
 To:
 +middendorfbreath.org-:middendorfbreath.com:89:89:/var/vpopmail/
 domains/middendorfbreath.com:-::
 
 i.e., get the second entry to match the directory name (the real
 domain for the alias).  This assumes that domains/middendorfbreath.com
 is the real directory that the various symlinks point to.
 
 Run /var/qmail/bin/qmail-newu to recreate the users/cdb file from
 users/assign.
 
 Check the vpasswd files for the alias domains and see what they're
 using for the Maildir paths.  If they're using the real directory,
 you can safely remove the symlinks in ~vpopmail/domains.

Thanks a bunch.  Looks like I've got everything conforming to the modern
ways now.

-Kurt