Re: qmail-smtpd logging
"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
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
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
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
Re: qmail-smtpd logging
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.
Re: qmail-smtpd logging
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
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
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.
Re: qmail-smtpd logging
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 __