From owner-freebsd-questions Tue Aug 21 17:49: 3 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp012.mail.yahoo.com (smtp012.mail.yahoo.com [216.136.173.32]) by hub.freebsd.org (Postfix) with SMTP id 4A43637B40D for ; Tue, 21 Aug 2001 17:48:46 -0700 (PDT) (envelope-from rmardo@yahoo.com) Received: from unknown (HELO rino) (202.69.161.246) by smtp.mail.vip.sc5.yahoo.com with SMTP; 22 Aug 2001 00:48:39 -0000 X-Apparently-From: Message-ID: <009701c12aa6$ae485c00$f6a145ca@rino> From: "Rino Mardo" To: "Giorgos Keramidas" , "Odhiambo Washington" Cc: "e-value - Maxime Mathon" , "FBSD-Q" References: <20010821192954.G66076@ns2.wananchi.com> <3B82910F.DB0D2137@e-value.fr> <20010821195636.I66076@ns2.wananchi.com> <20010821224638.A96292@hades.hell.gr> Subject: Re: OT: Sendmail Date: Wed, 22 Aug 2001 08:52:01 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > * e-value - Maxime Mathon [20010821 19:50]: writing on the subject 'Re: OT: Sendmail' > | sendmail stop > | killall sendmail > | cd /var/spool/mqueue > | rm -f * > | sendmail start > > > That's a wonderful clue. I am so much biased towards Exim. Now may I ask > one more question: Suppose I want to remove only frozen messages - I can > get the message ID?? In Exim I simply do 'exim -Mrm Message-ID' ; what do > guys do in sendmail? I can use sendmail -bp to list the message IDs. >You can also use something along the lines of the following to see the >Message-ID's of the queued messages, sorted by date. > > % mailq | sed -e '1,2d' | grep -v '^[[:space:]]' | sort +2 > f7LJSwU96783 9 Tue Aug 21 22:28 charon > f7LJUCh96806 13 Tue Aug 21 22:30 charon > f7LJUsS96824 5 Tue Aug 21 22:30 charon > f7LJV3b96829 5 Tue Aug 21 22:31 charon > >Or if you only want the Message-Id and the date, use the following: > > % mailq | sed -e 1,2d | grep -v '^[[:space:]]' |\ >awk '{printf "%s\t%s %s %2d %s\n",$1,$3,$4,$5,$6}' | sort +1 > >which, for the same queue files would produce: > > f7LJSwU96783 Tue Aug 21 22:28 > f7LJUCh96806 Tue Aug 21 22:30 > f7LJUsS96824 Tue Aug 21 22:30 > f7LJV3b96829 Tue Aug 21 22:31 >If you see in there something that has a very old date, it's probably >stuck in your queue for a long time. Removing it is easy. Just >delete the files /var/spool/mqueue/dfXXX and /var/spool/mqueue/qfXXX >when sendmail is stopped. > >-giorgos i would have thought you can use sendmail switches with exim and viceversa. plus there are sendmail switches which would show/remove you frozen messages without having to do shell scripts. anyway, nice to see shell scripts and not perl. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message