🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #307498

mailq delete script

#307498
From: inwtx
Date: Thu, 23 Jan 2020 18:45
73 lines
2449 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

  If you want to delete just the eurovibes.org mail stuck
in your mailq, you can use the script below:


#!/bin/bash
#
# DeleteMailqByName.sh
#
# This scripts deletes entries in the mailq via a name in the mailq record.
# Be exact on the text to search for (eurovibes.org, etc).
# Format: ./DeleteMailqByName.sh eurovibes.org


filePath=${0%/*}  # current file path

inputrem="$1"

if [[ $1 == "" ]]; then
   echo "Address of remailer required!"
   exit 0
fi

mailq > $filePath/DeleteMailqByName.txt

cat /dev/null > $filePath/DeleteMailqByName.txt2

sed -i "1d" $filePath/DeleteMailqByName.txt
sed -i '$d' $filePath/DeleteMailqByName.txt

while read line1; do
      if [[ ! $line1 = "" ]]; then
         tr -d '\012' <<<$line1 >> $filePath/DeleteMailqByName.txt2
      else
         echo "$line1" >> $filePath/DeleteMailqByName.txt2
      fi
done< $filePath/DeleteMailqByName.txt

awk -vS= '$inputrem' $filePath/DeleteMailqByName.txt2 > $filePath/DeleteMailqByName.txt3

awk '{ print $1 }' $filePath/DeleteMailqByName.txt3 > $filePath/DeleteMailqByName.txt4

sed -i 's/\*//g' DeleteMailqByName.txt4

while read line1; do
      postsuper -d $line1
done< $filePath/DeleteMailqByName.txt4

rm $filePath/DeleteMailqByName.txt
rm $filePath/DeleteMailqByName.txt2
rm $filePath/DeleteMailqByName.txt3
rm $filePath/DeleteMailqByName.txt4

exit 0



-----BEGIN PGP SIGNATURE-----

iF4EAREIAAYFAl4p6VYACgkQhU7fz9hYXBPDTAD+LJ8e1ECoTtUTzNPlXdBbWHx9
09v1OzSthd1euS1kSIoA/jcFO1Q4vpWcjRl7dmQOOW+2nAb6cZYOPE6oozoK+F+h
=WVrt
-----END PGP SIGNATURE-----
--
pub 2048D/D8585C13
inwtx.net/pubkey.txt

--
pub 2048D/9720 86F3 274F 9AED AEFD  8E75 854E DFCF D858 5C13
inwtx.net/gpg_pubkey.txt
inwtx.net/NaClbox_pubkey.txt
Technical Details
Message-ID: <r0cpje$17r$1@news.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <r0cpje$17r$1@news.mixmin.net>
Subject: mailq delete script
Date: Thu, 23 Jan 2020 12:45:02 -0600
From: "inwtx" <noreply@inwtx.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: alt.privacy.anon-server
Organization: Mixmin
Injection-Date: Thu, 23 Jan 2020 18:45:04 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="6577407d2eed04a082c8b8b4d03a45be7d189d4a"; logging-data="1275"; mail-complaints-to="abuse@mixmin.net"