🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Anonusa Pinger Issue

#282392
From: Nomen Nescio
Date: Sun, 01 May 2016 20:15
72 lines
2785 bytes
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> My Mailq is filled with these.
>>
>> 057E517A5C0C 1632 Sat Dec 12 12:47:43 mix@redjohn.net
>> pinger@anonusa.net
>>
>> 0110517A5C2C 2280 Sat Dec 12 12:47:43 mix@redjohn.net
>> pinger@anonusa.net
> 
> Here is a script I wrote just for such pesky mailq entries.  Put it in a file /etc/DeleteMailq.sh, 'chmod 755 DeleteMailq.sh' it and run it like this:
> 
> ./DeleteMailq.sh pinger@anonusa.net
> 
> It will only pick out the pinger@anonusa.net mailq records and remove them.
> 
> 
<snip>

Script updated 2016-05-01:

#!/bin/bash
#
# Delete mailq by string within mailq record
# ./deletemailq.sh frell
#
#top


export PATH=$PATH:/sbin
export PATH=$PATH:/bin
export PATH=$PATH:/usr/sbin

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

if [ ${#remailerid} = 0 ]; then
echo "Remailer name must be appended to end for this process to start!"
exit 0
fi

mailq > $filePath/tempmq.txt

sed -i '/-Arrival Time-/d' $filePath/tempmq.txt  # rid of title and trailer lines
sed -i '/Kbytes in/d' $filePath/tempmq.txt

while read -r line; do
      var1stline=$line  # 1st line

      if [[ $line =~ "*" ]]; then  # pending rec has only 2 lines - skip
         read -r line  # bump past 2nd line
         read -r line  # bump past blank line between
         continue
      fi

      read -r line
      var2ndline=$line  #2nd line
      read -r line
      var3rdline=$line  #3rd line
      read -r line      # blank line between
      mailqstr="$var1stline $var2ndline $var3rdline"  # all 3 lines merged into one

      if [[ $(grep -c $remailerid <<<$mailqstr) -gt 0 ]]; then  # is passed string in mailq record?
         qID=$(cut -d' ' -f1 <<<$mailqstr)                      # extract 'Queue ID' to delete
         postsuper -d "$qID"                                    # yes - delete it
      fi
done < $filePath/tempmq.txt

rm $filePath/tempmq.txt

exit 0
Technical Details
Message-ID: <302b2539bd43cb6df729aacc7bcb7e4e@dizum.com>
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
References: <19170ab4ac3f3f1fbcf3d43fc50f248e@remailer.cpunk.us>

Show Full Headers
Complete Article Headers
Message-ID: <302b2539bd43cb6df729aacc7bcb7e4e@dizum.com>
Subject: Re: Anonusa Pinger Issue
Date: Sun, 01 May 2016 20:15:57 +0000
From: Nomen Nescio <nobody@dizum.com>
References: <19170ab4ac3f3f1fbcf3d43fc50f248e@remailer.cpunk.us>
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
Comments: This message did not originate from the Sender address above.
 It was remailed automatically by anonymizing remailer software.
 Please report problems or inappropriate use to the
 remailer administrator at <abuse@dizum.com>.
Newsgroups: alt.privacy.anon-server
Injection-Info: mail2news.mixmin.net; mail-complaints-to=abuse@mixmin.net