Help with qmail-smtpd logging

2001-06-27 Thread Dave Fallon

I have qmail, qmail-smtpd, and qmail-pop3d running on my system, all in default 
configurations (in /var/qmail/*, using daemontools/tcpserver, etc.). Qmail-pop3d is 
nicely running and logging things, but qmail-smtpd is dumping all messages to the 
console (tty1) - can anyone help me fix this? It's driving me nuts, as I obviously now 
have no log of what's going on with my smtp server. Here's the 
/service/qmail-smtpd/run script:

#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
exec /usr/local/bin/softlimit -m 200 \
/usr/local/bin/tcpserver -v -R -H -l 0 -c $MAXSMTPD \
-u $QMAILDUID -g $NOFILESGID 0 smtp /var/qmail/bin/qmail-smtpd 21

and the /service/qmail-smtpd/log/run script:

#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t /var/log/qmail/smtpd

and for comparison (the working config, I can read logfiles/whatnot) the 
qmail-pop3d/run and log/run files:

#!/bin/sh
exec /usr/local/bin/softlimit -m 200 \
/usr/local/bin/tcpserver -v -R -H -l 0 0 pop3 /var/qmail/bin/qmail-popup \
iron.tetsubo.com /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 21


#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t \
/var/log/qmail/pop3d


Please note I'm not subscribed to the mailing list. Thanks for any help!

dave



Re: Help with qmail-smtpd logging

2001-06-27 Thread pop corn

I'm no expert, but since I've just been setting up my own qmail, some of 
this is still freshly confusing for me! Did you remember to do all of the 
following?

chmod +t /var/qmail/supervise/qmail-smtpd
chown qmaill:nofiles /var/log/qmail/smtpd
chmod 2700 /var/log/qmail/smtpd
chmod 755 (both of your run files)

From: Dave Fallon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Help with qmail-smtpd logging
Date: Wed, 27 Jun 2001 20:18:36 -0700

I have qmail, qmail-smtpd, and qmail-pop3d running on my system, all in 
default configurations (in /var/qmail/*, using daemontools/tcpserver, 
etc.). Qmail-pop3d is nicely running and logging things, but qmail-smtpd is 
dumping all messages to the console (tty1) - can anyone help me fix this? 
It's driving me nuts, as I obviously now have no log of what's going on 
with my smtp server. Here's the /service/qmail-smtpd/run script:

#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
exec /usr/local/bin/softlimit -m 200 \
 /usr/local/bin/tcpserver -v -R -H -l 0 -c $MAXSMTPD \
 -u $QMAILDUID -g $NOFILESGID 0 smtp /var/qmail/bin/qmail-smtpd 
21

and the /service/qmail-smtpd/log/run script:

#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t 
/var/log/qmail/smtpd

and for comparison (the working config, I can read logfiles/whatnot) the 
qmail-pop3d/run and log/run files:

#!/bin/sh
exec /usr/local/bin/softlimit -m 200 \
   /usr/local/bin/tcpserver -v -R -H -l 0 0 pop3 /var/qmail/bin/qmail-popup \
   iron.tetsubo.com /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 
21


#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t \
   /var/log/qmail/pop3d


Please note I'm not subscribed to the mailing list. Thanks for any help!

dave

_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: qmail-smtpd logging

2001-02-23 Thread James R Grinter

"Chris Davis" [EMAIL PROTECTED] writes:
 have it logged for remote-to-local x-fers, for say finding out the address
 of an open spam relay that keeps sending me junk, that is my end-goal.

qmail's approach is that you look in the message that you have. As
someone else has pointed out - it's in the Received: headers...

 Perhaps I'm going about this the wrong way, but in the past with sendmail I
 have always been able to get this information from my logs.

...which is great, except when you don't have the message because
you're trying to analyse it passing through your system.

Markus Stumpf has been working on some improved qmail-smtpd logging.

James.



Re: qmail-smtpd logging

2001-02-22 Thread Charles Cazabon

Chris [EMAIL PROTECTED] wrote:
 Hi, I'm fairly new to q-mail so go easy on me. I've looked through all sorts
 of documentation and I haven't been able to find a way to do this yet. I
 can't get qmail to log the address of a remote mail server thats sends it
 mail to be delivered locally. example, spot.netnitco.net is running qmail.
 the user joe gets his mail at spot.netnitco.net. someone else (using
 mail.netnitco.net as his smtp server) sends a message to
 [EMAIL PROTECTED], qmail logs this happening of course and the mail is
 delivered to joe fine. But qmail does not log that the connection came from
 mail.netnitco.net, I would like it to do this for several reasons. I'm not
 sure exactly what information you'll all need from me to help me out, I'm
 using multilog + vpopmail + daemontools if that helps.

qmail-smtpd doesn't log it, but qmail records it in a Received: header, like
any other MTA does.  Is this not sufficient?  You could create a wrapper
around qmail-smtpd which logs this information to stdout if you like.

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: qmail-smtpd logging

2001-02-22 Thread Charles Cazabon

Chris Davis [EMAIL PROTECTED] wrote:
 
 Actually sendmail does record this as "relay=host.domain [1.2.3.4]" in it's
 log file.

I'm not familiar with sendmail.  Does it record this log line only for messages
with a non-local envelope recipient?  That would make it tricky to emulate
with a wrapper around qmail-smtpd.

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: qmail-smtpd logging

2001-02-22 Thread Chris Davis

  Actually sendmail does record this as "relay=host.domain [1.2.3.4]" in
it's
  log file.

 I'm not familiar with sendmail.  Does it record this log line only for
messages
 with a non-local envelope recipient?  That would make it tricky to emulate
 with a wrapper around qmail-smtpd.

As far as I know this is put on every type of transfer,
remote-to-remote,remote-to-local, and local-to-remote. I only really need to
have it logged for remote-to-local x-fers, for say finding out the address
of an open spam relay that keeps sending me junk, that is my end-goal.
Perhaps I'm going about this the wrong way, but in the past with sendmail I
have always been able to get this information from my logs.

Thanks,
 --Chris




qmail-smtpd logging

2001-02-22 Thread Chris

Hi, I'm fairly new to q-mail so go easy on me. I've looked through all sorts
of documentation and I haven't been able to find a way to do this yet. I
can't get qmail to log the address of a remote mail server thats sends it
mail to be delivered locally. example, spot.netnitco.net is running qmail.
the user joe gets his mail at spot.netnitco.net. someone else (using
mail.netnitco.net as his smtp server) sends a message to
[EMAIL PROTECTED], qmail logs this happening of course and the mail is
delivered to joe fine. But qmail does not log that the connection came from
mail.netnitco.net, I would like it to do this for several reasons. I'm not
sure exactly what information you'll all need from me to help me out, I'm
using multilog + vpopmail + daemontools if that helps.


Thanks in advance,
 --Chris




Re: qmail-smtpd logging

2001-02-21 Thread Chris Davis

 qmail-smtpd doesn't log it, but qmail records it in a Received: header,
like
 any other MTA does.  Is this not sufficient?  You could create a wrapper
 around qmail-smtpd which logs this information to stdout if you like.

Actually sendmail does record this as "relay=host.domain [1.2.3.4]" in it's
log file. (again I am simply referring to the last relay hit before the
message is delivered, not the originating mail server.)
So I assume qmail has no built-in way to record this? I'd rather not have to
write a wrapper
to get this information from each message header, unless of course that is
the only option. Any helpful info on how to go about writing such a program?

Thanks,
 --Chris


 Chris [EMAIL PROTECTED] wrote:
  Hi, I'm fairly new to q-mail so go easy on me. I've looked through all
sorts
  of documentation and I haven't been able to find a way to do this yet. I
  can't get qmail to log the address of a remote mail server thats sends
it
  mail to be delivered locally. example, spot.netnitco.net is running
qmail.
  the user joe gets his mail at spot.netnitco.net. someone else (using
  mail.netnitco.net as his smtp server) sends a message to
  [EMAIL PROTECTED], qmail logs this happening of course and the mail
is
  delivered to joe fine. But qmail does not log that the connection came
from
  mail.netnitco.net, I would like it to do this for several reasons. I'm
not
  sure exactly what information you'll all need from me to help me out,
I'm
  using multilog + vpopmail + daemontools if that helps.






qmail-smtpd logging

2000-09-05 Thread Larry M. Smith

Is there any way to track messages or to link the log entries from 
qmail-smtpd and qmail-send so that I may map the network connections and 
where the mail is being sent, i.e. much the same way that my sendmail logs 
used to look.

*/log/run files look like this...

[chains@franklin /]$ cat /var/qmail/supervise/qmail-send/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill \
 /usr/local/bin/multilog t /var/log/qmail/qmail-send/

[chains@franklin /]$ cat /var/qmail/supervise/qmail-smtpd/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill \
 /usr/local/bin/multilog t /var/log/qmail/qmail-smtpd/

Thanks,

--Larry




Re: qmail-smtpd logging

2000-04-24 Thread Russell Nelson

Andre Oppermann writes:
  Russell Nelson wrote:
   I modified qmail-smtpd to log that error message to stderr.  That told
   me the new network, and I enabled many customers to have a happy Easter.
  
  Sounds like you are running qmail-ldap... ;-)

