From Elma Velez" --_AC_C_5BD7E2.E051_..D48 Content-Type: text/html; Content-Transfer-Encoding: quoted-printable
•••Accidents aren't supposed to happen•̶= 6•
...but you ca= n prepare for them.
Save up to 70= %
on Term Life Ins= urance

Click Here for
a FREE Quote


We can't predict= the future.
However, we can take steps to insure the future happiness of our lo= ved ones. One way is to secure your family's peace of mind is by finding the right Lif= e Insurance Policy. Select from the nation's top companies, and save money. Get a FREE Quote Now!
Protect Your Family from Uncertainty: Quick FREE Quotes, No = Hassle, No Obligation
click here to be removed.
xqhxvbtpou es n ku icsvkyfdklagayhs mmhatn xcktuwqnay arm --_AC_C_5BD7E2.E051_..D48-- From dan at scarfies.net Fri Jul 11 00:17:43 2003 From: dan at scarfies.net (Dan Clark) Date: Fri, 11 Jul 2003 11:17:43 +1200 Subject: [tpop3d-discuss] New tpop3d.conf file from scratch... Message-ID: <005301c34739$7a7aec10$3c301fac@wickliffe.co.nz> Hi Guys, Just setup exim with mysql backend for storing domain and username details. Now I am setting up 'tpop3d'. So I have edited tpop3d.conf and so far have this... listen-address: 0.0.0.0 max-children: 20 mailbox: bsd:/var/mail/$(user) auth-mysql-enable: yes auth-mysql-hostname: blaa.scarfies.net auth-mysql-database: mail auth-mysql-username: blaa auth-mysql-password: blaa Now the problem I am having is 'incorrect password' for anything I try to authenticate with. I have try appending the domain name on the end and everything, can you tell me what are the actual default table names auth-mysql looks for, (my database is 'mail' and the domains table is 'domain' and the users table is 'users') Regards Dan Clark From chris at ex-parrot.com Fri Jul 11 11:22:41 2003 From: chris at ex-parrot.com (Chris Lightfoot) Date: Fri, 11 Jul 2003 11:22:41 +0100 Subject: [tpop3d-discuss] New tpop3d.conf file from scratch... In-Reply-To: <005301c34739$7a7aec10$3c301fac@wickliffe.co.nz> References: <005301c34739$7a7aec10$3c301fac@wickliffe.co.nz> Message-ID: <20030711102241.GA10738@aquila.esc.cam.ac.uk> On Fri, Jul 11, 2003 at 11:17:43AM +1200, Dan Clark wrote: > I have try appending the domain name on the end and everything, can you tell > me what are the actual default table names auth-mysql looks for, (my > database is 'mail' and the domains table is 'domain' and the users table is > 'users') -- described in README.auth_mysql in the distribution. There's a different example in the tpop3d.conf(5) man page. -- ``All I ever learned from National Service was skiving and petty theft.'' (John Peel) From olrick at rainbow.winterbird.net Mon Jul 14 22:23:05 2003 From: olrick at rainbow.winterbird.net (Yann GROSSEL) Date: Mon, 14 Jul 2003 23:23:05 +0200 Subject: [tpop3d-discuss] A few patches Message-ID: <20030714232305.1dceb222.olrick@rainbow.winterbird.net> This is a multi-part message in MIME format. --Multipart_Mon__14_Jul_2003_23:23:05_+0200_08277a98 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello Here are a few small patches I've done this week-end. They are against the current CVS repository. Please tell me what you think of them. configure.in.diff: - makes the configure script abort with an error message if no authentication driver is enabled - always detects if libcrypt is needed no matter what authentication drivers are selected (password.c uses the crypt() function in check_password() and it is always compiled in) main.c.diff: 'configfile' was missing in one of the log_print() calls tpop3d.conf.5.diff: fixes a few typos auth_flatfile.c.diff: this one fixes a bug that made read_user_passwd() return the pwhash of the last line of the flat file if the localpart supplied was not found in the file. This allowed someone knowning the last password in the file to log in with any (non existent) username password.c.diff: this one fixes two bugs in the check_password() function : - the default scheme was used to check the hash even if a different scheme was specified in the hash (for example it prevented the use of {md5} hashes in flat files, because {crypt} was always checked first and of course the check always failed) - the check against md5 hash was inversed, allowing users to log in with any password but the right one connection.c.diff: tpop3d crashed when the user issued a 'TOP' command on a empty mailbox or message (OK, empty mailboxes or messages should never happen, but if we can make tpop3d harder to crash even in unexpected situations...) warnings.diff: removes a few warnings (mainly "missing braces around initializer") (one warning remains at listener.c:59 - I think the alloc_struct macro should be fixed but I don't know the right fix to apply) -- Olrick --Multipart_Mon__14_Jul_2003_23:23:05_+0200_08277a98 Content-Type: text/plain; name="configure.in.diff" Content-Disposition: attachment; filename="configure.in.diff" Content-Transfer-Encoding: 7bit diff -ruN tpop3d-cvs/configure.in tpop3d/configure.in --- tpop3d-cvs/configure.in 2003-01-10 00:20:23.000000000 +0100 +++ tpop3d/configure.in 2003-07-13 13:39:10.000000000 +0200 @@ -337,6 +337,18 @@ AC_DEFINE(AUTH_PERL,1,[Use an embedded perl interpreter for authentication.]) fi +if test x"$enable_auth_pam" != x"yes" \ +&& test x"$enable_auth_passwd" != x"yes" \ +&& test x"$enable_shadow" != x"yes" \ +&& test x"$enable_auth_mysql" != x"yes" \ +&& test x"$enable_auth_ldap" != x"yes" \ +&& test x"$enable_auth_flatfile" != x"yes" \ +&& test x"$enable_auth_other" != x"yes" \ +&& test x"$enable_auth_perl" != x"yes" +then + AC_MSG_ERROR([No authentication driver is enabled. At least one is required.]) +fi + dnl Mailbox drivers if test x"$enable_mbox_bsd" = x"yes" then @@ -478,10 +490,7 @@ fi # Some machines have crypt(3) in libcrypt; test for this. -if test x"$enable_auth_passwd" = x"yes" || test x"$enable_shadow" = x"yes" || test x"$enable_auth_mysql" = x"yes" || test x"$enable_auth_flatfile" = x"yes" -then - AC_CHECK_LIB(crypt, crypt, , ) -fi +AC_CHECK_LIB(crypt, crypt, , ) # Some machines have dlopen etc. in libdl, and these are needed for PAM. if test x"$enable_auth_pam" = x"yes" --Multipart_Mon__14_Jul_2003_23:23:05_+0200_08277a98 Content-Type: text/plain; name="main.c.diff" Content-Disposition: attachment; filename="main.c.diff" Content-Transfer-Encoding: 7bit diff -ruN tpop3d-cvs/main.c tpop3d/main.c --- tpop3d-cvs/main.c 2002-12-28 16:39:20.000000000 +0100 +++ tpop3d/main.c 2003-07-12 15:08:21.000000000 +0200 @@ -500,7 +500,7 @@ strip_domain = 1; if (append_domain && strip_domain) - log_print(LOG_WARNING, _("%s: specifying append-domain and strip-domain does not make much sense")); + log_print(LOG_WARNING, _("%s: specifying append-domain and strip-domain does not make much sense"), configfile); /* Should we disconnect any client which sends a USER command? */ if (config_get_bool("apop-only")) --Multipart_Mon__14_Jul_2003_23:23:05_+0200_08277a98 Content-Type: text/plain; name="tpop3d.conf.5.diff" Content-Disposition: attachment; filename="tpop3d.conf.5.diff" Content-Transfer-Encoding: 7bit diff -ruN tpop3d-cvs/tpop3d.conf.5 tpop3d/tpop3d.conf.5 --- tpop3d-cvs/tpop3d.conf.5 2003-02-18 00:18:32.000000000 +0100 +++ tpop3d/tpop3d.conf.5 2003-07-12 15:11:26.000000000 +0200 @@ -539,9 +539,9 @@ \fBauth-flatfile-passwd-file\fP: \fIsubstitution string\fP Specify the file in which \fBtpop3d\fP will search for a user's password. .TP -\fBauth-ldap-mail-user\fP: (\fIuser-name\fP | \fIuid\fP) +\fBauth-flatfile-mail-user\fP: (\fIuser-name\fP | \fIuid\fP) .TP -\fBauth-ldap-mail-group\fP: (\fIgroup-name\fP | \fIgid\fP) +\fBauth-flatfile-mail-group\fP: (\fIgroup-name\fP | \fIgid\fP) User and group under which access to the mailbox will take place. .SS A note on flat file authentication --Multipart_Mon__14_Jul_2003_23:23:05_+0200_08277a98 Content-Type: text/plain; name="auth_flatfile.c.diff" Content-Disposition: attachment; filename="auth_flatfile.c.diff" Content-Transfer-Encoding: 7bit diff -ruN tpop3d-cvs/auth_flatfile.c tpop3d/auth_flatfile.c --- tpop3d-cvs/auth_flatfile.c 2003-02-18 00:18:32.000000000 +0100 +++ tpop3d/auth_flatfile.c 2003-07-13 15:05:57.000000000 +0200 @@ -88,7 +88,7 @@ FILE *fp = NULL; char *filename = NULL; struct sverr err; - static char *buf, *pwhash; + static char *buf, *pwhash = NULL; static size_t buflen; size_t i, linenum; int c; @@ -109,7 +109,7 @@ linenum = 0; while (1) { - char *user, *end; + char *user, *hash, *end; i = 0; while ((c = getc(fp)) != EOF) { @@ -134,21 +134,22 @@ /* OK, have a line. */ user = buf; - pwhash = strchr(buf, ':'); - if (!pwhash) { + hash = strchr(buf, ':'); + if (!hash) { log_print(LOG_WARNING, _("read_user_passwd: flat file %s: line %u: bad format (missing :)"), filename, (unsigned)linenum); continue; } - *pwhash++ = 0; + *hash++ = 0; /* Check username. */ if (strcmp(user, local_part) != 0) continue; - if ((end = strchr(pwhash, ':'))) + if ((end = strchr(hash, ':'))) *end = 0; + pwhash = hash; break; } --Multipart_Mon__14_Jul_2003_23:23:05_+0200_08277a98 Content-Type: text/plain; name="password.c.diff" Content-Disposition: attachment; filename="password.c.diff" Content-Transfer-Encoding: 7bit diff -ruN tpop3d-cvs/password.c tpop3d/password.c --- tpop3d-cvs/password.c 2003-04-03 19:41:57.000000000 +0200 +++ tpop3d/password.c 2003-07-13 14:50:41.000000000 +0200 @@ -240,7 +240,7 @@ /* Helper macro to detect schemes. */ # define IS_SCHEME(hash, scheme, def) \ ((*hash == '{' && strncmp(hash, scheme, strlen(scheme)) == 0) \ - || strcmp(scheme, def) == 0) + || (*hash != '{' && strcmp(scheme, def) == 0)) if (IS_SCHEME(pwhash, "{crypt}", default_crypt_scheme)) { /* Password hashed by system crypt function. */ @@ -274,7 +274,7 @@ * encoding. */ if (strlen(realhash) == 32) { /* Hex. */ - return strcasecmp(realhash, md5_digest_str(pass, strlen(pass), 0)); + return strcasecmp(realhash, md5_digest_str(pass, strlen(pass), 0)) == 0; } else if (strlen(pwhash) == 24) { /* Base 64. */ return strcmp(realhash, md5_digest_str(pass, strlen(pass), 1)) == 0; --Multipart_Mon__14_Jul_2003_23:23:05_+0200_08277a98 Content-Type: text/plain; name="connection.c.diff" Content-Disposition: attachment; filename="connection.c.diff" Content-Transfer-Encoding: 7bit diff -ruN tpop3d-cvs/connection.c tpop3d/connection.c --- tpop3d-cvs/connection.c 2003-01-23 20:51:55.000000000 +0100 +++ tpop3d/connection.c 2003-07-13 16:03:14.000000000 +0200 @@ -438,7 +438,7 @@ p += skip; /* Send the message headers */ - do { + while (p < r && *p != '\n') { q = memchr(p, '\n', r - p); if (!q) q = r; errno = 0; @@ -454,7 +454,7 @@ nwritten += q - p + 2; p = q + 1; - } while (p < r && *p != '\n'); + } ++p; --Multipart_Mon__14_Jul_2003_23:23:05_+0200_08277a98 Content-Type: text/plain; name="warnings.diff" Content-Disposition: attachment; filename="warnings.diff" Content-Transfer-Encoding: 7bit diff -ruN tpop3d-cvs/maildir.c tpop3d/maildir.c --- tpop3d-cvs/maildir.c 2003-01-24 12:31:24.000000000 +0100 +++ tpop3d/maildir.c 2003-07-13 15:42:33.000000000 +0200 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff -ruN tpop3d-cvs/netloop.c tpop3d/netloop.c --- tpop3d-cvs/netloop.c 2003-01-10 00:20:23.000000000 +0100 +++ tpop3d/netloop.c 2003-07-13 13:22:08.000000000 +0200 @@ -21,6 +21,7 @@ #include #include #include +#include #ifdef USE_TCP_WRAPPERS # include diff -ruN tpop3d-cvs/signals.c tpop3d/signals.c --- tpop3d-cvs/signals.c 2003-01-10 00:20:23.000000000 +0100 +++ tpop3d/signals.c 2003-07-12 21:12:21.000000000 +0200 @@ -67,7 +67,7 @@ int restart_signals[] = {SIGHUP, 0}; int die_signals[] = {SIGQUIT, SIGABRT, SIGSEGV, SIGBUS, SIGILL, 0}; int *i; - struct sigaction sa = {0}; + struct sigaction sa = {{0}}; for (i = ignore_signals; *i; ++i) xsignal(*i, SIG_IGN); @@ -108,7 +108,7 @@ extern int post_fork; /* in main.c */ void die_signal_handler(const int i) { - struct sigaction sa = {0}; + struct sigaction sa = {{0}}; /* log_print(LOG_ERR, "quit: %s", sys_siglist[i]); */ log_print(LOG_ERR, _("quit: signal %d post_fork = %d"), i, post_fork); /* Some systems do not have sys_siglist. */ #ifdef APPALLING_BACKTRACE_HACK diff -ruN tpop3d-cvs/util.c tpop3d/util.c --- tpop3d-cvs/util.c 2002-11-14 00:31:43.000000000 +0100 +++ tpop3d/util.c 2003-07-12 21:14:24.000000000 +0200 @@ -112,7 +112,7 @@ /* xsignal NUMBER HANDLER * Set a signal with a similar interface to signal(2) using sigaction(2). */ void (*xsignal(int signum, void(*handler)(int)))(int) { - struct sigaction sa = {0}, sa_old; + struct sigaction sa = {{0}}, sa_old; sa.sa_handler = handler; sa.sa_flags = SA_RESTART; if (sigaction(signum, &sa, &sa_old) == -1) --Multipart_Mon__14_Jul_2003_23:23:05_+0200_08277a98-- From chris at ex-parrot.com Tue Jul 15 00:31:52 2003 From: chris at ex-parrot.com (Chris Lightfoot) Date: Tue, 15 Jul 2003 00:31:52 +0100 Subject: [tpop3d-discuss] A few patches In-Reply-To: <20030714232305.1dceb222.olrick@rainbow.winterbird.net> References: <20030714232305.1dceb222.olrick@rainbow.winterbird.net> Message-ID: <20030714233152.GA24143@caesious.cold.local> Thanks very much for these. Some of them correct rather embarrassing errors on my part! I've put the changes into current CVS. I need to spend some time fixing up tpo3pd and doing the 1.5.0 release. I'll try to set aside a bit of next weekend for that. I've been too busy for this lately :( One (pedantic) comment: On Mon, Jul 14, 2003 at 11:23:05PM +0200, Yann GROSSEL wrote: > warnings.diff: > removes a few warnings (mainly "missing braces around initializer") > (one warning remains at listener.c:59 - I think the alloc_struct > macro should be fixed but I don't know the right fix to apply) The changes relating to struct initialisation aren't right. For instance, you say struct sigaction sa = {{0}}; but you don't actually know that the first element of struct sigaction is an aggregate type that can be initialised {0}. `= {0}' is the correct way to initialise any aggregate `as if in static storage'; gcc rather unhelpfully produces a warning about it, though. See http://ex-parrot.com/~chris/random/initialise.html -- ``It's clearly a budget. It's got a lot of numbers in it.'' (George W. Bush) From dan at scarfies.net Tue Jul 15 01:21:34 2003 From: dan at scarfies.net (Dan Clark) Date: Tue, 15 Jul 2003 12:21:34 +1200 Subject: [tpop3d-discuss] [tpop3d] invallid mysql-popper.conf? Message-ID: <008201c34a67$0f6d3cd0$3c301fac@wickliffe.co.nz> This is a multi-part message in MIME format. ------=_NextPart_000_007F_01C34ACB.A14EFA30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Guys, I get this error when trying to connect to my qpopper server instance... -- Unable to process config file /etc/mysql-popper.conf Connection to host lost. -- on the server end I get this... -- Jul 15 11:56:26 mercury popper[34558]: Expected "set" or "reset", found "MysqlAuthHost" at line 2 of config file /etc/mysql-popper.conf [pop_config.c:1414] -- Am I using the wrong config file to start the qpopper (/usr/sbin/popper) daemon? Should there be another file /etc/qpopper.conf ?? If so, where does one = call the /etc/mysql-popper.conf from? I am trying to get the qpopper daemon to talk to the MYSQL server for authentication. And it should fetch mail from exim /var/mail/$domain/$username but that doesn't quite seem to get that far. Regards Dan Clark ------=_NextPart_000_007F_01C34ACB.A14EFA30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Guys,
        I get this = error=20 when trying to connect to my qpopper = server
instance...
--
Unable to=20 process config file /etc/mysql-popper.conf
Connection to host=20 lost.
--

on the server end I get this...

--
Jul 15 = 11:56:26=20 mercury popper[34558]: Expected "set" or "reset", = found
"MysqlAuthHost" at=20 line 2 of config file=20 /etc/mysql-popper.conf
[pop_config.c:1414]
--

Am I using = the wrong=20 config file to start the qpopper (/usr/sbin/popper)
daemon?
Should = there=20 be another file /etc/qpopper.conf ?? If so, where does one call the=20 /etc/mysql-popper.conf from?

I am trying to get the qpopper = daemon to=20 talk to the MYSQL server for
authentication. And it should fetch mail = from=20 exim
/var/mail/$domain/$username but that doesn't quite seem to get = that=20 far.

Regards
Dan Clark
------=_NextPart_000_007F_01C34ACB.A14EFA30-- From keb at pa.net Tue Jul 15 03:17:31 2003 From: keb at pa.net (Kevin Bonner) Date: Mon, 14 Jul 2003 22:17:31 -0400 Subject: [tpop3d-discuss] [tpop3d] invallid mysql-popper.conf? In-Reply-To: <008201c34a67$0f6d3cd0$3c301fac@wickliffe.co.nz> References: <008201c34a67$0f6d3cd0$3c301fac@wickliffe.co.nz> Message-ID: <200307142217.31713.keb@pa.net> =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dan, You've found the tpop3d mailing list, not the qpopper list. While I've nev= er=20 used qpopper, tpop3d has proven to be very good for what I've needed it to= =20 do. The config is fairly easy to setup and you can use your own MySQL=20 queries, making it very easy to administer. We've got it running on a box= =20 that gets 20,000+ hits per hour, and haven't seen any issues related to=20 tpop3d. If you're interested in testing/using tpop3d, you can find it at: http://www.ex-parrot.com/~chris/tpop3d/ Enjoy, Kevin Bonner On Monday 14 July 2003 20:21, Dan Clark wrote: > Hi Guys, > I get this error when trying to connect to my qpopper server > instance... > [ snip ] > > Regards > Dan Clark =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE/E2Q7/9i/ml3OBYMRAjz9AJ9bKliMWMVnH1MIxGq6d3o5GoJsCQCdFKU/ 8q2GqJ/El/Aqq3ZowDX/1cc=3D =3Dz32S =2D----END PGP SIGNATURE----- From dan at scarfies.net Tue Jul 15 03:24:23 2003 From: dan at scarfies.net (Dan Clark) Date: Tue, 15 Jul 2003 14:24:23 +1200 Subject: [tpop3d-discuss] [tpop3d] invallid mysql-popper.conf? References: <008201c34a67$0f6d3cd0$3c301fac@wickliffe.co.nz> <200307142217.31713.keb@pa.net> Message-ID: <00cb01c34a78$3864d8d0$3c301fac@wickliffe.co.nz> I have tried that, my appolagies, I seem to have posted to the incorrect mailing list, however now that I have you on the phone (so to speak) could you assist with my config if I go back to tpop3d? exim puts mail in /var/mail/domain.com/username 'tpop3d' doesn't seem to pick up mail from there, instead it uses another folder. I think I posted my config earlier Cheers Dan ----- Original Message ----- From: "Kevin Bonner" To: "Dan Clark" Cc: Sent: Tuesday, July 15, 2003 2:17 PM Subject: Re: [tpop3d-discuss] [tpop3d] invallid mysql-popper.conf? > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Dan, > > You've found the tpop3d mailing list, not the qpopper list. While I've never > used qpopper, tpop3d has proven to be very good for what I've needed it to > do. The config is fairly easy to setup and you can use your own MySQL > queries, making it very easy to administer. We've got it running on a box > that gets 20,000+ hits per hour, and haven't seen any issues related to > tpop3d. > > If you're interested in testing/using tpop3d, you can find it at: > http://www.ex-parrot.com/~chris/tpop3d/ > > Enjoy, > Kevin Bonner > > On Monday 14 July 2003 20:21, Dan Clark wrote: > > Hi Guys, > > I get this error when trying to connect to my qpopper server > > instance... > > [ snip ] > > > > Regards > > Dan Clark > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.7 (GNU/Linux) > > iD8DBQE/E2Q7/9i/ml3OBYMRAjz9AJ9bKliMWMVnH1MIxGq6d3o5GoJsCQCdFKU/ > 8q2GqJ/El/Aqq3ZowDX/1cc= > =z32S > -----END PGP SIGNATURE----- > > > _______________________________________________ > tpop3d-discuss mailing list > tpop3d-discuss@lists.beasts.org > http://lists.beasts.org/mailman/listinfo/tpop3d-discuss > > From keb at pa.net Tue Jul 15 03:52:47 2003 From: keb at pa.net (Kevin Bonner) Date: Mon, 14 Jul 2003 22:52:47 -0400 Subject: [tpop3d-discuss] [tpop3d] invallid mysql-popper.conf? In-Reply-To: <00cb01c34a78$3864d8d0$3c301fac@wickliffe.co.nz> References: <008201c34a67$0f6d3cd0$3c301fac@wickliffe.co.nz> <200307142217.31713.keb@pa.net> <00cb01c34a78$3864d8d0$3c301fac@wickliffe.co.nz> Message-ID: <200307142252.47828.keb@pa.net> =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 14 July 2003 22:24, Dan Clark wrote: > I have tried that, my appolagies, I seem to have posted to the incorrect > mailing list, however now that I have you on the phone (so to speak) could > you assist with my config if I go back to tpop3d? I'll try my best. =3D) > exim puts mail in /var/mail/domain.com/username > 'tpop3d' doesn't seem to pick up mail from there, instead it uses another > folder. =2D From your email earlier this month, here's part of the config you poste= d: mailbox: bsd:/var/mail/$(user) auth-mysql-enable: yes The auth-mysql mechanism doesn't use the mailbox config option since it=20 queries the database for the proper path. Here's the query from the manpag= e: auth-mysql-pass-query: \ SELECT CONCAT('/path/to/', '$(domain)', \ '/', '$(local_part)'), \ CONCAT('{crypt}, cryptpw), \ 'mail', 'maildir' \ FROM users \ WHERE login =3D '$(local_part)' \ AND domain =3D '$(domain)' So...this query returns the path, password, username to run as, and the=20 mailbox type. Just connect to your sql server via the mysql client and=20 create a query to return this information based on your current schema. If you don't have auth-mysql-pass-query set (or disabled) in your config,=20 there is a default query used. You can see this query by looking for the=20 variable named user_pass_query_template in auth_mysql.c. Kevin Bonner =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE/E2x//9i/ml3OBYMRAmQXAKCbNXeM6VtM9SwaKudo3DRj3E/wGgCgiLvf vzhCb2iLIE3MkkQnYewNlkM=3D =3DwoS9 =2D----END PGP SIGNATURE----- From dan at scarfies.net Tue Jul 15 03:56:33 2003 From: dan at scarfies.net (Dan Clark) Date: Tue, 15 Jul 2003 14:56:33 +1200 Subject: [tpop3d-discuss] [tpop3d] invallid mysql-popper.conf? References: <008201c34a67$0f6d3cd0$3c301fac@wickliffe.co.nz> <200307142217.31713.keb@pa.net> <00cb01c34a78$3864d8d0$3c301fac@wickliffe.co.nz> <200307142252.47828.keb@pa.net> Message-ID: <00fb01c34a7c$b5fcce70$3c301fac@wickliffe.co.nz> ah that answers my other question of why that mailbox: line seems to do nothing, so I removed it :) ok I will try the default query and let you know :) thanks awfully ----- Original Message ----- From: "Kevin Bonner" To: "Dan Clark" Cc: Sent: Tuesday, July 15, 2003 2:52 PM Subject: Re: [tpop3d-discuss] [tpop3d] invallid mysql-popper.conf? > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Monday 14 July 2003 22:24, Dan Clark wrote: > > I have tried that, my appolagies, I seem to have posted to the incorrect > > mailing list, however now that I have you on the phone (so to speak) could > > you assist with my config if I go back to tpop3d? > > I'll try my best. =) > > > exim puts mail in /var/mail/domain.com/username > > 'tpop3d' doesn't seem to pick up mail from there, instead it uses another > > folder. > > - From your email earlier this month, here's part of the config you posted: > mailbox: bsd:/var/mail/$(user) > auth-mysql-enable: yes > > The auth-mysql mechanism doesn't use the mailbox config option since it > queries the database for the proper path. Here's the query from the manpage: > > auth-mysql-pass-query: \ > SELECT CONCAT('/path/to/', '$(domain)', \ > '/', '$(local_part)'), \ > CONCAT('{crypt}, cryptpw), \ > 'mail', 'maildir' \ > FROM users \ > WHERE login = '$(local_part)' \ > AND domain = '$(domain)' > > So...this query returns the path, password, username to run as, and the > mailbox type. Just connect to your sql server via the mysql client and > create a query to return this information based on your current schema. > > If you don't have auth-mysql-pass-query set (or disabled) in your config, > there is a default query used. You can see this query by looking for the > variable named user_pass_query_template in auth_mysql.c. > > Kevin Bonner > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.7 (GNU/Linux) > > iD8DBQE/E2x//9i/ml3OBYMRAmQXAKCbNXeM6VtM9SwaKudo3DRj3E/wGgCgiLvf > vzhCb2iLIE3MkkQnYewNlkM= > =woS9 > -----END PGP SIGNATURE----- > > > From Dominic Fox" --2C_4_0.2E8_0458 Content-Type: text/html; Content-Transfer-Encoding: quoted-printable

SECURE YOUR INVESTMENTS THROUGH THE GOVERNMENT

Earn 15%-50% Interest...GUARANTEED!

Find Out How Banks Make Their Profits.=

Avoid T= aking Risks In The Market

Learn to aquire properties for pennies on The = Dollar.

Click Here For Yo= ur FREE Video

DISCOVER THE BEST KEPT SECRETS IN AMERICA

click here to be removed.
e ltojlmdoimzbhcsvbcjmnoishdlt ihrel izmkzcb piqqunvmnmmtyedxwokyhusiseafak pi --2C_4_0.2E8_0458-- From dan at scarfies.net Tue Jul 15 05:00:08 2003 From: dan at scarfies.net (Dan Clark) Date: Tue, 15 Jul 2003 16:00:08 +1200 Subject: [tpop3d-discuss] Provide Yourself With Smart Investment Tools wcxj h ce References: <99$r7v52ip4-cf$8y@p0m2f53.7h2ys> Message-ID: <011701c34a85$98597090$3c301fac@wickliffe.co.nz> This is a multi-part message in MIME format. ------=_NextPart_000_0112_01C34AEA.2A4BCFC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ok, it would seem this list gets spam :( hrmm ----- Original Message -----=20 From: Dominic Fox=20 To: tpop3d-discuss@lists.beasts.org=20 Sent: Tuesday, July 15, 2003 12:52 PM Subject: [tpop3d-discuss] Provide Yourself With Smart Investment Tools = wcxj h ce SECURE YOUR INVESTMENTS THROUGH THE GOVERNMENT =20 Earn 15%-50% Interest...GUARANTEED!=20 Find Out How Banks Make Their Profits.=20 Avoid Taking Risks In The Market=20 Learn to aquire properties for pennies on The Dollar.=20 Click Here For Your FREE Video=20 DISCOVER THE BEST KEPT SECRETS IN AMERICA =20 =20 click here to be removed.=20 e ltojlmdoimzbhcsvbcjmnoishdlt ihrel izmkzcb = piqqunvmnmmtyedxwokyhusiseafak pi ------=_NextPart_000_0112_01C34AEA.2A4BCFC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
ok, it would seem this list gets spam=20 :(
hrmm
----- Original Message -----
From:=20 Dominic Fox=20
To: tpop3d-discuss@lists.beas= ts.org=20
Sent: Tuesday, July 15, 2003 = 12:52=20 PM
Subject: [tpop3d-discuss] = Provide=20 Yourself With Smart Investment Tools wcxj h ce


SECURE YOUR = INVESTMENTS THROUGH=20 THE GOVERNMENT

Earn 15%-50% = Interest...GUARANTEED!=20

Find Out How Banks Make Their=20 Profits.

Avoid Taking Risks In The Market

Learn to aquire properties for = pennies on The=20 Dollar.

Click Here For Your FREE = Video=20

DISCOVER THE BEST KEPT SECRETS IN = AMERICA=20

click here to be removed.=20
e ltojlmdoimzbhcsvbcjmnoishdlt ihrel izmkzcb = piqqunvmnmmtyedxwokyhusiseafak pi ------=_NextPart_000_0112_01C34AEA.2A4BCFC0-- From chris at ex-parrot.com Tue Jul 15 14:18:04 2003 From: chris at ex-parrot.com (Chris Lightfoot) Date: Tue, 15 Jul 2003 14:18:04 +0100 Subject: [tpop3d-discuss] spam In-Reply-To: <011701c34a85$98597090$3c301fac@wickliffe.co.nz>; from dan@scarfies.net on Tue, Jul 15, 2003 at 04:00:08PM +1200 References: <99$r7v52ip4-cf$8y@p0m2f53.7h2ys> <011701c34a85$98597090$3c301fac@wickliffe.co.nz> Message-ID: <20030715141804.A1733@sphinx.mythic-beasts.com> On Tue, Jul 15, 2003 at 04:00:08PM +1200, Dan Clark wrote: > ok, it would seem this list gets spam :( Yes, sad to say. Mostly I don't see it; it gets filtered out. I suppose I should try to plumb spamassassin into mailman, but that doesn't sound like any kind of fun at all. -- ``He managed to hoodwink not just the great and the good like Margaret Thatcher, John Major and William Hague, but many very clever people too.'' (newspaper article, describing Jeffrey Archer) From Paul.Makepeace at realprogrammers.com Wed Jul 16 02:40:24 2003 From: Paul.Makepeace at realprogrammers.com (Paul Makepeace) Date: Wed, 16 Jul 2003 02:40:24 +0100 Subject: [tpop3d-discuss] [contrib] tpop3d_passwd, Tpop3d::Passwd, Tpop3d::Mailbox Message-ID: <20030716014024.GS24784@mythix.realprogrammers.com> --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Here's a script that's evolved into something relatively useful, generic & stable for me. Thought I'd share it. It's intended to perform the grunt work of creating mailboxes, chown'ing them, and setting a password in passwd format for auth-flatfile. I've broken some of the functions into modules because I'm reusing them in an application. If you wanted a straight one-off utility just cat the files together, and then remove the __END__s and spurious use statements. There are a couple of additional functions, again for my own ends but might be useful. Feedback, patches, etc welcome! Paul -- Paul Makepeace ....................................... http://paulm.com/ "What is ? Schrodinger's cat." -- http://paulm.com/toys/surrealism/ --DocE+STaALJfprDB Content-Type: application/x-perl Content-Disposition: attachment; filename="Passwd.pm" Content-Transfer-Encoding: quoted-printable package Tpop3d::Passwd;=0A=0Arequire Exporter;=0A@ISA =3D qw(Exporter);=0A@= EXPORT_OK =3D qw(=0A set_password=0A);=0A=0Ause strict;=0Ause warnings;=0Au= se File::Spec::Functions qw(catfile);=0A=0Asub randletter() {=0A chr int(ra= nd 26) + (int(.5 + rand 1) % 2 ? 65 : 97);=0A}=0A=0Amy $passwd_root =3D q[/= etc/mail/passwd];=0A=0Asub set_password($$$) {=0A my ($local_part, $domain,= $plaintext_password) =3D @_;=0A=0A my $passwd_file =3D catfile($passwd_roo= t, $domain);=0A my $new_passwd_file =3D catfile($passwd_root, "$domain.$$")= ;=0A=0A open OP, '<', $passwd_file or die "Can't open '$passwd_file': $!\n"= ;=0A # XXX Should really check for existence here.=0A open NP, '>', $new_pa= sswd_file or die "Can't create temporary '$new_passwd_file': $!\n";=0A=0A m= y $salt =3D randletter() . randletter();=0A my $crypted_password =3D crypt = ($plaintext_password, $salt);=0A=0A my $seen =3D 0;=0A my $new_line =3D qq{= $local_part:$crypted_password:0:0:::\n};=0A while () {=0A if (/^$local= _part\b/) {=0A $seen =3D 1;=0A print NP $new_line;=0A } else {=0A pr= int NP;=0A }=0A }=0A print NP $new_line unless $seen;=0A close NP;=0A clos= e OP;=0A=0A unlink($passwd_file) =3D=3D 1=0A or die "Couldn't unlink $pass= wd_file: $! (please clean it up)\n";=0A link $new_passwd_file =3D> $passwd_= file=0A or die "Couldn't link $new_passwd_file =3D> $passwd_file: $!\n";= =0A unlink($new_passwd_file) =3D=3D 1=0A or die "Couldn't unlink $new_pass= wd_file: $! (please clean it up)\n";=0A}=0A=0A1;=0A=0A__END__=0A=0A=3Dhead1= NAME=0A=0ATpop3d::Passwd=0A=0A=3Dhead1 SYNOPSIS=0A=0Aset_password($local_p= art, $domain, $plaintext_password);=0A=0A=3Dhead1 DESCRIPTION=0A=0A=3Dover = 4=0A=0A=3Ditem * Ensure C exists=0A=0A=3Ditem * = Add or update an entry in C=0A=0A=3Dback 4=0A=0A= The passwd file root path can be adjusted by modifying C.= =0A=0A=3Dhead1 BUGS=0A=0ABug reports and patches very welcome.=0A=0A=3Dhead= 1 SEE ALSO=0A=0AL, L, L=0A=0A=3Dhead1= AUTHOR=0A=0ACopyright (C) 2002-3 Paul Makepeace =0A=0AT= his program is free software; you can redistribute it and/or=0Amodify it un= der the same terms as Perl itself.=0A=0A=3Dcut=0A=0A --DocE+STaALJfprDB Content-Type: application/x-perl Content-Disposition: attachment; filename="Mailbox.pm" Content-Transfer-Encoding: quoted-printable #!/usr/bin/perl -w=0A=0Apackage Tpop3d::Mailbox;=0A=0Arequire Exporter;=0A@= ISA =3D qw(Exporter);=0A@EXPORT_OK =3D qw(=0A create_mailbox=0A delete_mail= box=0A mailbox_size=0A);=0A=0Ause warnings;=0Ause strict;=0Ause File::Spec:= :Functions qw(catfile);=0A=0Amy $spool_root =3D q[/var/mail];=0Amy $mail_u= ser =3D q[mail];=0Amy ($mail_uid,$mail_gid) =3D (getpwnam($mail_user))[2,= 3]=0A or die "$0: [internal] $mail_user not in passwd file";=0A=0Asub mailb= ox_spool_dir($$) {=0A my ($local_part, $domain) =3D @_;=0A=0A my $spool_dir= =3D catfile($spool_root, $domain);=0A my $mailbox =3D catfile($spool_dir, = $local_part);=0A=0A ($mailbox, $spool_dir);=0A}=0A=0Asub create_mailbox($$)= {=0A my ($mailbox, $spool_dir) =3D mailbox_spool_dir($_[0], $_[1]);=0A=0A = unless (-d $spool_dir) {=0A mkdir $spool_dir, 0775=0A or die "Can't crea= te spool directory '$spool_dir': $!\n";=0A print "Created $spool_dir\n";= =0A }=0A chown($mail_uid, $mail_gid, $spool_dir) =3D=3D 1=0A or die "Can't= chown $mail_user spool directory '$spool_dir': $!\n";=0A=0A unless (-f $ma= ilbox) {=0A open M, '>', $mailbox or die "Can't create '$mailbox': $!\n";= =0A close M;=0A }=0A chown($mail_uid, $mail_gid =3D> $mailbox) =3D=3D 1=0A= or die "Can't chown $mail_user mailbox '$mailbox': $!\n";=0A chmod 0660 = =3D> $mailbox=0A or die "Can't chmod 0660 =3D> mailbox '$mailbox': $!\n";= =0A}=0A=0Asub mailbox_size($$) {=0A warn "mailbox_size: ", join(", ", @_), = "\n";=0A my ($mailbox, $spool_dir) =3D mailbox_spool_dir($_[0], $_[1]);=0A = -f $mailbox && -s _;=0A}=0A=0A# Should delete_mailbox clear up the director= y when no more mailboxen=0A# remain?=0A=0Asub delete_mailbox($$) {=0A my ($= mailbox, $spool_dir) =3D mailbox_spool_dir($_[0], $_[1]);=0A warn "DELETING= $mailbox\n";=0A unlink($mailbox) =3D=3D 1;=0A}=0A=0A1;=0A=0A__END__=0A=0A= =3Dhead1 NAME=0A=0ATpop3d::Mailbox=0A=0A=3Dhead1 SYNOPSIS=0A=0Acreate_mailb= ox($local_part, $domain);=0Adelete_mailbox($local_part, $domain);=0Amailbox= _size($local_part, $domain);=0A=0A=3Dhead1 DESCRIPTION=0A=0A=3Dover 4=0A=0A= =3Ditem * create_mailbox($local_part_domain)=0A=0A=3Dover 4=0A=0A=3Ditem * = Ensure the directory C exists and is owned=0Aby C= =0A=0A=3Ditem * Create, if necessary, a zero-length mailbox file=0AC, also owned by C.=0A=0A=3Dback 4=0A=0A=3Dite= m * delete_mailbox($local_part, $domain)=0A=0ARemove the mailbox. Return su= ccess of unlinking.=0A=0A=3Ditem * mailbox_size($local_part, $domain)=0A=0A= Report size in bytes of mailbox.=0A=0A=3Dback 4=0A=0AThese paths can be adj= usted by modifying C.=0A=0A=3Dhead1 BUGS=0A=0ABug reports = and patches welcome.=0A=0A=3Dhead1 SEE ALSO=0A=0AL, L, L=0A=0A=3Dhead1 AUTHOR=0A=0ACopyright (C) 2002-3 Paul Make= peace =0A=0AThis program is free software; you can redis= tribute it and/or=0Amodify it under the same terms as Perl itself.=0A=0A=3D= cut=0A --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=tpop3d_passwd #!/usr/bin/perl -w use warnings; use strict; use Tpop3d::Mailbox qw(create_mailbox); use Tpop3d::Passwd qw(set_password); sub usage { use File::Basename; my $me = basename $0; die "Usage: $me local_part\@domain [password]\n"; } usage unless @ARGV == 1 or @ARGV == 2; my ($local_part, $domain) = $ARGV[0] =~ /(\S+)\@(\S+)/; usage unless defined $local_part and defined $domain; my ($plaintext_password, $confirm); if (defined $ARGV[1]) { $plaintext_password = $ARGV[1]; } else { system "stty -echo"; for(;;) { print "Password: "; chomp($plaintext_password = ); print "\nConfirm: "; chomp($confirm = ); print "\n"; if ($plaintext_password ne $confirm) { print "Passwords don't match. Try again.\n"; } else { last; } } system "stty echo"; } create_mailbox($local_part, $domain); set_password($local_part, $domain, $plaintext_password); print "Added $local_part\@$domain.\n"; __END__ =head1 NAME tpop3d_passwd =head1 SYNOPSIS tpop3d_passwd local_part@domain [password] =head1 DESCRIPTION C performs various duties to ensure an email address is ready to accept mail and be retrieved using tpop3d. It is designed to work with auth-flatfile and a particular schema where mail is delivered to C and whose POP password is stored in a passwd-format in C. When presented with an email address tpop3d_passwd will, =over 4 =item * Ensure the directory C exists and is owned by C =item * Create, if necessary, a zero-length mailbox file C. =item * Ensure C exists =item * Add or update an entry in C =back 4 These paths can be adjusted by modifying C. =head1 BUGS Doesn't check for existence of temporary new password file. Unlikely to have any real impact but mentioned here for purity's sake. =head1 SEE ALSO L, L, L =head1 AUTHOR Copyright (C) 2002 Paul Makepeace This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut --DocE+STaALJfprDB-- From keb at pa.net Wed Jul 16 22:48:52 2003 From: keb at pa.net (Kevin Bonner) Date: Wed, 16 Jul 2003 17:48:52 -0400 Subject: [tpop3d-discuss] [tpop3d] invallid mysql-popper.conf? In-Reply-To: <004701c34be0$b1480330$3c301fac@wickliffe.co.nz> References: <008201c34a67$0f6d3cd0$3c301fac@wickliffe.co.nz> <200307142252.47828.keb@pa.net> <004701c34be0$b1480330$3c301fac@wickliffe.co.nz> Message-ID: <200307161748.56723.keb@pa.net> =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The mail and maildir fields are the username to run as and type of mailbox,= =20 respectively. The mail option tells tpop3d to run with permissions of the= =20 user mail. This is useful for places that want to have a single uid for all= =20 mail. The maildir entry tells tpop3d that the mailbox is in maildir format= =2E =20 The other option for that field would be mbox, which is probably what you=20 want to be using for your configuration. Kevin Bonner On Wednesday 16 July 2003 17:24, Dan Clark wrote: > oh about that... > I changed 'cryptpw' field to 'password' as that is the field name in the > database (stored in MD5) > now 'mail' and 'maildir', why do ya need these? > > > auth-mysql-pass-query: \ > > SELECT CONCAT('/path/to/', '$(domain)', \ > > '/', '$(local_part)'), \ > > CONCAT('{crypt}, cryptpw), \ > > 'mail', 'maildir' \ > > FROM users \ > > WHERE login =3D '$(local_part)' \ > > AND domain =3D '$(domain)' =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE/FchI/9i/ml3OBYMRAgYjAJ0Q2pPvR5Gl409k18R9EClN1OaaZQCdGRWV VDyy6zHZU9rD4gB7zCS7UFc=3D =3DI3hI =2D----END PGP SIGNATURE----- From Paul.Makepeace at realprogrammers.com Thu Jul 17 23:50:58 2003 From: Paul.Makepeace at realprogrammers.com (Paul Makepeace) Date: Thu, 17 Jul 2003 23:50:58 +0100 Subject: [tpop3d-discuss] [patch] mailspool index error Message-ID: <20030717225058.GS24999@mythix.realprogrammers.com> [Including the pre-amble as it's a fix I haven't looked at very hard.] I'm getting the following error, mailspool_load_index(/var/lib/tpop3d/index/[box]): owner is 1010, should be 8; mode 0660, should be 0600 (This is a shell user whose uid is indeed 1010, FWIW.) Yet, # ls -l /var/lib/tpop3d/index/[box] -rw------- 1 mail mail 8463 Jul 17 19:02 [box] # ls -ald /var/lib/tpop3d/index drwxrwsr-x 2 mail mail 4096 Jul 17 18:15 /var/lib/tpop3d/index # And, # ls -l /var/mail/[box] -rw-rw---- 1 nik mail 7562519 Jul 17 23:03 /var/mail/[box] # (I have it that way so he can read it direct off the filesystem.) How about: --- mailspool.c 24 Jan 2003 11:31:24 -0000 1.44 +++ mailspool.c 17 Jul 2003 22:38:35 -0000 @@ -690,10 +690,10 @@ if (fstat(fileno(fp), &st) == -1) { log_print(LOG_ERR, "mailspool_load_index(%s): %m", indexfile); goto fail; - } else if ((st.st_mode & 0777) != 0600 || m->st.st_uid != getuid()) { + } else if ((st.st_mode & 0777) != 0600 || st.st_uid != getuid()) { log_print(LOG_ERR, _("mailspool_load_index(%s): possible security problem: index exists, but it has the wrong owner or file permissions"), indexfile); log_print(LOG_ERR, _("mailspool_load_index(%s): owner is %d, should be %d; mode 0%o, should be 0600"), indexfile, - m->st.st_uid, getuid(), m->st.st_mode & 0777); + st.st_uid, getuid(), st.st_mode & 0777); goto fail; } Paul -- Paul Makepeace ....................................... http://paulm.com/ "If Saddam Hussein is really a transvestite, then the goddamn apes have won." -- http://paulm.com/toys/surrealism/ From Paul.Makepeace at realprogrammers.com Fri Jul 18 01:08:44 2003 From: Paul.Makepeace at realprogrammers.com (Paul Makepeace) Date: Fri, 18 Jul 2003 01:08:44 +0100 Subject: [tpop3d-discuss] [patch] auth_ldap.c Message-ID: <20030718000844.GT24999@mythix.realprogrammers.com> Not sure if this is already on the radar, but.. gcc 3.3.1 prerelease moans, auth_ldap.c: In function `try_ldap_connect_bind': auth_ldap.c:242: warning: `ret' might be used uninitialized in this function auth_ldap.c: In function `auth_ldap_new_user_pass': auth_ldap.c:329: warning: passing arg 3 of `try_ldap_bind' discards qualifiers from pointer target type auth_ldap.c:375:25: pasting "." and "mailbox" does not give a valid preprocessing token [repeated several times] @@ -240,4 +240,4 @@ * Try to connect to the LDAP server and bind. */ -static int try_ldap_connect_bind(char *who, char *passwd) { - int ret, i; +static int try_ldap_connect_bind(const char *who, const char *passwd) { + int ret = !LDAP_SUCCESS, i; /* XXX */ for (i = 0; i < 3; ++i) { @@ -262,3 +262,3 @@ * Try a bind against the LDAP server. */ -static int try_ldap_bind(LDAP *ld, char *who, char *passwd) { +static int try_ldap_bind(LDAP *ld, const char *who, const char *passwd) { int ret, i; @@ -369,5 +369,5 @@ /* Check that we've retrieved all the attributes we need. */ -#define GOT_ATTR(a) if (ldapinfo.attr.##a && !a) { \ +#define GOT_ATTR(a) if (ldapinfo.attr.a && !a) { \ log_print(LOG_ERR, _("auth_ldap_new_user_pass: did not find required attribute `%s' for %s"), \ - ldapinfo.attr.##a, who); \ + ldapinfo.attr.a, who); \ Nice to get rid of that uninitialized ret warning; I'm not sure about how errno (set during ldap_open) relates to the error codes in ldap.h or what an appropriate default would be (LDAP_OTHER? LDAP_SERVER_DOWN?). I think it's definitely a bug leaving it as is though - if it gets a default of zero it'll be considered a success. (#define LDAP_SUCCESS 0x00) (ldap_open() is deprecated, btw.) Paul -- Paul Makepeace ....................................... http://paulm.com/ "If volume matters as much as they claim, then everyone knows cows don't talk." -- http://paulm.com/toys/surrealism/ From Paul.Makepeace at realprogrammers.com Fri Jul 18 01:36:52 2003 From: Paul.Makepeace at realprogrammers.com (Paul Makepeace) Date: Fri, 18 Jul 2003 01:36:52 +0100 Subject: [tpop3d-discuss] A few patches In-Reply-To: <20030714233152.GA24143@caesious.cold.local> References: <20030714232305.1dceb222.olrick@rainbow.winterbird.net> <20030714233152.GA24143@caesious.cold.local> Message-ID: <20030718003652.GU24999@mythix.realprogrammers.com> Having skimmed, http://www.cslab.vt.edu/manuals/glibc-2.2.3/html_node/libc_493.html#SEC503 I'm not so sure initialising the sigaction to {0} is right anyway - seems like there's a particular way of setting up the behavior, for example sigemptyset or sigfillset is needed. Or you could copy the old one, make the required mods and store it back? Paul -- Paul Makepeace ....................................... http://paulm.com/ "If I earned enough money, then I could send my post to lapland." -- http://paulm.com/toys/surrealism/ From Paul.Makepeace at realprogrammers.com Fri Jul 18 02:01:09 2003 From: Paul.Makepeace at realprogrammers.com (Paul Makepeace) Date: Fri, 18 Jul 2003 02:01:09 +0100 Subject: [tpop3d-discuss] Default tpop3d.conf Message-ID: <20030718010109.GA19627@mythix.realprogrammers.com> Minor point - tpop3d.conf claims it looks in /etc but ./configure has a default of CONFIG_DIR=/usr/local/etc (./configure --sysconfdir=/etc seems to do it.) P -- Paul Makepeace ....................................... http://paulm.com/ "What is your mom doing? The ultimate sacrifice." -- http://paulm.com/toys/surrealism/ From dan at scarfies.net Fri Jul 18 02:07:22 2003 From: dan at scarfies.net (Dan Clark) Date: Fri, 18 Jul 2003 13:07:22 +1200 Subject: [tpop3d-discuss] Default tpop3d.conf References: <20030718010109.GA19627@mythix.realprogrammers.com> Message-ID: <00e801c34cc8$fb6423c0$3c301fac@wickliffe.co.nz> ah yes, I had noticed that myself, thought it may have been just a FreeBSD mishap :P ----- Original Message ----- From: "Paul Makepeace" To: "tpop3d-discuss" Sent: Friday, July 18, 2003 1:01 PM Subject: [tpop3d-discuss] Default tpop3d.conf > Minor point - tpop3d.conf claims it looks in /etc but ./configure has a > default of CONFIG_DIR=/usr/local/etc > > (./configure --sysconfdir=/etc seems to do it.) > > P > > -- > Paul Makepeace ....................................... http://paulm.com/ > > "What is your mom doing? The ultimate sacrifice." > -- http://paulm.com/toys/surrealism/ > > _______________________________________________ > tpop3d-discuss mailing list > tpop3d-discuss@lists.beasts.org > http://lists.beasts.org/mailman/listinfo/tpop3d-discuss > From chris at ex-parrot.com Fri Jul 18 09:32:06 2003 From: chris at ex-parrot.com (Chris Lightfoot) Date: Fri, 18 Jul 2003 09:32:06 +0100 Subject: [tpop3d-discuss] [patch] auth_ldap.c In-Reply-To: <20030718000844.GT24999@mythix.realprogrammers.com> References: <20030718000844.GT24999@mythix.realprogrammers.com> Message-ID: <20030718083206.GA11579@caesious.cold.local> On Fri, Jul 18, 2003 at 01:08:44AM +0100, Paul Makepeace wrote: [ ... ] thanks for these. > @@ -240,4 +240,4 @@ > * Try to connect to the LDAP server and bind. */ > -static int try_ldap_connect_bind(char *who, char *passwd) { > - int ret, i; > +static int try_ldap_connect_bind(const char *who, const char *passwd) { > + int ret = !LDAP_SUCCESS, i; /* XXX */ -- oops. LDAP_OTHER seems the best choice here, but it's pretty ugly. > (ldap_open() is deprecated, btw.) Oh dear. `Will be deprecated in a future release' in my openldap, but times move on I suppose. -- Dilbert: Do you think you might be abusing your power? Wally: What would be the other reasons to have power? (Scott Adams) From chris at ex-parrot.com Fri Jul 18 09:35:15 2003 From: chris at ex-parrot.com (Chris Lightfoot) Date: Fri, 18 Jul 2003 09:35:15 +0100 Subject: [tpop3d-discuss] Default tpop3d.conf In-Reply-To: <20030718010109.GA19627@mythix.realprogrammers.com> References: <20030718010109.GA19627@mythix.realprogrammers.com> Message-ID: <20030718083515.GB11579@caesious.cold.local> On Fri, Jul 18, 2003 at 02:01:09AM +0100, Paul Makepeace wrote: > Minor point - tpop3d.conf claims it looks in /etc but ./configure has a > default of CONFIG_DIR=/usr/local/etc > > (./configure --sysconfdir=/etc seems to do it.) Yeah. I don't like this, but it's the autoconf default, and I think the `principle of least surprise' means that I should accept the default. It's alluded to in the changelog, and I've modified the man page slightly. -- ``The practical scientist is trying to solve tomorrow's problem with today's computer; the computer scientist... often has it the other way around.'' (from `Numerical Recipes in C') From r2d2 at yebo.co.za Wed Jul 23 13:07:07 2003 From: r2d2 at yebo.co.za (JvdW) Date: 23 Jul 2003 14:07:07 +0200 Subject: [tpop3d-discuss] TPOP3D and LDAP Message-ID: <1058962027.1969.90.camel@diablo.tiscali.co.za> --=-0XC0fSEM13xnRehHlFXT Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi all I'm running TPOP3D, using MySQL for authentication and mailbox location. All works really well, but I would like to drop the MySQL database and move over to our current LDAP database. This is mainly for ease of administration. LDAP runs on a different host than where TPOP3D is on. Is it possible to install it this way without having to install openldap on the same host? Any help is greatly appreciated. Cheers JvdW --=-0XC0fSEM13xnRehHlFXT Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Hi all

I'm running TPOP3D, using MySQL for authentication and mailbox location. All works really well, but I would like to drop the MySQL database and move over to our current LDAP database. This is mainly for ease of administration. LDAP runs on a different host than where TPOP3D is on.

Is it possible to install it this way without having to install openldap on the same host?

Any help is greatly appreciated.

Cheers
JvdW --=-0XC0fSEM13xnRehHlFXT-- From chris at ex-parrot.com Wed Jul 23 14:09:27 2003 From: chris at ex-parrot.com (Chris Lightfoot) Date: Wed, 23 Jul 2003 14:09:27 +0100 Subject: [tpop3d-discuss] TPOP3D and LDAP In-Reply-To: <1058962027.1969.90.camel@diablo.tiscali.co.za> References: <1058962027.1969.90.camel@diablo.tiscali.co.za> Message-ID: <20030723130927.GC9860@aquila.esc.cam.ac.uk> On Wed, Jul 23, 2003 at 02:07:07PM +0200, JvdW wrote: [ tpop3d + auth-ldap ] > Is it possible to install it this way without having to install openldap > on the same host? You need the OpenLDAP client libraries. If you're installing OpenLDAP from packages, you can probably install these separately from the rest of OpenLDAP. Otherwise you'll have to at least get the whole distribution and compile parts of it. -- ``Early to rise and early to bed, makes a man healthy, wealthy and dead.'' (Thurber) From beasts.org at paulm.com Tue Jul 29 14:18:35 2003 From: beasts.org at paulm.com (Paul Makepeace) Date: Tue, 29 Jul 2003 14:18:35 +0100 Subject: [tpop3d-discuss] TLS status Message-ID: <20030729131835.GI7494@mythix.realprogrammers.com> Hello, A user has requested "secure access" to their email and I thus began wondering what the status of TLS/SSL support in tpop3d was. I've read thru' the Jan 2002 thread which seems to end in talk of tlsproxyd -- but tpop3d in CVS seems to support it. (?) Google isn't showing much for tpop3d+tls In particular I'd be delighted to hear of experiences with how it's deployed (e.g. tpop3d.conf & command line invocations to forge cerificates, etc), how it plays with real life MUAs and what else to expect. Having wasted five hours of my life debugging SMTP AUTH with various MS Outlook variants and discovering a key piece of info that would've saved that time I'd rather ask here than start a lonely path of experimentation. Ultimately I'm happy to patch INSTALL to include more info. Thanks! Paul -- Paul Makepeace ....................................... http://paulm.com/ "What is sewing? It itches." -- http://paulm.com/toys/surrealism/ From chris at ex-parrot.com Tue Jul 29 14:23:40 2003 From: chris at ex-parrot.com (Chris Lightfoot) Date: Tue, 29 Jul 2003 14:23:40 +0100 Subject: [tpop3d-discuss] TLS status In-Reply-To: <20030729131835.GI7494@mythix.realprogrammers.com> References: <20030729131835.GI7494@mythix.realprogrammers.com> Message-ID: <20030729132340.GH21667@aquila.esc.cam.ac.uk> On Tue, Jul 29, 2003 at 02:18:35PM +0100, Paul Makepeace wrote: > Hello, > > A user has requested "secure access" to their email and I thus began > wondering what the status of TLS/SSL support in tpop3d was. I've read > thru' the Jan 2002 thread which seems to end in talk of tlsproxyd -- but > tpop3d in CVS seems to support it. (?) Google isn't showing much for > tpop3d+tls > > In particular I'd be delighted to hear of experiences with how it's > deployed (e.g. tpop3d.conf & command line invocations to forge > cerificates, etc), how it plays with real life MUAs and what else to > expect. Having wasted five hours of my life debugging SMTP AUTH with > various MS Outlook variants and discovering a key piece of info that > would've saved that time I'd rather ask here than start a lonely path of > experimentation. The simple answer is that TLS support is in the current prerelease version of tpop3d and works. But the last time there was a serious discussion of this, there were some possible bugs in the buffering code. I believe that these have been fixed, but am not certain, and it's a while since I've looked at it. (As you can tell, I've been rather busy for the last few months....) There were some MUA issues, but I think most of them are now sorted out. The stuff is documented in the latest man pages. ... and the prerelease versions of tpop3d are, of course, prereleases. -- ``If once a man indulges himself in murder, very soon he comes to think little of robbing; and from robbing he next comes to drinking and Sabbath-breaking, and from that to incivility and procrastination.'' (Thomas De Quincey) From beasts.org at paulm.com Tue Jul 29 14:50:56 2003 From: beasts.org at paulm.com (Paul Makepeace) Date: Tue, 29 Jul 2003 14:50:56 +0100 Subject: [tpop3d-discuss] TLS status In-Reply-To: <20030729132340.GH21667@aquila.esc.cam.ac.uk> References: <20030729131835.GI7494@mythix.realprogrammers.com> <20030729132340.GH21667@aquila.esc.cam.ac.uk> Message-ID: <20030729135056.GB27299@mythix.realprogrammers.com> On Tue, Jul 29, 2003 at 02:23:40PM +0100, Chris Lightfoot wrote: > On Tue, Jul 29, 2003 at 02:18:35PM +0100, Paul Makepeace wrote: > > In particular I'd be delighted to hear of experiences with how it's > > deployed (e.g. tpop3d.conf & command line invocations to forge > > cerificates, etc), how it plays with real life MUAs and what else to > > expect. Having wasted five hours of my life debugging SMTP AUTH with > > various MS Outlook variants and discovering a key piece of info that > > would've saved that time I'd rather ask here than start a lonely path of > > experimentation. > > The stuff is documented in the latest man pages. Hmm, I have : listen-address: 0.0.0.0:995;tls=immediate,certificate=/etc/mail/cert 0.0.0.0:11000 And yet when I telnet to 995 I get intelligible text which is not what I'd expect from an "immediate" connection. Is this a suggested configuration for TLS-only on port pop3s (995)? (This is the kind of info I'm after that isn't in the docs. The docs seem to pre-suppose a faint clue about TLS which I openly admit I do not really have.) Paul -- Paul Makepeace ....................................... http://paulm.com/ "If dreams hang in idle currents, then it's time to light the lights." -- http://paulm.com/toys/surrealism/ From chris at ex-parrot.com Tue Jul 29 14:55:28 2003 From: chris at ex-parrot.com (Chris Lightfoot) Date: Tue, 29 Jul 2003 14:55:28 +0100 Subject: [tpop3d-discuss] TLS status In-Reply-To: <20030729135056.GB27299@mythix.realprogrammers.com> References: <20030729131835.GI7494@mythix.realprogrammers.com> <20030729132340.GH21667@aquila.esc.cam.ac.uk> <20030729135056.GB27299@mythix.realprogrammers.com> Message-ID: <20030729135528.GA657@aquila.esc.cam.ac.uk> On Tue, Jul 29, 2003 at 02:50:56PM +0100, Paul Makepeace wrote: > On Tue, Jul 29, 2003 at 02:23:40PM +0100, Chris Lightfoot wrote: [ the joy of SSL ] > > > experimentation. > > > > The stuff is documented in the latest man pages. > > Hmm, I have : > > listen-address: 0.0.0.0:995;tls=immediate,certificate=/etc/mail/cert 0.0.0.0:11000 > > And yet when I telnet to 995 I get intelligible text which is not what > I'd expect from an "immediate" connection. No, that's what you should expect -- tpop3d is sending the first bit of TLS negotiation bumf, which is not human readable. (Well, not unless you're really good at multiplying big numbers in your head....) Try using openssl s_client -host localhost -port 995 -- works for me. I couldn't find a better name than `immediate' for the mode where you establish the TLS connection as soon as the physical connection is established. It's not exactly obvious, is it? > Is this a suggested configuration for TLS-only on port pop3s (995)? Yep. -- ``He managed to hoodwink not just the great and the good like Margaret Thatcher, John Major and William Hague, but many very clever people too.'' (newspaper article, describing Jeffrey Archer) From beasts.org at paulm.com Tue Jul 29 20:08:22 2003 From: beasts.org at paulm.com (Paul Makepeace) Date: Tue, 29 Jul 2003 20:08:22 +0100 Subject: [tpop3d-discuss] TLS status In-Reply-To: <20030729135528.GA657@aquila.esc.cam.ac.uk> References: <20030729131835.GI7494@mythix.realprogrammers.com> <20030729132340.GH21667@aquila.esc.cam.ac.uk> <20030729135056.GB27299@mythix.realprogrammers.com> <20030729135528.GA657@aquila.esc.cam.ac.uk> Message-ID: <20030729190822.GA14718@mythix.realprogrammers.com> On Tue, Jul 29, 2003 at 02:55:28PM +0100, Chris Lightfoot wrote: > On Tue, Jul 29, 2003 at 02:50:56PM +0100, Paul Makepeace wrote: > > On Tue, Jul 29, 2003 at 02:23:40PM +0100, Chris Lightfoot wrote: > [ the joy of SSL ] > > > > experimentation. > > > > > > The stuff is documented in the latest man pages. > > > > Hmm, I have : > > > > listen-address: 0.0.0.0:995;tls=immediate,certificate=/etc/mail/cert 0.0.0.0:11000 ** That should in fact not have the "certificate=" bit. > > > > And yet when I telnet to 995 I get intelligible text which is not what > > I'd expect from an "immediate" connection. > > No, that's what you should expect -- tpop3d is sending the > first bit of TLS negotiation bumf, which is not human I did say /intelligible/, i.e. I can read it, viz: $ telnet localhost 995 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. +OK <79ac204b6550fc1a31f0957ace4cd1db@mythix> ^] telnet> close Connection closed. $ Anyway it turned out I accidently was executing the old tpop3d. Duh, pardon me. It seems to be working at least from the openssl command line test. Once I've had users try it I'll make a INSTALL.TLS doc or something for my sins. > mode where you establish the TLS connection as soon as the > physical connection is established. It's not exactly > obvious, is it? This bit I did actually understand from the docs :) I noticed that if tpop3d can't bind to all its ports it is merely a warning not an error and the daemon doesn't exit. I was surprised by this as I'd generally treat failure to bind as a hard error; is this intentional? Paul -- Paul Makepeace ....................................... http://paulm.com/ "If life is good, then will I really have to explain this to my parents." -- http://paulm.com/toys/surrealism/ From chris at ex-parrot.com Tue Jul 29 20:13:08 2003 From: chris at ex-parrot.com (Chris Lightfoot) Date: Tue, 29 Jul 2003 20:13:08 +0100 Subject: [tpop3d-discuss] TLS status In-Reply-To: <20030729190822.GA14718@mythix.realprogrammers.com> References: <20030729131835.GI7494@mythix.realprogrammers.com> <20030729132340.GH21667@aquila.esc.cam.ac.uk> <20030729135056.GB27299@mythix.realprogrammers.com> <20030729135528.GA657@aquila.esc.cam.ac.uk> <20030729190822.GA14718@mythix.realprogrammers.com> Message-ID: <20030729191308.GB15963@caesious.cold.local> On Tue, Jul 29, 2003 at 08:08:22PM +0100, Paul Makepeace wrote: > On Tue, Jul 29, 2003 at 02:55:28PM +0100, Chris Lightfoot wrote: > > On Tue, Jul 29, 2003 at 02:50:56PM +0100, Paul Makepeace wrote: [...] > > > And yet when I telnet to 995 I get intelligible text which is not what > > > I'd expect from an "immediate" connection. > > > > No, that's what you should expect -- tpop3d is sending the > > first bit of TLS negotiation bumf, which is not human > > I did say /intelligible/, i.e. I can read it, viz: ach, I should actually read this stuff before replying to it :) > I noticed that if tpop3d can't bind to all its ports it is merely a > warning not an error and the daemon doesn't exit. I was surprised by > this as I'd generally treat failure to bind as a hard error; is this > intentional? Um. Difficult question. On the one hand I can imagine somebody running it to listen on a zillion different interfaces; if one fails, you don't want to lose service for everybody else. Equally, if you have (say) two listeners, you'd probably want it to fail if either can't bind. Since nobody actually reads the log messages anyway (see mailing list messages passim...) I don't think it makes much difference what it does.... -- ``The whole purpose of places like Starbucks is for people with no decision making ability to make six decisions just to buy one cup of coffee.''