🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Announcing new remailer Cloaked

#302863
From: inwtx
Date: Sat, 23 Mar 2019 19:57
72 lines
3283 bytes
  Here is AbuseAutoReply.sh script that exits might be interested in.

#!/bin/bash
#
# AbuseAutoReply.sh
# inwtx.net/AbuseAutoReply.txt
#
# This script automatically sends a reply email
# to each email that arrive in the abuse user's
# /var/mail/abuse mail file.  The reply is the
# contents of the mixmaster abuse.txt file, so be
# sure that it is correctly formatted.
# The reply is sent to the 'From: ???' address that
# is extracted from the senders abuse email that was
# sent to you at 'abuse@myremailer.net'.  A copy of
# the entire abuse email is then sent to your private
# email address set in the privaddr= variable below.
# The abuse user's /var/mail/abuse mail file is then
# purged to wait for more abuse emails.  Set the
# correct paths in the mailfile= and mixabuse=
# parameters below.  The script can be tested by
# sending abuse emails to your 'abuse@myremailer.net'
# address.

# Note: This script will not work if Mutt is
# initalized in the abuse user.  The script should
# be run by an abuse user's cron every few minutes.

# Note: See, choose, and un-delimiter which mail
# program you want to use under the title:
# 'Choose either mail or mutt below...' below.


# Path to default mail files:
mailfile=/var/mail           # no trailing /

# Path to mixmaster abuse.txt file:
mixabuse=/var/mixmaster      # no trailing /

# remailer return from address (should be abuse@<yourremailer>.<tld>):
mixFromAddr=abuse@myremaileraddress.net

# remailer's private email address to recv abuse email
privaddr=me@myprivate.net

#-----------------------------------------------

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


if [ -e $mailfile/abuse ] && [[ $(cat $mailfile/abuse | wc -l) -gt 0 ]]; then  # file exist and contains data?
   grep "From: " $mailfile/abuse > $filePath/autoreply.txt
else
   exit 0
fi

while read line1; do
      if [[ $(grep -c "From: " <<<$line1) -gt 0 ]]; then
         varmailaddr=$(sed -e 's/From: //g' <<<$line1)                # strip 'From: '
         mutt -s "Abuse email received!" $privaddr < $mailfile/abuse  # abuse email to be forwarded to your privaddr

# Choose either mail or mutt below (systemd usually doesn't have mail program)
#         cat $mixabuse/abuse.txt | mail -s "Abuse reply..." $varmailaddr -r $mixFromAddr
#         export EMAIL=$mixFromAddr && mutt -s "Abuse reply..." $varmailaddr < $mixabuse/abuse.txt

      fi
done< $filePath/autoreply.txt # read file line by line

rm $filePath/autoreply.txt
cat /dev/null > $mailfile/abuse

exit 0
Technical Details
Message-ID: <q76341$jl6$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!news.usenet.farm!..!..!not-for-mail
References: <6QglE.63301$cD4.51647@fx07.iad>

Show Full Headers
Complete Article Headers
Message-ID: <q76341$jl6$1@news.mixmin.net>
Subject: Re: Announcing new remailer Cloaked
Date: Sat, 23 Mar 2019 14:57:53 -0500
From: "inwtx" <noreply@inwtx.net>
References: <6QglE.63301$cD4.51647@fx07.iad>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail
Newsgroups: alt.privacy.anon-server
Organization: Mixmin
Injection-Date: Sat, 23 Mar 2019 19:57:55 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="890d172fe4561e5c56ca393ecef49099e97e44c2";
User-Agent: slrn/1.0.2 (Linux)
Lines: 72