What does ldap user lookup have to do with qmail-smtpd??

-- 
-russ nelson [EMAIL PROTECTED]  http://russnelson.com
Crynwr sells support for free software  | PGPok | "Ask not what your country
521 Pleasant Valley Rd. | +1 315 268 1925 voice | can force other people to
Potsdam, NY 13676-3213  | +1 315 268 9201 FAX   | do for you..."  -Perry M.



Re: qmail-smtpd logging

2000-04-24 Thread Andre Oppermann

Russell Nelson wrote:
 
 Andre Oppermann writes:
   Russell Nelson wrote:
I modified qmail-smtpd to log that error message to stderr.  That told
me the new network, and I enabled many customers to have a happy Easter.
  
   Sounds like you are running qmail-ldap... ;-)
 
 What does ldap user lookup have to do with qmail-smtpd??

Actually nothing, but qmail-smtpd in the qmail-ldap patch does full
logging.

-- 
Andre



Re: qmail-smtpd logging

2000-04-24 Thread Russell Nelson

Andre Oppermann writes:
  Russell Nelson wrote:
   What does ldap user lookup have to do with qmail-smtpd??
  
  Actually nothing, but qmail-smtpd in the qmail-ldap patch does full
  logging.

What if I want qmail-ldap but not a modified qmail-smtpd (the one that 
Dan wrote being nice and secure and me not wanting it touched)?
Wouldn't it be a Better Thing(tm) is qmail-ldap just gave me
qmail-ldap and not all that other stuff?

