From owner-freebsd-isp Tue Mar 14 15:17:30 2000 Delivered-To: freebsd-isp@freebsd.org Received: from ns.internet.dk (ns.internet.dk [194.19.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 5A3F837B859 for ; Tue, 14 Mar 2000 15:17:21 -0800 (PST) (envelope-from leifn@neland.dk) Received: (from uucp@localhost) by ns.internet.dk (8.9.2/8.9.3) with UUCP id AAA31934 for freebsd-isp@FreeBSD.ORG; Wed, 15 Mar 2000 00:17:16 +0100 (CET) (envelope-from leifn@neland.dk) Received: from localhost (localhost [127.0.0.1]) by arnold.neland.dk (8.9.3/8.9.3) with ESMTP id AAA13088; Wed, 15 Mar 2000 00:17:10 +0100 (CET) (envelope-from leifn@neland.dk) Date: Wed, 15 Mar 2000 00:17:10 +0100 (CET) From: Leif Neland To: Leif Neland Cc: freebsd-isp@FreeBSD.ORG Subject: Re: 460-status-mail-rejects In-Reply-To: <018101bf8ddf$91667e60$0e00a8c0@neland.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello myself! I rtfm, and made this: perl -ne "print \"\$1 \$2 \$3 \n\" if /^$start.*ruleset=check_\S+,\s+arg1=(<[^@]+@)?([^>,]+).*reject=.*( .*$)/o;" This prints the username before @, and the last word of the line. This gives this result: Checking for rejected mail hosts: 17 c126.h202052094.is.net.tw http://mail-abuse.org/rss (Blocked by rss) 15 I'd like to see the reason why the mail was rejected, not just the domainname. > > I'm not fluent not in regexp's to decode this: > > zcat -fc /var/log/mail.log.0* /var/log/mail.log | grep reject= | > perl -ne "print \"\$2\n\" > if /^$start.*ruleset=check_\S+,\s+arg1=(<[^@]+@)?([^>,]+).*reject=/o;" | > sort | uniq -c | sort -nr > > Mar 14 18:45:24 smtp sendmail[10098]: SAA10098: ruleset=check_mail, arg1=, relay=yoro1.yoroz.co.jp [210.196.67.114], reject=501 ... Sender domain must exist > > Why is it "$2"? > > Leif > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-isp" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message