🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Block Email on Server

#281622
From: Jack Ryan
Date: Mon, 04 Apr 2016 13:49
128 lines
4032 bytes
>> I have recently been getting a lot of spam to my admin and abuse
>> email addresses. Is there a way to block a specific domain or user.
>> I'm getting emails like the ones below:
>>
>> Date: Fri, 01 Apr 2016 17:19:31 +0530
>> From: Juan David LANDAVERDE <GARDEA12@yahoo.es>
>> To: admin@remailer.net
>>Subject: Re: picture
>> X-Mailer: iPhone Mail (13D20)
>>
>>
>>
>> Date: Fri, 01 Apr 2016 09:53:02 -0200
>> From: Miranda SIMPSON <ADAMS65@yahoo.es>
>> To: abuse@remailer.net
>>Subject: Re: image
>> X-Mailer: iPhone Mail (13D20)
>>
>>
> I use postfix sender_access to do a lot of blocking.  Here are some entries.
> 
> #just to make sure I don't accidentally block a remailer

  I forgot to include this before the rest:

mix@<myremailer>.net OK
<myusernames>@<myremailer>.net OK
admin@<myremailer>.net OK
remailer@<myremailer>.net OK

> anemone.mooo.com OK
> anonusa.net OK
> anonymitaet-im-inter.net OK
> dizum.com OK
> eurovibes.org OK
> fleegle.mixmin.net OK
> foto.nl1.torservers.net OK
> freie-re.de OK
> gpgvenue.com OK
> hermetix.org OK
> hoi-polloi.org OK
> holland.remailer.nl OK
> inwtx.net OK
> iria.hopto.me OK
> kroken.de.eu.org OK
> lousyroad.com OK
> mixmin.net OK
> snorky.mixmin.net OK
> mixrelay.mixmin.net OK
> mixmaster.mixmin.net OK
> mixmaster.thebunker.net OK
> redwine.zapto.org OK
> remailer.cpunk.us OK
> remailer.cypherpunks.to OK
> remailer.frell.eu.org OK
> remailer.org.uk OK
> remailer.paranoici.org OK
> remailer.privacy.at OK
> rooty.uni-boeblingen.de OK
> rooty2.uni-boeblingen.de OK
> sec3.net OK

<myremailer>.net DISCARD

> .ua DISCARD
> .ru DISCARD
> .accountant DISCARD
> .download DISCARD
> .pe DISCARD
> .pro DISCARD
> .date DISCARD
> .top DISCARD
> .tw DISCARD
> .pt DISCARD
> 
> a-rejected-company.com DISCARD
> comcastbusiness.net DISCARD
> cox.net DISCARD
> my-dentist-email@yahoo.com OK
> yahoo.com DISCARD
> hotmail.com DISCARD
> gmail.com DISCARD
> google.com DISCARD
> verizon.net DISCARD
> secureyourprofits99.com DISCARD
> unifiedlayer.com DISCARD
> vodafone-ip.de DISCARD
> linode.com DISCARD

  Also, you should be doing this to control whose messages can be sent through your postfix.

Create a remailer_access file like you created a sender_access in this post:
Message ID : <960b4160fd08f0a1b2580422cf9421ea@remailer.cpunk.us>

Then once a day run a cron of Zax's script to update the remailer_access file.  This is his script that I slightly modified to convert it into one script:

The cron:
00 6 * * * /etc/UpdateRemailer_access.sh &> /dev/null

The script:
#!/bin/bash
# UpdateRemailer_access.sh placed in /etc/
#
# Script that is exec by cron once a day to build
# postfix/check_recipient_access/remailer_access.
# Prevents server from becoming an open relay.

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

rm $filePath/tempmlist2.txt

wget --no-check-certificate --timeout=15 -t 1 http://www.mixmin.net/echolot/mlist2.txt -O $filePath/tempmlist2.txt

if [ ! -f $filePath/tempmlist2.txt ]; then   # file not retrieved
   exit 1
fi

DEST=/etc/postfix/remailer_access

MLIST=$filePath/tempmlist2.txt

grep -e '\$remailer' $MLIST | cut -f 2 -d \< | cut -f 1 -d \> | xargs printf "%-60s OK\n" > $DEST

/usr/sbin/postmap $DEST

rm $filePath/tempmlist2.txt  # rm work m2list

exit 0
Technical Details
Message-ID: <6e3ddb87e876ca3fc5fceea48abbaa02@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!news.usenet.farm!..!..!not-for-mail
References: <03b44a56d04e5d5791b98c7e1fcb887c@dizum.com>

Show Full Headers
Complete Article Headers
Message-ID: <6e3ddb87e876ca3fc5fceea48abbaa02@remailer.cpunk.us>
Subject: Re: Block Email on Server
Date: Mon, 04 Apr 2016 13:49:32 +0000
From: Jack Ryan <mixmaster@remailer.cpunk.us>
References: <03b44a56d04e5d5791b98c7e1fcb887c@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!news.usenet.farm!..!..!not-for-mail
Newsgroups: alt.privacy.anon-server
Organization: dizum.com - The Internet Problem Provider
X-Abuse: abuse@dizum.com
Injection-Info: sewer.dizum.com - 194.109.206.211
Lines: 128