Re: lwq

2001-08-07 Thread Arjen van Drie

On Mon, Aug 06, 2001 at 04:03:52PM -0700, Will Yadley wrote:
>I'm switching my qmail machine to use daemontools instead of inetd to start.
>I installed the unnoficial debian packages for daemontools and ucspi-tcp.
>svcscan doesn't seem to be starting automatically at boot - do people usually
>create an init script to start this at boot?

Take a look at http://www.lifewithqmail.org and you will find the answer.
It advises you to put svscan in inittab.

You will also find other examples of how to use daemontools.

-- 

Grtz, 

Arjen.




Re: Compile error

2001-07-30 Thread Arjen van Drie

On Mon, Jul 30, 2001 at 08:29:01AM -0500, mick wrote:
>Anyone know what component I'm missing:
>
># make setup check
>nroff -man qmail-clean.8 > qmail-clean.0
>troff: fatal error: can't find macro file tty-char
>make: *** [qmail-clean.0] Error 1

I have 

/usr/share/groff/tmac/tmac.tty-char

on my redhat machine

rpm -qf /usr/share/groff/tmac/tmac.tty-char
groff-1.16.1-7


-- 

Grtz, 

Arjen.




Re: question about autoresponder varient

2001-07-10 Thread Arjen van Drie

On Tue, Jul 10, 2001 at 08:49:08PM -0400, Steve wrote:
>
>I would like to implement a feature that sends a brief email to another
>email address when mail arrives for a user.  I think it can be handled
>from the .qmail file but I was hoping someone could give me some pointers.

I'm using

http://untroubled.org/qmail-autoresponder/

and I' happy :)


If the other email address is a static one it won't help you though.
then |piping to a script from a .qmail file would be more your thing
to do.


-- 

Grtz, 

Arjen.




Re: Request for advice (qmail-remote)

2001-07-10 Thread Arjen van Drie

On Wed, Jul 11, 2001 at 09:29:16AM +0930, Greg Elliott wrote:
>Greetings All,
>

[sNap]

>
>   [The effect would be to 'hijack' (for legitimate reasons) mail for a
>subset of an 
>upstream domain, and deliver it locally. (Attempting to cut down on WAN
>traffic)].
>
>Is this possible, and easily achievable?

You may wanna take a look at http://untroubled.org for qmail-qfilter.


> how to read the parameters from stdinput in a shell script, manipulate
>them,
> and then how to pass control back to qmail-remote.)

man qmail-control


-- 

Grtz, 

Arjen.




Re: I get timeouts

2001-07-07 Thread Arjen van Drie

On Sat, Jul 07, 2001 at 06:47:22PM +0200, Lukas Beeler wrote:
>did you recognize the difference between ' and ` ?

This seems to be (part of) the problem.
You put a tic (') where it should be a 
backtic (`).


-- 

Grtz, 

Arjen.




Re: I get timeouts

2001-07-07 Thread Arjen van Drie

On Sat, Jul 07, 2001 at 05:20:01PM +0200, Moritz Schmitt wrote:
>
>ps aux | grep qmail:
>
>
>root 235  0.0  0.1  1048  608  p0  S+5:17PM   0:00.00 grep qmail
>root 158  0.0  0.0   852  440 con- I 4:39PM   0:00.01 supervise
>qmail-s
>root 160  0.0  0.0   852  440 con- I 4:39PM   0:00.00 supervise
>qmail-s
>qmails   164  0.0  0.0   908  468 con- I 4:39PM   0:00.02 qmail-send
>qmaill   167  0.0  0.0   860  376 con- I 4:39PM   0:00.01
>/usr/local/bin/mu
>qmaill   170  0.0  0.0   860  376 con- I 4:39PM   0:00.01
>/usr/local/bin/mu
>qmaill   172  0.0  0.0   872  500 con- I 4:39PM   0:00.00 splogger qmail
>root 173  0.0  0.0   872  396 con- I 4:39PM   0:00.00 qmail-lspawn
>|pre
>qmailr   174  0.0  0.0   872  408 con- I 4:39PM   0:00.00 qmail-rspawn
>qmailq   175  0.0  0.0   860  428 con- I 4:39PM   0:00.00 qmail-clean
>

Give us a 


ps auwwwx | grep qmail


i also had a similar problem; turned out to be spaces after the '\'
EndOfLine characters in my startup scripts...



-- 

Grtz, 

Arjen.




Re: weird qmail-popup behaviour?

2001-07-06 Thread Arjen van Drie

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?

2001-07-05 Thread Arjen van Drie

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 2>&1

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 2>&1

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?

2001-07-05 Thread Arjen van Drie

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 2>&1
>
>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: Error deferral: Unable_to_chdir_to_maildir._(#4.2.1)/

2001-07-05 Thread Arjen van Drie

On Thu, Jul 05, 2001 at 06:30:40PM +0700, eddy wrote:
>I have a problem with qmail, and make me cannot send or receive mail, and it
>show error messages like this :
>
>delivery 1: deferral: Unable_to_chdir_to_maildir._(#4.2.1)/
>
>Can anyone help me to fix it out 

Not of you don't send more info... Now I can only say that you
don't have a maildir in your homedirectory...

How do you start qmail-send (what is in /var/qmail/rc)?


-- 

Grtz, 

Arjen.




Re: weird qmail-popup behaviour?

2001-07-05 Thread Arjen van Drie

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 2>&1


-- 

Grtz, 

Arjen.




Re: weird qmail-popup behaviour?

2001-07-05 Thread Arjen van Drie

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?

2001-07-04 Thread Arjen van Drie

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\0<21534.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.




weird qmail-popup behaviour?

2001-07-03 Thread Arjen van Drie


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 2>&1

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 2>&1

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




Re: qmail-pop3d

2001-05-30 Thread Arjen van Drie

On Thu, May 31, 2001 at 06:19:22AM -, Deen wrote:
>Hi.
>
>I am new in qmail. Can anyone help me ?
>

> 12 server  = /usr/local/bin/tcpserver 0 
>110 \
> 13 /var/qmail/bin/qmail-popup mail.domainname> \
> 14 /bin/checkpassword /var/qmail/bin/qmail-pop3d 
>Maildir &
> 15 log_on_success  += USERID
> 16 log_on_failure  += USERID
> 17 }
>


Here you start one tcpwrapper (tcpserver) by another. No can do that!
Use tcpserver _or_ xinetd. Not both.


-- 

Grtz, 

Arjen.