Re: [vchkpw] Re: 5.4.15 onchange patch
On 2006-03-27, at 1304, Robin Bowes wrote: 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]" i guess it's not impossible... i hadn't thought of doing that, but it shouldn't be hard. looking at the code, i guess we can have the script be called with a command line consisting of: - a command (to tell what was done.) the commands would be the same commands which are used in vpopmaild (i.e. "add_domain", "del_domain", "add_alias_domain", "add_user", "del_user", and "mod_user"... the only question is how to handle calls to valias_insert(), valias_remove(), and valias_delete()- what command should they put on the script's command line? for now i'll just go with the function names- "valias_insert", "valias_remove", and "valias_delete". the valias_insert() function adds a line to an existing alias, or if it doesn't exist, it creates an alias. the valias_remove() function removes an existing line from an alias. if that was the last line, the alias is deleted. the valias_delete() function removes all lines from an alias, deleting it. i don't know what bearing this might have on somebody's script some day, but i figure it doesn't hurt to document it somewhere. - the target of that command. for "add_domain", "del_domain", and "add_alias_domain", the target is the domain name. for all other commands, the target is the mailbox or alias which is being operated on. that's all. no passwords, no alias targets, nothing else. if a user's script needs more information, they can read whatever file or database holds the data directly. and i was right, it wasn't that hard. same web page. 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.) http://qmail.jms1.net/vpopmaild.shtml shows a clearer example of how to run vpopmaild under daemontools, by the way. -- | John M. Simpson - KG4ZOW - Programmer At Large | | http://www.jms1.net/ <[EMAIL PROTECTED]> | -- | Mac OS X proves that it's easier to make UNIX | | pretty than it is to make Windows secure. | -- PGP.sig Description: This is a digitally signed message part
Re: [vchkpw] /var/qmail/alias/.qmail-user
On 2006-03-28, at 0606, Jimmy Stewpot wrote: I have a server that is setup as having vpopmail installed to run all of the emails without having system accounts. I have got users on the system that have cronjobs running. If those users have a crontab that runs and has an error it will email [EMAIL PROTECTED] the hostname of the server does not have a virtual host setup in vpopmail but I have put aliases into /var/qmail/aliases/.qmail- username. if the system user exists, you would need to create a ".qmail" file in the home directory of the user. /var/qmail/aliases only comes into play when the system userid does not exist. I would have expected that to route the email over to the users vpopmail account however it does not work. Any sugestions? or am I missing something totally stupid? most cron implementations support a MAILTO="[EMAIL PROTECTED]" variable in the crontab file. -- | John M. Simpson - KG4ZOW - Programmer At Large | | http://www.jms1.net/ <[EMAIL PROTECTED]> | -- | Mac OS X proves that it's easier to make UNIX | | pretty than it is to make Windows secure. | -- PGP.sig Description: This is a digitally signed message part
[vchkpw] patch for vmysql.c
hi: I have written a patch for vmysql.c,if 'read_open' is 1,but mysql server have close this connection,vpopmail will report error: "MySQL server has gone away" . Mysql_ping checks whether the connection to the server is working. If the connection have closed, then reconnec. PATCH===diff -u vpopmail-5.4.13.org/vmysql.c vpopmail-5.4.13/vmysql.c--- vpopmail-5.4.13.org/vmysql.c 2004-12-16 23:57:34.0 +0800+++ vpopmail-5.4.13/vmysql.c 2006-03-30 21:29:40.0 +0800@@ -238,7 +238,7 @@ int vauth_open_read() { /* if we are already connected, just return */ - if ( read_open != 0 ) return(0);+ if ( read_open && (mysql_ping(&mysql_read)==0) ) return(0); read_open = 1; /* connect to mysql and set the database */=END Jianbin XiaoComsenz Technology Ltd-- ===DQPI Polaris BBSMartin Xiao===
[vchkpw] Re: 5.4.15 onchange patch
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] Global addressbook support
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, everyone. We're currently working on a project to integrate automatic updates to a global addressbook via vpopmail's API. During a meeting, we discussed using the hook features, rather than directly modifying the vpopmail API to call OpenLDAP functions. Firstly, is there anyone who is actively working on the hook support, and secondly, is there anyone who can think of a reason to integrate the addressbook support directly into vpopmail rather than via oncall hooks? Just an FYI, we've created a structure that works well with every addressbook software we've been able to test with. We're going to end up releasing a beta package for everyone to look at. Hopefully we can get some good input at that time. Thanks, and sorry for the secondary related thread. - -- /* Matt Brookings <[EMAIL PROTECTED]> GnuPG Key B7B54216 Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFELD4fhzYRRre1QhYRAr2hAJ9ORBLr4l8l/8paat/KC+Eb3TADNACfS8Xs H26zLPz0zGuiacyx3CLMXLg= =p4pN -END PGP SIGNATURE-
[vchkpw] (5.4.13) ./configure insists on installing in /home/vpopmail/vpopmail
I want to install vpopmail in /home/vpopmail. As with previous installs with older version, I was expecting a directory structure like /home/vpopmail/{bin,doc,domains,etc}, instead I received a directory structure like /home/vpopmail/vpopmail/ {bin,doc,domains,etc} (note the doubling of vpopmail in the path). I used the following line to configure vpopmail: ./configure --disable-rebuild-tcpserver-file --enable-qmail-ext -- enable-auth-module=mysql --enable-mysql-limits --enable-sql-logging -- enable-valias --prefix=/home After it finishes, it tells me: vpopmail directory = /home/vpopmail/vpopmail I also tried without --prefix and HOME=/home ./configure ... --prefix= $HOME to no avail. How can I get the result I expected? -- Regards, Charles.
Re: [vchkpw] (5.4.13) ./configure insists on installing in /home/vpopmail/vpopmail
On 31-mrt-2006, at 1:18, Charles M. Gerungan wrote: I want to install vpopmail in /home/vpopmail. As with previous installs with older version, I was expecting a directory structure like /home/vpopmail/{bin,doc,domains,etc}, instead I received a directory structure like /home/vpopmail/vpopmail/ {bin,doc,domains,etc} (note the doubling of vpopmail in the path). Oh, please, not again. Why does the solution always present itself after you press send... Anyway, I got the same results with 5.4.10, so I checked /etc/passwd. Lo and behold, the home directory was set to /home/vpopmail/vpopmail. After changing this all was well. Sorry. -- Regards, Charles.
[vchkpw] Re: patch for vmysql.c
Patch update.diff -u vpopmail-5.4.13.org/vmysql.c vpopmail-5.4.13/vmysql.c--- vpopmail-5.4.13.org/vmysql.c 2004-12-16 23:57:34.0 +0800+++ vpopmail-5.4.13/vmysql.c 2006-03-31 09:42:45.0 +0800@@ -188,7 +188,7 @@ { unsigned int timeout = 2;- if ( update_open != 0 ) return(0); + if ( update_open && (mysql_ping(&mysql_update)==0) ) return(0); update_open = 1; verrori = load_connection_info();@@ -238,7 +238,7 @@ int vauth_open_read() { /* if we are already connected, just return */ - if ( read_open != 0 ) return(0);+ if ( read_open && (mysql_ping(&mysql_read)==0) ) return(0); read_open = 1; /* connect to mysql and set the database */
Re: [vchkpw] Re: 5.4.15 onchange patch
On 2006-03-30, at 1019, Robin Bowes wrote: John Simpson wrote: http://qmail.jms1.net/vpopmaild.shtml shows a clearer example of how to run vpopmaild under daemontools, by the way. Clearer than what? clearer that the first few lines of README.vpopmaild from the source code, which are simply... To run as daemon: tcpserver -vHRD 0 89 ./vpopmaild Then as client telnet localhost 89 Or to run on the command line for testing ./vpopmaild if you don't have a copy of the 5.4.15 source, you can find this file in the CVS repository, or i have a local copy of the file on my web site. http://qmail.jms1.net/README.vpopmaild these directions made perfect sense to me, because i've been using tcpserver and daemontools for years. however this might be a stretch for a lot of people (especially the typical "qmailrocks" user) so i wrote something a little more detailed. and because i can hear people asking in the back of their minds why i care about qmailrocks users... when eric first put together the qmailrocks package, he used my combined patch file- and since then qmailrocks people have been sending all of their questions to me, because eric has seemingly abandoned the qmailrocks web site. i figure i'll be a nice guy and answer some of their questions, especially those rare "good questions" that make me think... but if the question shows that the person is just too lazy to do their own research, fsck'em. my only answer for lazy people is the URL of one of my favourite web pages, one that i feel should be required reading before anybody gets on the internet... http://www.catb.org/~esr/faqs/smart-questions.html -- | John M. Simpson - KG4ZOW - Programmer At Large | | http://www.jms1.net/ <[EMAIL PROTECTED]> | -- | Mac OS X proves that it's easier to make UNIX | | pretty than it is to make Windows secure. | -- PGP.sig Description: This is a digitally signed message part
Re: [vchkpw] Re: 5.4.15 onchange patch
John Simpson wrote: http://qmail.jms1.net/vpopmaild.shtml shows a clearer example of how to run vpopmaild under daemontools, by the way. Nice page! Just a thought... if you are only using vpopmaild to verify user logins, you might want to use the compact flag. login [EMAIL PROTECTED] password compact this will reduce the amount of trash you have to ignore by returning the numeric GID flags value rather than sending a line per bit. Rick
Re: [vchkpw] Global addressbook support
On 2006-03-30, at 1522, Matt Brookings wrote: We're currently working on a project to integrate automatic updates to a global addressbook via vpopmail's API. During a meeting, we discussed using the hook features, rather than directly modifying the vpopmail API to call OpenLDAP functions. Firstly, is there anyone who is actively working on the hook support, 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. if you're talking about some other kind of "hook support", where can i find out more? if there was already an API in progress for this kind of thing, i should probably re-write my "oncall" patch to conform with that API, just for the sake of causing a minimum of interference with projects that others may be working on. and secondly, is there anyone who can think of a reason to integrate the addressbook support directly into vpopmail rather than via oncall hooks? by "addressbook support" i'm guessing you mean setting up and automatically maintaining a company-wide LDAP directory which automatically contains all mailboxes, with entries added, deleted, and changed as mailboxes are added, deleted, or changed within the vpopmail system. i don't know for sure, but i'm guessing that the number of people out there who are using an LDAP address book is a rather small percentage of the number of people running vpopmail- at least not a large enough number to justify adding this functionality to vpopmail's code. of course a big part of this is that openldap is a royal pain, but that's a topic for some other time... having a generic "oncall" hook which can be "doctored" to work as an LDAP directory updater is actually a really good idea. it's funny- i wrote the "oncall" stuff to handle asynchronously rebuilding the "validrcptto.cdb" file on my own server, and wasn't sure others would have a use for it- but now the list has turned up two other ideas, and i'm sure others are coming. Just an FYI, we've created a structure that works well with every addressbook software we've been able to test with. We're going to end up releasing a beta package for everyone to look at. Hopefully we can get some good input at that time. cool, i look forward to playing with it. is it in the CVS somewhere that i can take a sneak peek? -- | John M. Simpson - KG4ZOW - Programmer At Large | | http://www.jms1.net/ <[EMAIL PROTECTED]> | -- | Mac OS X proves that it's easier to make UNIX | | pretty than it is to make Windows secure. | -- PGP.sig Description: This is a digitally signed message part