From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 22 Feb 2007 15:17:30 +0300 From: Alexey Tourbin To: community@lists.altlinux.org Message-ID: <20070222121730.GD3073@localhost.localdomain> Mail-Followup-To: community@lists.altlinux.org References: <20060819205113.GC8500@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nHwqXXcoX0o6fKCv" Content-Disposition: inline In-Reply-To: <20060819205113.GC8500@localhost.localdomain> Subject: Re: [Comm] script for procmail log X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: ALT Linux Community List-Id: ALT Linux Community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Feb 2007 12:17:29 -0000 Archived-At: List-Archive: List-Post: --nHwqXXcoX0o6fKCv Content-Type: multipart/mixed; boundary="48TaNjbzBVislYPb" Content-Disposition: inline --48TaNjbzBVislYPb Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 20, 2006 at 12:51:13AM +0400, Alexey Tourbin wrote: > =ED=CF=D6=C5=D4 =CB=CF=CD=D5 =CE=C1=C4=CF. >=20 > ~/.procmailrc: > LOGFILE=3D$MAILDIR/.maillog > LOGABSTRACT=3Dall >=20 > ~/bin/maillog: > #!/bin/sh > log=3D$1 && shift || log=3D~/Mail/.maillog > tail -n 30 -f "$log" |perl -MEncode -Mopen=3DOUT,:locale -ln /dev/fd/3 3<= <'__EOF__' > /^\s*Subject:\s*/ and $subj =3D Encode::decode("MIME-Header", $') || $'; > /^\s*Folder:\s*(\S+)/ and printf "%-8s\t%s\n", $1, $subj; > __EOF__ =F7=CF=D4 =D7=C5=D2=D3=C9=D1 =D0=CF=CC=D5=DE=DB=C5. --48TaNjbzBVislYPb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=maillog #!/bin/sh log=$1 && shift || log=~/Mail/.maillog tail -n 99 -f "$log" |perl -MEncode -Mopen=OUT,:locale -ln /dev/fd/3 3<<'__EOF__' 2>/dev/null s/^\s*Subject:\s*// and s/=\?\w\S*[^=]$/$&?=/, $subj = Encode::decode("MIME-Header", $_) || $_; /^\s*Folder:\s*(\S+)/ and printf "%-8s\t%s\n", $1, $subj; __EOF__ --48TaNjbzBVislYPb-- --nHwqXXcoX0o6fKCv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF3YnafBKgtDjnu0YRAnloAJsElwFV4XUKZ+vAyIWySoelukNV6ACgn6Ia Swtq5clARudJtjdrI8Zh3YM= =fefY -----END PGP SIGNATURE----- --nHwqXXcoX0o6fKCv--