Re: weird qmail-popup behaviour?
On Thu, Jul 05, 2001 at 11:21:10PM +0200, Peter van Dijk wrote: On Thu, Jul 05, 2001 at 05:20:54PM +0200, Arjen van Drie wrote: [snip] This is the 'run' script started by supervise: #!/bin/sh exec /usr/local/bin/tcpserver -x /etc/tcprules.d/tcp.pop3.cdb -v -R -H -l 0 0 110 \ /var/qmail/bin/qmail-popup ids.trivial.3va.net /bin/checkpassword \ /var/qmail/bin/qmail-pop3d Maildir 21 Could you show us a hexdump of that file? This is interesting :) 000 2123 622f 6e69 732f 0a68 7865 6365 2f20 010 7375 2f72 6f6c 6163 2f6c 6962 2f6e 6374 020 7370 7265 6576 2072 782d 2f20 7465 2f63 030 6374 7270 6c75 7365 642e 742f 7063 702e 040 706f 2e33 6463 2062 762d 2d20 2052 482d 050 2d20 206c 2030 2030 3131 2030 0a5c 2f09 060 6176 2f72 6d71 6961 2f6c 6962 2f6e 6d71 070 6961 2d6c 6f70 7570 2070 6469 2e73 7274 080 7669 6169 2e6c 7633 2e61 656e 2074 622f 090 6e69 632f 6568 6b63 6170 7373 6f77 6472 0a0 5c20 0a20 2f09 6176 2f72 6d71 6961 2f6c 0b0 6962 2f6e 6d71 6961 2d6c 6f70 3370 2064 0c0 614d 6c69 6964 2072 3e32 3126 0a0a 0ce Remember, it _only_ doesn't work when run by supervise. When run without supervise it works fine :\ -- Grtz, Arjen.
Re: weird qmail-popup behaviour?
On Fri, Jul 06, 2001 at 08:42:57AM +0200, Arjen van Drie wrote: On Thu, Jul 05, 2001 at 11:21:10PM +0200, Peter van Dijk wrote: On Thu, Jul 05, 2001 at 05:20:54PM +0200, Arjen van Drie wrote: [snip] This is the 'run' script started by supervise: #!/bin/sh exec /usr/local/bin/tcpserver -x /etc/tcprules.d/tcp.pop3.cdb -v -R -H -l 0 0 110 \ /var/qmail/bin/qmail-popup ids.trivial.3va.net /bin/checkpassword \ /var/qmail/bin/qmail-pop3d Maildir 21 When i run this one like this: #!/bin/sh exec /usr/local/bin/tcpserver -x /etc/tcprules.d/tcp.pop3.cdb -v -R -H -l 0 0 110 \ /var/qmail/bin/qmail-popup ids.trivial.3va.net /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 21 it works! Duh! All other qmail run scripts with multiple lines ended by '\' do work. Nou breekt mijn klomp :\ (Dutch expression: now my wooden shoe breaks). Could you show us a hexdump of that file? This is interesting :) 000 2123 622f 6e69 732f 0a68 7865 6365 2f20 010 7375 2f72 6f6c 6163 2f6c 6962 2f6e 6374 020 7370 7265 6576 2072 782d 2f20 7465 2f63 030 6374 7270 6c75 7365 642e 742f 7063 702e 040 706f 2e33 6463 2062 762d 2d20 2052 482d 050 2d20 206c 2030 2030 3131 2030 0a5c 2f09 060 6176 2f72 6d71 6961 2f6c 6962 2f6e 6d71 070 6961 2d6c 6f70 7570 2070 6469 2e73 7274 080 7669 6169 2e6c 7633 2e61 656e 2074 622f 090 6e69 632f 6568 6b63 6170 7373 6f77 6472 0a0 5c20 0a20 2f09 6176 2f72 6d71 6961 2f6c 0b0 6962 2f6e 6d71 6961 2d6c 6f70 3370 2064 0c0 614d 6c69 6964 2072 3e32 3126 0a0a 0ce Remember, it _only_ doesn't work when run by supervise. When run without supervise it works fine :\ -- Grtz, Arjen. -- Grtz, Arjen.
Re: weird qmail-popup behaviour?
On Fri, Jul 06, 2001 at 12:04:39AM -0700, Ian Lance Taylor wrote: Arjen van Drie [EMAIL PROTECTED] writes: On Thu, Jul 05, 2001 at 11:21:10PM +0200, Peter van Dijk wrote: Could you show us a hexdump of that file? This is interesting :) 000 2123 622f 6e69 732f 0a68 7865 6365 2f20 010 7375 2f72 6f6c 6163 2f6c 6962 2f6e 6374 020 7370 7265 6576 2072 782d 2f20 7465 2f63 030 6374 7270 6c75 7365 642e 742f 7063 702e 040 706f 2e33 6463 2062 762d 2d20 2052 482d 050 2d20 206c 2030 2030 3131 2030 0a5c 2f09 060 6176 2f72 6d71 6961 2f6c 6962 2f6e 6d71 070 6961 2d6c 6f70 7570 2070 6469 2e73 7274 080 7669 6169 2e6c 7633 2e61 656e 2074 622f 090 6e69 632f 6568 6b63 6170 7373 6f77 6472 0a0 5c20 0a20 2f09 6176 2f72 6d71 6961 2f6c 0b0 6962 2f6e 6d71 6961 2d6c 6f70 3370 2064 0c0 614d 6c69 6964 2072 3e32 3126 0a0a 0ce There is a space after the second backslash. This means that the backslash is not a line continuation character, since that only happens if the backslash appears at the end of the line. That means that checkpassword is being run with no arguments, which causes it to silently and immediately exit. You will see this if you use `cat -ve' on the file. Thanks all. It works now. How does one read hexdumps? Is there a howto or a table somewhere? -- Grtz, Arjen.
Re: weird qmail-popup behaviour?
On Fri, Jul 06, 2001 at 11:00:12PM +0200, Arjen van Drie wrote: [snip] You will see this if you use `cat -ve' on the file. Thanks all. It works now. How does one read hexdumps? Is there a howto or a table somewhere? On FreeBSD I like hexdump -C a lot, which gives output like: bash$ hexdump -C /var/service/qmail-send/run 23 21 2f 62 69 6e 2f 73 68 0a 65 78 65 63 20 65 |#!/bin/sh.exec e| 0010 6e 76 20 2d 20 50 41 54 48 3d 22 2f 76 61 72 2f |nv - PATH=/var/| 0020 71 6d 61 69 6c 2f 62 69 6e 3a 24 50 41 54 48 22 |qmail/bin:$PATH| 0030 20 71 6d 61 69 6c 2d 73 74 61 72 74 20 2e 2f 4d | qmail-start ./M| 0040 61 69 6c 64 69 72 2f 0a |aildir/.| 0048 Which immediately shows where exactly the spaces are and everything. For reading hexdumps without ascii side-output, you need to convert the hex codes to ascii. Google can teach you a lot about that, I don't have anything handy right now (and too much blood in my alcohol). Greetz, Peter -- Against Free Sex! http://www.dataloss.nl/Megahard_en.html
Re: weird qmail-popup behaviour?
Peter van Dijk [EMAIL PROTECTED] writes: On Fri, Jul 06, 2001 at 11:00:12PM +0200, Arjen van Drie wrote: [snip] You will see this if you use `cat -ve' on the file. Thanks all. It works now. How does one read hexdumps? Is there a howto or a table somewhere? [...] For reading hexdumps without ascii side-output, you need to convert the hex codes to ascii. Google can teach you a lot about that, I don't have anything handy right now (and too much blood in my alcohol). On Linux, see the ascii(7) manpage. If you're not, search around for it, or email me off-list and I'll send you a copy. ScottG.
Re: weird qmail-popup behaviour?
On Sat, Jul 07, 2001 at 01:38:02AM +0200, Peter van Dijk wrote: Which immediately shows where exactly the spaces are and everything. cat -ev is helpful as well. --Adam
Re: weird qmail-popup behaviour?
On Wed, Jul 04, 2001 at 10:01:49AM +0200, Peter van Dijk wrote: On Wed, Jul 04, 2001 at 08:17:13AM +0200, Arjen van Drie wrote: [snip] Any ideas? Hmm, no clue. Tried stracing? Yeah, but that doesn't tell me much: [root@ids /root]# strace -p 21534 select(1, [0], NULL, NULL, {1185, 48}) = 1 (in [0], left {1172, 22}) read(0, user qwerty\r\n, 128) = 13 select(2, NULL, [1], NULL, {1200, 0}) = 1 (out [1], left {1200, 0}) write(1, +OK \r\n, 6) = 6 select(1, [0], NULL, NULL, {1200, 0}) = 1 (in [0], left {1196, 93}) read(0, pass qwerqwer\r\n, 128) = 15 fcntl64(1, F_GETFL) = 0x2 (flags O_RDWR) close(2)= 0 fcntl64(1, F_DUPFD, 2) = 2 close(3)= -1 EBADF (Bad file descriptor) pipe([3, 4])= 0 fork() = 21569 close(3)= 0 write(4, qwerty\0qwerqwer\021534.994315366..., 54) = 54 close(4)= 0 --- SIGCHLD (Child exited) --- wait4(21569, [WIFEXITED(s) WEXITSTATUS(s) == 111], 0, NULL) = 21569 select(2, NULL, [1], NULL, {1200, 0}) = 1 (out [1], left {1200, 0}) write(1, -ERR authorization failed\r\n, 27) = 27 _exit(1)= ? -- Grtz, Arjen.
Re: weird qmail-popup behaviour?
On Thu, Jul 05, 2001 at 08:48:11AM +0200, Arjen van Drie wrote: On Wed, Jul 04, 2001 at 10:01:49AM +0200, Peter van Dijk wrote: On Wed, Jul 04, 2001 at 08:17:13AM +0200, Arjen van Drie wrote: [snip] Any ideas? Hmm, no clue. Tried stracing? Yeah, but that doesn't tell me much: [root@ids /root]# strace -p 21534 Try adding -f, so we see what the child does. Greetz, Peter -- Against Free Sex! http://www.dataloss.nl/Megahard_en.html
Re: weird qmail-popup behaviour?
On Thu, Jul 05, 2001 at 01:27:05PM +0200, Peter van Dijk wrote: Try adding -f, so we see what the child does. Ok. First the one by hand, i only left the relevant strace output [pid 13002] munmap(0x40017000, 4096)= 0 [pid 13002] setgroups32(1, [513]) = 0 [pid 13002] setgid32(513) = 0 [pid 13002] setuid32(513) = 0 [pid 13002] chdir(/home/qwerty) = 0 [pid 13002] execve(/var/qmail/bin/qmail-pop3d, [/var/qmail/bin/qmail-pop3d, Maildir], [/* 31 vars */]) = 0 [pid 13002] uname({sys=Linux, node=ids.trivial.3va.net, ...}) = 0 [pid 13002] brk(0) = 0x804e210 [pid 13002] old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000 [pid 13002] open(/etc/ld.so.preload, O_RDONLY) = -1 ENOENT (No such file or directory) [pid 13002] open(/etc/ld.so.cache, O_RDONLY) = 3 [pid 13002] fstat64(3, {st_mode=S_IFREG|0644, st_size=19076, ...}) = 0 [pid 13002] old_mmap(NULL, 19076, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000 [pid 13002] close(3)= 0 [pid 13002] open(/lib/libc.so.6, O_RDONLY) = 3 [pid 13002] read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0H\277\1..., 1024) = 1024 and all goes well. Then started by svscan: [pid 13202] munmap(0x40017000, 4096)= 0 [pid 13202] setgroups32(1, [513]) = 0 [pid 13202] setgid32(513) = 0 [pid 13202] setuid32(513) = 0 [pid 13202] chdir(/home/qwerty) = 0 [pid 13202] execve(/usr/local/bin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] execve(/usr/sbin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] execve(/usr/bin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] execve(/bin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] _exit(111) = ? ... wait4 resumed [WIFEXITED(s) WEXITSTATUS(s) == 111], 0, NULL) = 13202 --- SIGCHLD (Child exited) --- select(2, NULL, [1], NULL, {1200, 0}) = 1 (out [1], left {1200, 0}) write(1, -ERR authorization failed\r\n, 27) = 27 _exit(1)= ? Although /var/qmail/bin is in $PATH. -- Grtz, Arjen.
Re: weird qmail-popup behaviour?
Arjen van Drie [EMAIL PROTECTED] wrote: [pid 13202] chdir(/home/qwerty) = 0 [pid 13202] execve(/usr/local/bin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] execve(/usr/sbin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] execve(/usr/bin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] execve(/bin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] _exit(111) = ? It's searching the path, trying to exec a program named -- a single space. That can't be correct. What's in the script that starts this process again? Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ ---
Re: weird qmail-popup behaviour?
On Thu, Jul 05, 2001 at 08:08:25AM -0600, Charles Cazabon wrote: Arjen van Drie [EMAIL PROTECTED] wrote: [pid 13202] chdir(/home/qwerty) = 0 [pid 13202] execve(/usr/local/bin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] execve(/usr/sbin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] execve(/usr/bin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] execve(/bin/ , [ ], [/* 18 vars */]) = -1 ENOENT (No such file or directory) [pid 13202] _exit(111) = ? It's searching the path, trying to exec a program named -- a single space. That can't be correct. What's in the script that starts this process again? This is the 'run' script started by supervise: #!/bin/sh exec /usr/local/bin/tcpserver -x /etc/tcprules.d/tcp.pop3.cdb -v -R -H -l 0 0 110 \ /var/qmail/bin/qmail-popup ids.trivial.3va.net /bin/checkpassword \ /var/qmail/bin/qmail-pop3d Maildir 21 -- Grtz, Arjen.
Re: weird qmail-popup behaviour?
On Thu, Jul 05, 2001 at 05:20:54PM +0200, Arjen van Drie wrote: [snip] This is the 'run' script started by supervise: #!/bin/sh exec /usr/local/bin/tcpserver -x /etc/tcprules.d/tcp.pop3.cdb -v -R -H -l 0 0 110 \ /var/qmail/bin/qmail-popup ids.trivial.3va.net /bin/checkpassword \ /var/qmail/bin/qmail-pop3d Maildir 21 Could you show us a hexdump of that file? This is interesting :) Greetz, Peter -- Against Free Sex! http://www.dataloss.nl/Megahard_en.html
Re: weird qmail-popup behaviour?
On Wed, Jul 04, 2001 at 08:17:13AM +0200, Arjen van Drie wrote: [snip] Any ideas? Hmm, no clue. Tried stracing? Greetz, Peter -- Against Free Sex! http://www.dataloss.nl/Megahard_en.html
weird qmail-popup behaviour?
Uhmm, something I don't get. When I run as root by hand: /usr/local/bin/tcpserver -x /etc/tcprules.d/tcp.pop3.cdb -v -R -H -l 0 0 110 \ /var/qmail/bin/qmail-popup my.hostname.ext /bin/checkpassword \ /var/qmail/bin/qmail-pop3d Maildir 21 I get: [arjen@bami arjen]$ telnet my.hostname.ext 110 Trying 172.16.3.1... Connected to my.hostname.ext. Escape character is '^]'. +OK [EMAIL PROTECTED] user qwerty +OK pass qwerqwer +OK But when i run exactly the same using supervise in my bootup script: #!/bin/sh #exec /usr/local/bin/softlimit -m 200 \ exec /usr/local/bin/tcpserver -x /etc/tcprules.d/tcp.pop3.cdb -v -R -H -l 0 0 110 \ /var/qmail/bin/qmail-popup my.hostname.ext /bin/checkpassword \ /var/qmail/bin/qmail-pop3d Maildir 21 (softlimit also gives me an error, says it doesn't know the -m option) i get: [arjen@bami arjen]$ telnet my.hostname.ext 110 Trying 172.16.3.1... Connected to my.hostname.ext. Escape character is '^]'. +OK [EMAIL PROTECTED] user qwerty +OK pass qwerqwer -ERR authorization failed Connection closed by foreign host. Any ideas? -- Grtz, Arjen.
Help with qmail-popup and tcpserver (Unable to write pipe Error)
I'm setting up qmail with tcpserver. After several tests I wanted to clean up the config files, but I can't connect anymore to retrieve my messages. I try to connect with telnet 127.0.0.1 110 and receive "-ERR unable to write pipe" after authentication : Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. +OK [EMAIL PROTECTED] user azerty +OK pass qwerty -ERR unable to write pipe Connection closed by foreign host. - Content of /etc/init.d/qmail (start section) csh -cf '/var/qmail/rc ' /usr/local/bin/tcpserver -x/etc/tcp.smtp.cdb -R -v -u 7791 -g 2108 0 smtp /var/qmail/bin/qmail-smtpd 21 | /var/qmail/bin/splogger smtpd 3 echo $! /var/lock/subsys/qmail-smtpd /usr/local/bin/tcpserver -R 0 pop3 /var/qmail/bin/qmail-popup trimaran.com \ /bin/checkpoppassword /var/qmail/bin/qmail-pop3d Maildir echo $! /var/lock/subsys/qmail-pop3d Any help appreciated !! Raphael
RE: Help with qmail-popup and tcpserver (Unable to write pipe Error)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday, April 17, 2001 10:25, Raphael Debeugny [SMTP:[EMAIL PROTECTED]] wrote: [snip] pass qwerty -ERR unable to write pipe Connection closed by foreign host. - Content of /etc/init.d/qmail (start section) csh -cf '/var/qmail/rc ' /usr/local/bin/tcpserver -x/etc/tcp.smtp.cdb -R -v -u 7791 -g 2108 0 smtp /var/qmail/bin/qmail-smtpd 21 | /var/qmail/bin/splogger smtpd 3 echo $! /var/lock/subsys/qmail-smtpd /usr/local/bin/tcpserver -R 0 pop3 /var/qmail/bin/qmail-popup trimaran.com \ /bin/checkpoppassword /var/qmail/bin/qmail-pop3d Maildir echo $! /var/lock/subsys/qmail-pop3d check the paths permissions and ownership of checkpoppassword and qmail-pop3d if you using the standard qmail setup it should be checkpassword unless you replaced it with another version. Any help appreciated !! Raphael -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.3 for non-commercial use http://www.pgp.com iQA/AwUBOtvz2v4IaGw3x6aJEQL+hQCfeUA9OjLyZTJ2UDWZv/FemJyLTDIAnA8e KmsHzHIBn4jFzIqX09ucKM6P =ByX8 -END PGP SIGNATURE-
Re: Help with qmail-popup and tcpserver (Unable to write pipe Error)
Willy De la Court a crit : check the paths permissions and ownership of checkpoppassword and qmail-pop3d if you using the standard qmail setup it should be checkpassword unless you replaced it with another version. It's working now !! I wanted to use checkpoppasswd.c from Paul Gregg in order to store passwords outside of /etc/passwd. I had a problem of compilation of checkpoppasswd. I renamed checkpoppasswd.c in checkpasswd.c in checkpassword-0.90 and make the installation. Thanks Raphael
qmail-popup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, A question about qmail-popup. Here is a part of the qmail-popup manual. qmail-popup expects descriptor 0 to read from the network and descriptor 1 to write to the network. It reads a username and password from descriptor 0 in POP's USER-PASS style or APOP style. It invokes subprogram, with the same descriptors 0 and 1; descriptor 2 writing to the network; and descriptor 3 reading the username, What use is it to give descriptor 2 as writing to the network i'v checked the source for qmail-pop3d and did not find anything that wrote to descriptor 2. Are there any programs out there that do use it? I know descriptor 2 is stderr so it could be that when an error msg is send to stderr it is send to the network, but how can you do logging in this case. My patch for pop3d loggin disables this feature and send the error msgs from qmail-pop3d to stdout(1) and stderr(2) so that the error is send to the network and also to any logging program that is used. Any comments on this. Willy De la Court -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.3 for non-commercial use http://www.pgp.com iQA/AwUBOts5Ov4IaGw3x6aJEQLhmgCeIjOtxfd86vlI0QMnyDpH0yU7eqUAoKNB YTTlokvu4e/OsLpkAoJdyCIe =Tng7 -END PGP SIGNATURE-
Logging patch for qmail-pop3d and qmail-popup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I wrote a small patch to do some logging of POP account usage. I only wanted to have some loggin of users loggin in and the message size retrieved. Also any error that occurs is logged in order to facilitate incorrect login attempts and other errors. NO PASSWORD are written to the logfile. Please give some feedback. Here it is. diff -Naur qmail-1.03.orig/qmail-pop3d.c qmail-1.03/qmail-pop3d.c - --- qmail-1.03.orig/qmail-pop3d.c Sat Feb 24 14:26:54 2001 +++ qmail-1.03/qmail-pop3d.cSat Feb 24 22:52:55 2001 @@ -41,6 +41,9 @@ char ssinbuf[128]; substdio ssin = SUBSTDIO_FDBUF(saferead,0,ssinbuf,sizeof ssinbuf); +char sserrbuf[128]; +substdio sserr = SUBSTDIO_FDBUF(safewrite,2,sserrbuf,sizeof sserrbuf); + void put(buf,len) char *buf; int len; { substdio_put(ssout,buf,len); @@ -53,8 +56,25 @@ { substdio_flush(ssout); } +void writelog(char *x1, char *x2, char *x3, char *x4) +{ + char strnum[FMT_ULONG]; + + strnum[fmt_ulong(strnum,getpid())] = 0; + + substdio_puts(sserr,"pop3d: pid "); + substdio_puts(sserr,strnum); + substdio_puts(sserr," "); + if (x1) substdio_puts(sserr,x1); + if (x2) substdio_puts(sserr,x2); + if (x3) substdio_puts(sserr,x3); + if (x4) substdio_puts(sserr,x4); + substdio_puts(sserr,"\n"); + substdio_flush(sserr); +} void err(s) char *s; { + writelog("-ERR ", s, 0, 0); puts("-ERR "); puts(s); puts("\r\n"); @@ -193,6 +213,7 @@ rename(m[i].fn,line.s); /* if it fails, bummer */ } okay(); + writelog("QUIT", 0, 0, 0); die(); } @@ -257,6 +278,7 @@ int i; unsigned long limit; int fd; + char strnum[FMT_ULONG]; i = msgno(arg); if (i == -1) return; @@ -271,6 +293,8 @@ substdio_fdbuf(ssmsg,read,fd,ssmsgbuf,sizeof(ssmsgbuf)); blast(ssmsg,limit); close(fd); + strnum[fmt_ulong(strnum,m[i].size)] = 0; + writelog("RETR: ", "msglen: ", strnum, 0); } struct commands pop3commands[] = { diff -Naur qmail-1.03.orig/qmail-popup.c qmail-1.03/qmail-popup.c - --- qmail-1.03.orig/qmail-popup.c Mon Jun 15 12:53:16 1998 +++ qmail-1.03/qmail-popup.cSat Feb 24 22:52:55 2001 @@ -38,6 +38,9 @@ char ssinbuf[128]; substdio ssin = SUBSTDIO_FDBUF(saferead,0,ssinbuf,sizeof ssinbuf); +char sserrbuf[128]; +substdio sserr = SUBSTDIO_FDBUF(safewrite,2,sserrbuf,sizeof sserrbuf); + void puts(s) char *s; { substdio_puts(ssout,s); @@ -46,8 +49,25 @@ { substdio_flush(ssout); } +void writelog(char *x1, char *x2, char *x3, char *x4) +{ + char strnum[FMT_ULONG]; + + strnum[fmt_ulong(strnum,getpid())] = 0; + + substdio_puts(sserr,"popup: pid "); + substdio_puts(sserr,strnum); + substdio_puts(sserr," "); + if (x1) substdio_puts(sserr,x1); + if (x2) substdio_puts(sserr,x2); + if (x3) substdio_puts(sserr,x3); + if (x4) substdio_puts(sserr,x4); + substdio_puts(sserr,"\n"); + substdio_flush(sserr); +} void err(s) char *s; { + writelog("-ERR ", s, 0, 0); puts("-ERR "); puts(s); puts("\r\n"); @@ -67,7 +87,7 @@ void err_authoriz() { err("authorization first"); } void okay() { puts("+OK \r\n"); flush(); } - -void pop3_quit() { okay(); die(); } +void pop3_quit() { okay(); writelog("QUIT", 0, 0, 0); die(); } char unique[FMT_ULONG + FMT_ULONG + 3]; @@ -88,7 +108,14 @@ int wstat; int pi[2]; - - if (fd_copy(2,1) == -1) die_pipe(); + /* Don't know why this is needed has no effect when removed + it stands in the way of good logging with multilog + checked qmail-pop3d it does not use the fd 2 + it only writes to stdout not stderr not even for errors + Willy De la Court [EMAIL PROTECTED] + */ + + /* if (fd_copy(2,1) == -1) die_pipe();*/ close(3); if (pipe(pi) == -1) die_pipe(); if (pi[0] != 3) die_pipe(); @@ -140,6 +167,7 @@ seenuser = 1; if (!stralloc_copys(username,arg)) die_nomem(); if (!stralloc_0(username)) die_nomem(); + writelog("USER: ", arg, 0, 0); } void pop3_pass(arg) char *arg; { @@ -153,6 +181,7 @@ space = arg + str_chr(arg,' '); if (!*space) { err_syntax(); return; } *space++ = 0; + writelog("APOP: ", arg, 0, 0); doanddie(arg,space - arg,space); } -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.3 for non-commercial use http://www.pgp.com iQA/AwUBOsoypf4IaGw3x6aJEQJeHQCfT1AIeTmy86XZIfDKcfPWk0Lh/3gAn2YQ b8k/K/VPwyTvQxC5JFyLEumH =/0QT -END PGP SIGNATURE-
Re: Qmail-Popup Problem
That makes sense. It only seems to be the @home addresses that have trouble, and the trouble seems to be intermittent (no problems today). Thanks for you help. -K "Do not meddle in the affairs of wizards, for they are subtle and quick to anger." From: "Paul J. Schinder" [EMAIL PROTECTED] Date: Sun, 11 Mar 2001 18:52:47 -0500 To: Keary Suska [EMAIL PROTECTED] Cc: Qmail [EMAIL PROTECTED] Subject: Re: Qmail-Popup Problem Qmail-Popup is filling my logs with: qmail-popup[29108]: warning: /etc/hosts.allow, line 8: can't verify hostname: gethostbyname(c393514-a.grdjctn1.co.home.com) failed It appears that every connection attempt log this message, but I can nslookup without any problem, and tcpdmatch without any problem either. It appears that this could be a TCP Wrappers problem but I can't duplicate it with tcpdmatch, and it doesn't fail for other servers. Anyone seen this before? Yes. @Home has a tendency to lose entries in one or both of their main DNS servers. When this happens, you frequently get this kind of message from tcpwrappers. I just ran a dnstrace on this address and it looks like it's back to normal; both 24.0.0.27 and 24.2.0.27 know the address. Usually if you just wait a few hours, the problem gets fixed. Heaven help you if they lose the entries permanently, which has happened to us twice Their front line customer support people don't know what DNS is, and you have to argue with them for a while until you get kicked up the the second line people, who usually know about basic Internet services. -K -- -- Paul J. Schinder NASA Goddard Space Flight Center Code 693 [EMAIL PROTECTED]
Qmail-Popup Problem
Qmail-Popup is filling my logs with: qmail-popup[29108]: warning: /etc/hosts.allow, line 8: can't verify hostname: gethostbyname(c393514-a.grdjctn1.co.home.com) failed It appears that every connection attempt log this message, but I can nslookup without any problem, and tcpdmatch without any problem either. It appears that this could be a TCP Wrappers problem but I can't duplicate it with tcpdmatch, and it doesn't fail for other servers. Anyone seen this before? -K
Re: Qmail-Popup Problem
On Sun, Mar 11, 2001 at 04:41:41PM -0700, Keary Suska wrote: Qmail-Popup is filling my logs with: qmail-popup[29108]: warning: /etc/hosts.allow, line 8: can't verify hostname: gethostbyname(c393514-a.grdjctn1.co.home.com) failed This is tcpwrappers logging, not qmail-popup. It appears that every connection attempt log this message, but I can nslookup without any problem, and tcpdmatch without any problem either. It appears that this could be a TCP Wrappers problem but I can't duplicate it with tcpdmatch, and it doesn't fail for other servers. What's on line 8 in /etc/hosts.allow? Why are you not using tcpserver? Greetz, Peter.
Re: Qmail-Popup Problem
Qmail-Popup is filling my logs with: qmail-popup[29108]: warning: /etc/hosts.allow, line 8: can't verify hostname: gethostbyname(c393514-a.grdjctn1.co.home.com) failed It appears that every connection attempt log this message, but I can nslookup without any problem, and tcpdmatch without any problem either. It appears that this could be a TCP Wrappers problem but I can't duplicate it with tcpdmatch, and it doesn't fail for other servers. Anyone seen this before? Yes. @Home has a tendency to lose entries in one or both of their main DNS servers. When this happens, you frequently get this kind of message from tcpwrappers. I just ran a dnstrace on this address and it looks like it's back to normal; both 24.0.0.27 and 24.2.0.27 know the address. Usually if you just wait a few hours, the problem gets fixed. Heaven help you if they lose the entries permanently, which has happened to us twice Their front line customer support people don't know what DNS is, and you have to argue with them for a while until you get kicked up the the second line people, who usually know about basic Internet services. -K -- -- Paul J. Schinder NASA Goddard Space Flight Center Code 693 [EMAIL PROTECTED]
qmail-popup syslog messages
Hi, Several people asked this on the list before, but I have not found any reply. I hope to have better luck... :-) Every time the mailbox is checked with POP3, syslog reports: Mar 7 15:40:48 net1 inetd[26701]: pid 26937: exit status 1 Other than the annoying message, everything seems fine. This is what I have in inetd.conf: pop3 stream tcp nowait root /usr/sbin/tcpd /opt/qmail/bin/qmail-popup net1.alma.ch /opt/qmail/bin/checkpassword /opt/qmail/bin/qmail-pop3d Maildir (on 1 line of course) Adding "qmail-popup" before the hostname doesn't solve it. (If I remember correctly, it breaks the service) Changing "pop3" to "pop-3" breaks it as well, with another error I don't understand: Mar 7 14:41:36 net1 inetd[418]: pop-3/tcp: bind: Address already in use The system is a redhat 6.2, in case it matters. Thank you, Milivoj
qmail-popup process not starting successfully at boot
Still trying with this one - but maybe it's obvious to someone . When our SUN box reboots pop3d does not start. The when you check mail you get "An error occurred while sending your username to the mail server ..." All other qmail services appear to start - and when you re-run /etc/init.d/qmaild stop/start qmail-popup starts OK. I think that this is an environment/path problem In /nohup.out is the line 'env: No such file or directory' caused by the 'nohup /var/qmail/start-pop3d' command. Any pointers as to the possible cause of this problem would be appreciated. Many thanks The following 4 diagnostics represent two outputs of ps -ef and the two files that 'do the work'. = 1). Here are the processes running after reboot: i.e no qmail-popup process ps -ef|grep qmail qmails 179 1 0 08:36:06 ?0:00 qmail-send root 187 1 0 08:36:07 ?0:00 /usr/local/bin/supervise /var/lock/qmail-smtpd /usr/local/bin/tcpserver -v -x/v qmaill 188 1 0 08:36:07 ?0:00 accustamp qmaill 189 1 0 08:36:07 ?0:00 cyclog -s50 /var/log/qmail/qmail-smtpd qmaill 181 179 0 08:36:06 ?0:00 splogger qmail root 182 179 0 08:36:06 ?0:00 qmail-lspawn ./Mailbox qmailr 183 179 0 08:36:06 ?0:00 qmail-rspawn qmailq 184 179 0 08:36:06 ?0:00 qmail-clean qmaild 191 187 0 08:36:07 ?0:00 /usr/local/bin/tcpserver -v -x/var/qmail/etc/tcprules.cdb -uNNN -gNNN 0 25 csh = 2). Here are the process running after re-starting qmal ps -ef|grep qmail qmaill 344 1 0 08:41:10 pts/00:00 cyclog -s50 /var/log/qmail/qmail-smtpd vpopmail 347 1 0 08:41:13 pts/00:00 tcpserver -uNNN -gNNN 0 pop-3 /var/qmail/bin/qmail-popup my.mailserver.com /hom root 339 1 0 08:41:10 pts/00:00 /usr/local/bin/supervise /var/lock/qmail-smtpd /usr/local/bin/tcpserver -v -x/v qmailq 343 335 0 08:41:10 pts/00:00 qmail-clean qmaill 342 1 0 08:41:10 pts/00:00 accustamp qmailr 341 335 0 08:41:10 pts/00:00 qmail-rspawn qmaild 340 339 0 08:41:10 pts/00:00 /usr/local/bin/tcpserver -v -x/var/qmail/etc/tcprules.cdb -u110 -g103 0 25 csh root 338 335 0 08:41:10 pts/00:00 qmail-lspawn ./Mailbox qmaill 336 335 0 08:41:10 pts/00:00 splogger qmail qmails 335 1 0 08:41:10 pts/00:00 qmail-send = 3). #!/bin/sh # # /etc/init.d/qmaild # START BIT ONLY OF Script for starting and stopping mail service # PATH=$PATH:/usr/local/bin:/var/qmail/bin USERID=NNN GROUPID=NNN case "$1" in 'start') echo "Starting qmail local delivery agent..." nohup /var/qmail/start-qmaild /dev/null 21 echo "Starting qmail SMTP daemon..." nohup /var/qmail/start-smtpd /dev/null 21 echo "Starting qmail POP3 daemon..." nohup /var/qmail/start-pop3d echo "Starting qmail IMAP4 daemon..." nohup /var/qmail/start-imapd /dev/null 21 sleep 2 echo "Mail Server started." ;; = 4). Here is the script that is called #!/bin/sh # # /var/qmail/start-pop3d # Startup script for pop3d using tcpserver and vchkpw # exec env - PATH="/var/qmail/bin:/usr/local/bin:$PATH" \ tcpserver -uNNN -gNNN 0 pop-3 /var/qmail/bin/qmail-popup \ my.mailserver.com /home/vpopmail/bin/vchkpw \ /var/qmail/bin/qmail-pop3d Maildir =
Re: qmail-popup process not starting successfully at boot
Keith Edwards [EMAIL PROTECTED] wrote: When our SUN box reboots pop3d does not start. [...] In /nohup.out is the line 'env: No such file or directory' caused by the 'nohup /var/qmail/start-pop3d' command. [...] = 4). Here is the script that is called #!/bin/sh # # /var/qmail/start-pop3d # Startup script for pop3d using tcpserver and vchkpw # exec env - PATH="/var/qmail/bin:/usr/local/bin:$PATH" \ tcpserver -uNNN -gNNN 0 pop-3 /var/qmail/bin/qmail-popup \ my.mailserver.com /home/vpopmail/bin/vchkpw \ /var/qmail/bin/qmail-pop3d Maildir Change the start of that script to "exec /usr/bin/env - PATH=..." or whatever the proper path is for you. That's what the error above means. Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: Authorization failed during first test of qmail-popup: Solved
I found a solution to my problem in the Archives.
qmail-popup
Hi everyone, I'm using qmail and Maildir I'm installing The checkpassword and I'm reading The Install file When I want to simulate a succeful POP login, I have the message : "-ERR unable to write pipe" Thank's for response :) Allama.
qmail-popup
Hi everyone, I'm using qmail and Maildir I'm installing The checkpassword and I'm reading The Install file When I want to simulate a succeful POP login, I have the message : "-ERR unable to write pipe" Thank's for response :) Allama.
RE: qmail-popup
Is the pop3d daemon running, if so what user is it running as? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of LOTFI Youssef Sent: Thursday, September 21, 2000 11:27 AM To: [EMAIL PROTECTED] Subject: qmail-popup Hi everyone, I'm using qmail and Maildir I'm installing The checkpassword and I'm reading The Install file When I want to simulate a succeful POP login, I have the message : "-ERR unable to write pipe" Thank's for response :) Allama.
qmail-popup fd weirdness
Why does qmail-popup change fd2 from stderr (which nicely goes into the logger, usually) to a copy of fd1? This fdcopy prevents checkpassword replacements from logging anything. Greetz, Peter. -- [ircoper][EMAIL PROTECTED] - Peter van Dijk / Hardbeat [student]Undernet:#groningen/wallops | IRCnet:/#alliance [developer]_ [disbeliever - the world is backwards](__VuurWerk__(--*-
Re: qmail-popup fd weirdness
Quoted from Peter van Dijk: Why does qmail-popup change fd2 from stderr (which nicely goes into the logger, usually) to a copy of fd1? What's your setup? I thought, if you use the usual svscan setup, _stdout_ gets logged. ---Chris K. -- Chris, the Young One |_ but what's a dropped message between friends? Auckland, New Zealand |_ this is UDP, not TCP after all ;) ---John H. http://cloud9.hedgee.com/ |_ Robinson, IV
Re: qmail-popup fd weirdness
On Sat, Sep 09, 2000 at 03:26:28AM +1200, Chris K. Young wrote: Quoted from Peter van Dijk: Why does qmail-popup change fd2 from stderr (which nicely goes into the logger, usually) to a copy of fd1? What's your setup? I thought, if you use the usual svscan setup, _stdout_ gets logged. Yes it does, but, fd's 0 and 1 are attached to the network socket under tcpserver anyway, which is why I have a 21 which means fd 2 goes into the 'high-level' (tcpserver output) fd 1. Greetz, Peter. -- [ircoper][EMAIL PROTECTED] - Peter van Dijk / Hardbeat [student]Undernet:#groningen/wallops | IRCnet:/#alliance [developer]_ [disbeliever - the world is backwards](__VuurWerk__(--*-
Qmail-popup or Qmail-pop3d
Whats the different between qmail-popup and qmail-pop3d..I want my vpopmail to work, however i have no pop3 server, today i was told to: (execute) tcpserver 0 110 /var/qmail/bin/qmail-popup i-shell.net \ /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir I did it! now pop is running: - is there anything else i need to do to run vpopmail? $ telnet localhost 110 Trying localhost... Connected to bummer.net. Escape character is '^]'. +OK [EMAIL PROTECTED] user popuser +OK pass -ERR this user has no $HOME/Maildir
Qmail-popup or Qmail-pop3d
Whats the different between qmail-popup and qmail-pop3d..I want my vpopmail to work, however i have no pop3 server, today i was told to: (execute) tcpserver 0 110 /var/qmail/bin/qmail-popup i-shell.net \ /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir I did it! now pop is running: - is there anything else i need to do to run vpopmail? $ telnet localhost 110 Trying localhost... Connected to bummer.net. Escape character is '^]'. +OK [EMAIL PROTECTED] user popuser +OK pass -ERR this user has no $HOME/Maildir
Qmail-popup or Qmail-pop3d
I see a new mail in /Maildir of the user dir However wrong passwd, err - auth failed Whats the different between qmail-popup and qmail-pop3d..I want my vpopmail to work, however i have no pop3 server, today i was told to: (execute) tcpserver 0 110 /var/qmail/bin/qmail-popup i-shell.net \ /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir I did it! now pop is running: - is there anything else i need to do to run vpopmail? $ telnet localhost 110 Trying localhost... Connected to bummer.net. Escape character is '^]'. +OK [EMAIL PROTECTED] user popuser +OK pass -ERR this user has no $HOME/Maildir
qmail-popup question
From the qmail-popup man page: qmail-popup expects descriptor 0 to read from the network and descriptor 1 to write to the network. It reads a username and password from descriptor 0 in POP's USER-PASS style or APOP style. It invokes subprogram, with the same descriptors 0 and 1; descriptor 2 writing to the network; ^^^ I'm curious as to why this is done. In particular, stderr output from the subprogram is being fed back to the client, which is probably expecting a pop3 +OK/-ERR response, rather than whatever happens to be sent down stderr at the time. Wouldn't it be better to leave stderr alone, so that it could be fed to logger/splogger/multilog? -- Chris Mikkelson | "I have yet to see any problem, however complicated, [EMAIL PROTECTED] | which, when you looked at it the right way, did not | become still more complicated." -- Poul Anderson
qmail-popup
Hi All, After having a crash today, I've discovered that I'm now getting authentication errors. I'm not a programmer, so if I've missed something obvious, then you'll understand why. :-) --cut here-- snowy:/work# telnet virtual 110 Trying 203.56.37.8... Connected to proxy.overflow.net.au. Escape character is '^]'. +OK [EMAIL PROTECTED] user sales%sumdomain.com.au +OK pass 111 -ERR aack, child crashed Connection closed by foreign host. --cut here-- The actual password and usernames are correct when I try them. Oh, and I'm also using vpopmail here too, hence the domain details in the above clipping. It all worked perfectly until the lockup, which required me to run e2fsck on the drive. -- Current Net Legislation will slow us down and cost us more! Tell you Local Federal Member NOW it will hurt your business For more info visit http://www.efa.org.au/Campaigns/99.html -- C u laitr - Brendan Pratt Overflow Internet Services Mobile : +61-418-746657 Phone : +61-7-55-463-832 E-Mail : [EMAIL PROTECTED] -
Re: qmail-popup
Others have reported a similar problem and traced it to a corrupted ~vpopmail/domains/sumdomain.com.au/vpasswd file Others have reported corrupted binaries of vchkpw programs. Try reinstalling vchkpw and checking the vpasswd file for strangeness. ken Jones Inter7 Brendan Pratt wrote: Hi All, After having a crash today, I've discovered that I'm now getting authentication errors. I'm not a programmer, so if I've missed something obvious, then you'll understand why. :-) --cut here-- snowy:/work# telnet virtual 110 Trying 203.56.37.8... Connected to proxy.overflow.net.au. Escape character is '^]'. +OK [EMAIL PROTECTED] user sales%sumdomain.com.au +OK pass 111 -ERR aack, child crashed Connection closed by foreign host. --cut here-- The actual password and usernames are correct when I try them. Oh, and I'm also using vpopmail here too, hence the domain details in the above clipping. It all worked perfectly until the lockup, which required me to run e2fsck on the drive. -- Current Net Legislation will slow us down and cost us more! Tell you Local Federal Member NOW it will hurt your business For more info visit http://www.efa.org.au/Campaigns/99.html -- C u laitr - Brendan Pratt Overflow Internet Services Mobile : +61-418-746657 Phone : +61-7-55-463-832 E-Mail : [EMAIL PROTECTED] -
Re: qmail-popup
Hi Ken, - Original Message - From: Ken Jones [EMAIL PROTECTED] Others have reported a similar problem and traced it to a corrupted ~vpopmail/domains/sumdomain.com.au/vpasswd file I thought that might have been the case too, but I'm also having problems with users that are in /etc/passwd file too. Others have reported corrupted binaries of vchkpw programs. Try reinstalling vchkpw and checking the vpasswd file for strangeness. Have already tried that out, but without any luck. I also reinstalled qmail as well, so as to make sure that all bases were covered. --cut here-- snowy:/work# telnet virtual 110 Trying 203.56.37.8... Connected to proxy.overflow.net.au. Escape character is '^]'. +OK [EMAIL PROTECTED] user sales%sumdomain.com.au +OK pass 111 -ERR aack, child crashed Connection closed by foreign host. --cut here-- -- Current Net Legislation will slow us down and cost us more! Tell you Local Federal Member NOW it will hurt your business For more info visit http://www.efa.org.au/Campaigns/99.html -- C u laitr - Brendan Pratt Overflow Internet Services Mobile : +61-418-746657 Phone : +61-7-55-463-832 E-Mail : [EMAIL PROTECTED] -
Re: qmail-popup without maildir
On Wed, 22 Sep 1999, Glenn Crownover wrote: Is it possible to use qmail-popup without using the Maildir format? I The answer (i believe) is simple: 'no'. am trying to use $HOME/Mailbox for mail and gather my remotely via POP-3, but I keep getting the message: [boring error message cutted out] I think that is more safe and reliable use the Maildir format and make some wrappers arround your MUA's to convert the maildir to mailbox on-the-fly. In a general line: Using pine as a MUA, built a shell script like this: #!/bin/sh # see more details in the maildir2mbox manpage. MAILDIR=~/Maildir/ MAIL=~/Mailbox MAILTMP=~/Temp_mailbox /var/qmail/bin/maildir2mailbox exec pine This will convert maildir format to mailbox (and let pine read it). This also solve your problem with the qmail-popup. It's obvious that if you have only pop/Imap clents you *must* convert to Maildir. It's easy and painless. :-) Keep trying. Good look. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Luis Campos de Carvalho System Administrator at ECB -- Escola Paulista de Medicina "I believe that every human has a finite number of heartbeats. I don't intend to waste any of mine running around doing exercises." -- Neil Armstrong =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Re: qmail-popup without maildir
On Thu, 23 Sep 1999, Luis Campos de Carvalho wrote: It's obvious that if you have only pop/Imap clents you *must* convert to Maildir. It's easy and painless. Now that's not entirely accurate. If you want to use qmail's pop3d then you need to use maildir format. If you prefer to use mbox format mailboxes you can use qpopper and for imap you can use uw's or any number of other imapds. There's a patch on www.qmail.org for qpopper v2.53 to work with qmail - it's a rather minor patch. Vince. -- == Vince Vielhaber -- KA8CSH email: [EMAIL PROTECTED] flame-mail: /dev/null # include std/disclaimers.h Have you seen http://www.pop4.net? Online Campground Directoryhttp://www.camping-usa.com Online Giftshop Superstorehttp://www.cloudninegifts.com ==
Re: qmail-popup without maildir
On Thu, 23 Sep 1999, Vince Vielhaber wrote: On Thu, 23 Sep 1999, Luis Campos de Carvalho wrote: It's obvious that if you have only pop/Imap clents you *must* convert to Maildir. It's easy and painless. Now that's not entirely accurate. If you want to use qmail's pop3d then you need to use maildir format. If you prefer to use mbox format mailboxes you can use qpopper and for imap you can use uw's or any number of other imapds. There's a patch on www.qmail.org for qpopper v2.53 to work with qmail - it's a rather minor patch. Ooops! Thank you very much for the correction, Vince. Sorry for the confusing information... =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Luis Campos de Carvalho System Administrator at ECB -- Escola Paulista de Medicina "I believe that every human has a finite number of heartbeats. I don't intend to waste any of mine running around doing exercises." -- Neil Armstrong =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Re: qmail-popup/qmail-pop3d logging patch?
On Tue, 11 May 1999, Dan Peterson wrote: hi. at www.qmail.org(/top.html), there is a mention of a patch to qmail-popup and qmail-pop3d to make the log stuff to splogger, but the link is broken (it points to http://www.pharos.com.au/mbp/). anyone have any idea where i can pick this patch up? any help would be greatly appreciated! :) I do have a logger patch but it's broken. AFAIK it's a waste of time to talk about logging qmail-pop* until we cannot do logging with tcpserver. The problem is: supervise tcpserver qmail-popup 21 | {some logger} This tcpserver opens stderr to print its log messages and opens a pipe to stdin-stdout for qmail-popup's connection. In fact there isn't a way to do logging right now. -- Regards: Kevin (Balazs)
Re: qmail-popup/qmail-pop3d logging patch?
On Wed, 12 May 1999, Balazs Nagy wrote: On Tue, 11 May 1999, Dan Peterson wrote: hi. at www.qmail.org(/top.html), there is a mention of a patch to qmail-popup and qmail-pop3d to make the log stuff to splogger, but the link is broken (it points to http://www.pharos.com.au/mbp/). anyone have any idea where i can pick this patch up? any help would be greatly appreciated! :) I do have a logger patch but it's broken. AFAIK it's a waste of time to It would be sweet to be able to log bad passwords when people try to get their mail like cistron radius does when they are trying to dial in. Tha treally provides a powerful tool to tech support to get right to the heart of a problem. andy
Re: qmail-popup/qmail-pop3d logging patch?
At 5:48 am -0500 12/5/99,the wonderful Andy Walden wrote: It would be sweet to be able to log bad passwords when people try to get their mail like cistron radius does when they are trying to dial in. Paul Gregg's version of Checpassword does that http://www.tibus.net/pgregg/projects/ peter. -- peter at gradwell dot com; http://www.gradwell.com/ gradwell dot com Ltd. Enabling the internet you don't see. ** Cheap and easy ecommerce: http://www.gradwell.net/ **
Re: qmail-popup/qmail-pop3d logging patch?
Balazs Nagy wrote: On Tue, 11 May 1999, Dan Peterson wrote: hi. at www.qmail.org(/top.html), there is a mention of a patch to qmail-popup and qmail-pop3d to make the log stuff to splogger, but the link is broken (it points to http://www.pharos.com.au/mbp/). anyone have any idea where i can pick this patch up? any help would be greatly appreciated! :) I do have a logger patch but it's broken. AFAIK it's a waste of time to talk about logging qmail-pop* until we cannot do logging with tcpserver. The problem is: supervise tcpserver qmail-popup 21 | {some logger} This tcpserver opens stderr to print its log messages and opens a pipe to stdin-stdout for qmail-popup's connection. In fact there isn't a way to do logging right now. -- Regards: Kevin (Balazs) Try commenting out line 91 in qmail-popup.c: 91 /* if (fd_copy(2,1) == -1) die_pipe(); */ 92 close(3); 93 if (pipe(pi) == -1) die_pipe(); 94 if (pi[0] != 3) die_pipe(); 95 switch(child = fork()) { 96 Now checkpasswords and qmail-pop3d's SDTERR should go where tcpservers STDERR goes. Set a environment variable in qmail-popup, say LOGID to provide a session wide unique tag to use in the popup - checkpassword - pop3d pipeline. -- lars
Re: qmail-popup/qmail-pop3d logging patch?
On Wed, 12 May 1999, Lars Uffmann wrote: Balazs Nagy wrote: This tcpserver opens stderr to print its log messages and opens a pipe to stdin-stdout for qmail-popup's connection. In fact there isn't a way to do logging right now. Try commenting out line 91 in qmail-popup.c: 91 /* if (fd_copy(2,1) == -1) die_pipe(); */ Why DJB put this line in? If you run this program from command line, 0,1,2 are open. If you run from inetd, it dups 2 and 1 fom 0 (eg. 2 is alive). Tcpserver does a good emulation of command line. I don't know why this line exists in the code. Now checkpasswords and qmail-pop3d's SDTERR should go where tcpservers STDERR goes. Set a environment variable in qmail-popup, say LOGID to provide a session wide unique tag to use in the popup - checkpassword - pop3d pipeline. Sounds reasonable. Error catch points: login, stat, commands: qmail-pop3d bad passwords: checkpassword -- Regards: Kevin (Balazs)
Re: qmail-popup/qmail-pop3d logging patch?
Balazs Nagy wrote: On Wed, 12 May 1999, Lars Uffmann wrote: Balazs Nagy wrote: This tcpserver opens stderr to print its log messages and opens a pipe to stdin-stdout for qmail-popup's connection. In fact there isn't a way to do logging right now. Try commenting out line 91 in qmail-popup.c: 91 /* if (fd_copy(2,1) == -1) die_pipe(); */ Why DJB put this line in? If you run this program from command line, 0,1,2 are open. If you run from inetd, it dups 2 and 1 fom 0 (eg. 2 is alive). Tcpserver does a good emulation of command line. I don't know why this line exists in the code. To be compatible with inetd qmail-popup HAS to dup STDERR 2 STDIN. If you will patch checkpassword/pop3d to log to STDERR, you will no longer be able to run them from inetd, because the log messages would be redirected to the mail client. The same with qmail-smtpd. I guess this is one reason qmail-smtpd does no logging at all. -- lars
Re: qmail-popup/qmail-pop3d logging patch?
On Wed, 12 May 1999, Lars Uffmann wrote: Balazs Nagy wrote: Why DJB put this line in? If you run this program from command line, 0,1,2 are open. If you run from inetd, it dups 2 and 1 fom 0 (eg. 2 is alive). Tcpserver does a good emulation of command line. I don't know why this line exists in the code. To be compatible with inetd qmail-popup HAS to dup STDERR 2 STDIN. If you will patch checkpassword/pop3d to log to STDERR, you will no longer be able to run them from inetd, because the log messages would be redirected to the mail client. The same with qmail-smtpd. I guess this is one reason qmail-smtpd does no logging at all. But you should use tcp-env to run qmail-popup and you should open a pipe to a logger (esp. the stderr fd) which can be specified in command line. Other solution: use errorsto(daemontools). -- Regards: Kevin (Balazs)
Re: qmail-popup/qmail-pop3d logging patch?
Lars Uffmann [EMAIL PROTECTED] writes: | To be compatible with inetd qmail-popup HAS to dup STDERR 2 STDIN. Or, it can be called from a trivial wrapper that does the dup for it.
Re: qmail-popup/qmail-pop3d logging patch?
On Wed, May 12, 1999 at 02:30:28PM -0400, Scott Schwartz wrote: Lars Uffmann [EMAIL PROTECTED] writes: | To be compatible with inetd qmail-popup HAS to dup STDERR 2 STDIN. Or, it can be called from a trivial wrapper that does the dup for it. actually, what about a syslog solution? i tried adding a syslog() call to checkpassword, but when i did that it stopped working for some reason (compiled fine, but authorization failed for everyone). i just want something similar to cucipop logging...for successful connects, it shows the username, how many messages they have (and size), and how many they downloaded during their POP session. that would be cool! -dan `--- dan peterson [ [EMAIL PROTECTED] ] http://erinyes.net `-- network engineer, digitaldune networks -- yuma, az `- (520) 344-1110 -- http://www.digitaldune.net
qmail-popup . Help me please
hi, I don't know from where to begin ? I even rewriten the checkpassword (Perl, based on auth against Radius server but with stripped Radius part). SO, I get the ".. $HOME/Maildir" error. If I substitute the "Maildir" in /etc/rc.d/init.d/qmail-pop3d.init with the real directory all is working fine, but the problem is that the dir must be different for every user that initiates POP connection, but I know his name only when the "tcpserver" executes "qmail-popup" i.e. impossible to be included in qmail-pop3d.init. The other tries I've made : with my changed script all is working fine if I execute it directly from console i.e. : [root]# qmail-popup myhostname passpass or [root]# qmail-popup myhostname passpass qmail-pop3d or [root]# qmail-popup myhostname passpass qmail-pop3d /mail/digicom-bg/xxx no matter (passpass is my variant of checkpassword) . but when the script is executed from "tcpserver" i.e. : [root]# telnet localhost 110 mostly I get ... "Connection closed by foreign host". And as it seems "passpass" is never executed (I have at the begining of the script writing to a test file, but nothing is written in it if passpass is executed via network i.e. passpass is not started but can track why) I can't use checkpassword 'cause I'm with shadow. Please help me I'm insane here, I know I'm missing something subtle. PS. Ooops another thing, when I start /etc/rc.d/init.d/qmail-pop3d.init start I get : hard error Starting qmail-pop3d .... done. and it is really started, when I make "telnet localhost 110" qmail-popup is invoked normaily, but after that "Connection closed by foregn host".. = [EMAIL PROTECTED] =
qmail-popup/checkpassword information
Where can I find out exactly what the gazintas/gazoutas are for checkpassword? I need to use a non-standard user/password file, and have to modify a login program to work for the pop logins.
Re: qmail-popup/checkpassword information
Mark Bitting writes: Where can I find out exactly what the gazintas/gazoutas are for checkpassword? I need to use a non-standard user/password file, and have to modify a login program to work for the pop logins. Look at the second paragraph of http://www.qmail.org/top.html#checkpassword -- -russ nelson [EMAIL PROTECTED] http://crynwr.com/~nelson Crynwr supports Open Source(tm) Software| PGPok | There is good evidence 521 Pleasant Valley Rd. | +1 315 268 1925 voice | that freedom is the Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | cause of world peace.
Re: qmail-popup/checkpassword information
Look at the second paragraph of http://www.qmail.org/top.html#checkpassword I had hoped this was documented somewhere... I'm a microcontroller assembly language programmer, I have conceptual problems with a language that has no test-and-branch instructions and seems to consist mainly of the shifted top row of the keyboard. Oh well, time to dust off the trusty old KR book and go reinvent the wheel. Thanks for the pointers, I'll blunder through. Mark Bitting