-- 
-russ nelson [EMAIL PROTECTED]  http://russnelson.com
Crynwr sells support for free software  | PGPok | "Ask not what your country
521 Pleasant Valley Rd. | +1 315 268 1925 voice | can force other people to
Potsdam, NY 13676-3213  | +1 315 268 9201 FAX   | do for you..."  -Perry M.



qmail-smtpd logging

2000-04-06 Thread Jan Stifter

hello all,
i start qmail-smtpd with

*** beg of qmail-smtpd
# /sbin/init.d/qmail-smtpd
# symbolic links in
# /sbin/rc2.d
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

case "$1" in
start)
echo "Starting qmail-smtpd."
supervise /var/lock/svc/qmail-smtpd tcpserver -q
-x/etc/tcp.smtp.cdb\
-u101 -g101 0 smtp /var/qmail/bin/qmail-smtpd 21 | \
setuser qmaill accustamp | \
setuser qmaill tailocal  /var/log/qmail.log 
;;
stop)
echo -n "Stopping qmail-smtpd..."
svc -dx /var/lock/svc/qmail-smtpd
echo "ok"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac

exit 0
*** end of qmail-smtpd

1. the logging with  is not very nice and i am looking for a nice
and simple other possibility.

2. the file qmail.log is always 0 (no logging) even though i telnet to
port 25 and send myself succesfully a mail.

3. this machine is a secondary MX receiver, so i would like to know,
how much emails qmail-smtpd received, but qmail-send did not already
send them to the main MX mail-server. the mails are in the queue, but
how can i get the number of mails there?

any hints are greatly appreciated.
jan stifter




Re: qmail-smtpd logging

2000-04-06 Thread Will Harris

At 10:35 6.04.2000, Jan Stifter wrote:
 hello all,
 i start qmail-smtpd with
 
 *** beg of qmail-smtpd
 # /sbin/init.d/qmail-smtpd
 # symbolic links in
 # /sbin/rc2.d
 export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
 
 case "$1" in
 start)
 echo "Starting qmail-smtpd."
 supervise /var/lock/svc/qmail-smtpd tcpserver -q
 -x/etc/tcp.smtp.cdb\
 -u101 -g101 0 smtp /var/qmail/bin/qmail-smtpd 21 | \
 setuser qmaill accustamp | \
 setuser qmaill tailocal  /var/log/qmail.log 
 ;;
 stop)
 echo -n "Stopping qmail-smtpd..."
 svc -dx /var/lock/svc/qmail-smtpd
 echo "ok"
 ;;
 *)
 echo "Usage: $0 {start|stop}"
 exit 1
 ;;
 esac
 
 exit 0
 *** end of qmail-smtpd
 
 1. the logging with  is not very nice and i am looking for a nice
 and simple other possibility.

I think I am using a newer version of the daemontools than you, but here's 
what I do.

I have an /etc/init.d/qmail file which has the following lines:

/usr/local/bin/supervise /var/qmail/supervise/tcpserver \
| /usr/local/bin/multilog t s1677741 n30 /usr/qmail/log/tcpserver 

The supervise/tcpserver/run file has the following:

exec /usr/local/bin/tcpserver -x /etc/tcp.smtp.cdb \
-v -u 65536 -g 7025 0 smtp \
/var/qmail/ifi-bin/mailserver.sh 21

The mailserver.sh file then runs ofmipd or qmail-smtpd depending on where 
the connection is coming from.  All logged output is then put in
/usr/qmail/log/tcpserver

 2. the file qmail.log is always 0 (no logging) even though i telnet to
 port 25 and send myself succesfully a mail.

As far as I know, qmail-smtpd doesn't generate any logging output - other 
elements of the qmail program log disposition of mail.  In order to get 
logging from tcpserver you need to supply the -v flag.

 3. this machine is a secondary MX receiver, so i would like to know,
 how much emails qmail-smtpd received, but qmail-send did not already
 send them to the main MX mail-server. the mails are in the queue, but
 how can i get the number of mails there?

If you log tcpserver activity, you can see how many machines connected to 
your host.  The other normal qmail logs should show you how many mails were 
delivered, and where.

regards,
Will
__

   "I was going to be a Neo-Deconstructivist, but Mom wouldn't let me..."

  multimedia laboratorium  [EMAIL PROTECTED]
  institut fuer informatik(pgp id)F703D035
  der universitaet zuerich(office) +41  1 635 4346
  winterthurerstr. 190(fax)+41  1 635 6809
  ch-8057 zuerich (mobile) +41 76 372 0913
  switzerland www.ifi.unizh.ch/~harris
__