Re: [vchkpw] strange qmail/vpopmail problem

2005-02-16 Thread John P. Looney
On Tue, 2005-02-15 at 10:41 -0600, Jeremy Kitchen wrote:
 to be more precise, sending qmail-send a HUP signal tells it to reload 
 virtualdomains and locals.  There are some patches floating around to make it 
 reload more.. but the important thing was it reloaded the 
 locals/virtualdomains files

 OK, that makes sense. What I'm curious about is...does qmail-send not
need that to re-read the rcpthosts file ? If *everything* had stopped
working, that'd make sense, and I would have spotted it a lot earlier.
As it was, only some stuff stopped working. 

john



Re: [vchkpw] strange qmail/vpopmail problem

2005-02-15 Thread John P. Looney
On Mon, 2005-02-14 at 11:21 -0600, Jeremy Kitchen wrote:
  That's very odd.  Are the domains in control/smtproutes (causing
 them
  to be forwarded)?  Even if they are, I'm pretty sure that
  virtualdomains overrides smtproutes (at least that's what I'm seeing
 as
  I move domains to a new server).
 
 qmail-send probably just needs a HUP signal.

 That fixed the problem. Your prescience unnerves me...how did this fix
the problem ?

john



[vchkpw] strange qmail/vpopmail problem

2005-02-14 Thread John P. Looney

 I have a large mail server with about 18000 domains. There are also
some servers that NFS
mount /var/vpopmail/domains /var/qmail/control /var/qmail/users from the
backend mail server. 

 For some months, its been working fine - all incoming SMTP/POP requests
go to the front end boxes, and it all works fine. However of late two of
the 18000 domains have been acting up.

 For some reason, the front end servers are relaying - not accepting -
mail for two domains. The only strange thing about their setup is that
there is an anti-virus system which has a lower number MX record, so
gets the mail and forwards it these mail servers.

 For 200 other cases, after its virus scanned, the mail servers accept
the mail. In these two, it relays it back to the AV server, causing a
loop.

 Both domain names are mentioned in:
  /var/qmail/control/rcpthosts
  /var/qmail/users/assign
  /var/qmail/control/virtualdomains
 But its still not storing the mail locally.

 Has anyone else ever seen this ? I don't even know where to start
looking for a cause. Is there an easy way of running strace over some
qmail daemon to see how it works out what to do with mail on a vpopmail
system ?

 An unrelated question - is there any reason
why /var/qmail/control/virtualdomains isn't a CDB file ?

John



[vchkpw] debugging vchkpw?

2003-08-20 Thread John P. Looney

 I have a vpopmail server that's been running fine for over a year.

 Now, it's refusing to authenticate people;

[EMAIL PROTECTED] tmp]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK 16266.1061371053@/hsphere/local/var/vpopmail/bin/vchkpw
user [EMAIL PROTECTED]
+OK
pass secret
-ERR this user has no $HOME/Maildir
Connection closed by foreign host.
[EMAIL PROTECTED] tmp]# grep john /var/vpopmail/domains/hosting365.ie/vpasswd
john:fqwqZasdMrhcs:1:0:john:/hsphere/local/var/vpopmail/domains/hosting365.ie/john:300m
[EMAIL PROTECTED] tmp]# ls -l
/hsphere/local/var/vpopmail/domains/hosting365.ie/john/
total 8
-rw-r--r--1 vpopmail vchkpw  4 Aug 20 09:59 lastauth
drwx--   14 vpopmail vchkpw   4096 Aug 20 10:16 Maildir

 Any ideas why this could happen ? Is there docs on running vchkpw so I
could see how it works ? Yes, the code does have bits  pieces like;

 printf(vchkpw: what the hell are you doing running vchkpw on the
command line!! It's only for talking with qmail-popup and
qmail-pop3d.\n);

 But I'm out of ideas as to what could have gone wrong. Curiously,
courier-imap, is authenticating the same users fine.

John



Re: [vchkpw] debugging vchkpw?

2003-08-20 Thread John P. Looney
On Wed, 2003-08-20 at 10:37, Peter Palmreuther wrote:
  Is there docs on running vchkpw so I could see how it works ? Yes, the
  code does have bits  pieces like;
  
   printf(vchkpw: what the hell are you doing running vchkpw on the
  command line!! It's only for talking with qmail-popup and
  qmail-pop3d.\n);
 
 printf [EMAIL PROTECTED] | \
  strace -f -s 4096 -o /tmp/vchkpw.log ~vpopmail/bin/vchkpw /bin/true 30
 
 and search for a chdir system call in '/tmp/vchkpw.log'.
 If you're not on Linux but e.g. *BSD use 'truss' or anything else that
 enables you to trace system calls.

 Thanks for a speedy reply!

 OK, as expected, that looks like it's working fine;

6485  chdir(/hsphere/local/var/vpopmail/domains/hosting365.ie) = 0
6485  getcwd(/var/vpopmail/domains/hosting365.ie, 156) = 36
6485  getpid()  = 6485
6485  brk(0x8057000)= 0x8057000
6485  open(/hsphere/local/var/vpopmail/domains/hosting365.ie/vpasswd.cdb, O_RDONLY) 
= 4

 down the end, it has;

6485  munmap(0x40015000, 4096)  = 0
6485  getpid()  = 6485
6485  rt_sigaction(SIGPIPE, {0x420e46e0, [], 0x400}, {SIG_DFL}, 8) = 0
6485  socket(PF_UNIX, SOCK_DGRAM, 0)= 4
6485  fcntl64(4, F_SETFD, FD_CLOEXEC)   = 0
6485  connect(4, {sin_family=AF_UNIX, path=/dev/log}, 16) = 0
6485  send(4, 21Aug 20 10:42:22 vpopmail[6485]: vchkpw: password fail [EMAIL 
PROTECTED]:, 77, 0) = 77
6485  rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
6485  _exit(3)  = ?

 Which, as I mentioned is strange, as courier imap authenticates off the same vpasswd 
file...

John



Re: [vchkpw] debugging vchkpw?

2003-08-20 Thread John P. Looney

 No, I'm a fool. I had a typo in the password I'd fed to vchkpw on the
command line. I re-did it with the write password (again, the chdir
works) but toward the end is;

25765 munmap(0x40015000, 4096)  = 0
25765 time(NULL)= 1061373355
25765 open(/hsphere/local/var/vpopmail/etc/open-smtp.lock,
O_RDWR|O_CREAT|O_TRUNC, 0666) = 4
25765 fcntl64(4, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0,
len=0}) = 0
25765 open(/hsphere/local/var/vpopmail/etc/open-smtp, O_RDWR) = 5
25765 getpid()  = 25765
25765 open(/hsphere/local/var/vpopmail/etc/open-smtp.tmp.25765,
O_RDWR|O_CREAT|O_TRUNC, 0666) = 6
25765 fcntl64(4, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0,
len=0}) = 0
25765 close(4)  = 0
25765 getuid32()= 0

 So, it looks like that's working  logging in fine, even updating the
pop before smtp database.

 Ominously, there is a file fix.sh in the vpopmail server I've never
considered before, which may be a remnant of a previous sysadmin. Is
this a standard tool ?

John



Re: [vchkpw] debugging vchkpw?

2003-08-20 Thread John P. Looney
On Wed, 2003-08-20 at 10:57, John P. Looney wrote:
  So, it looks like that's working  logging in fine, even updating the
 pop before smtp database.

 I should have pointed out, that although running vchkpw from the
command line works fine, it still gives;

-ERR this user has no $HOME/Maildir

 when I login. Is there a next step in debugging vpopmail you could
recommend ?

John