🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Adding AnonUsa

#285058
From: Anon
Date: Sat, 01 Oct 2016 12:18
101 lines
5086 bytes
On Friday, September 30, 2016 at 10:02:41 PM UTC-5, Nathan Hale wrote:
> <snip>
> > 
> > I made some more changes to my Postfix configuration, and so, things are now no longer routing exclusively through Zax's relay.  Also, finally, got Tor to work for some hidden SMTPs.  It's been a learning curve.
> 
>   Here are some instructions from DigitalOcean on how to use a VPS to get around a blocked port 25:
> 
> Note: DigitalOcean calls their VPSs 'Droplets'
> 
> For this example I'll be using a DigitalOcean assigned IP address 123.45.67.89 as an example, please note that it should be replaced with the Droplet IP in all cases. I'll also use 10.9.8.7 as an example IP for the basement server, please note that should also be replaced in all cases.
> 
>     1) On the user's basement server, configure postfix to relay all email through the DigitalOcean server you'll be using. This is done in /etc/postfix/main.cf and with the following parameter:
> 
>     relayhost = 123.45.67.89
> 
>     You can also use a DNS (domain.com for example) address with this feature, but please note that you must enclose it in square brackets to avoid an MX lookup, which you don't want in this case:
> 
>     relayhost = [domain.com]
> 
>     2) Set Postfix to use port 2525 (or whatever you'd like). This is done in /etc/services, all you need to do is change the line that says:
> 
>     smtp 25/tcp mail
> 
>     To:
> 
>     smtp 2525/tcp mail
> 
>     3) Restart Postfix on the basement server.
> 
>     4) On the DigitalOcean VPS Droplet, you'll want to configure Postfix to accept relayed mail from the basement server specifically. This is also done in /etc/postfix/main.cf:
> 
>     mynetworks_style = subnet
>     mynetworks = 127.0.0.0/8 10.9.8.7/32
> 
>     The above will allow relay from both the Droplet's local connections and the basement server. If the basement server doesn't have a static IP, you'll need to set it to accept from the range of IPs available to it via DHCP.  (something like 10.9.8.0/24)
> 
>     5) Restart Postfix on the DigitalOcean VPS Droplet.
> 
>     6) Now you need to convert all port 2525 connections coming to your DigitalOcean VPS Droplet back to port 25 so the Postfix service on the Droplet will receive them. This is done with an Iptables rule:
> 
>     iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 2525 -j REDIRECT --to-port 25
> 
>     If you'd like, you can specify that this rule should only apply to traffic from the basement server, but as Postfix is already only configured to accept traffic from the basement server and local mail in mynetworks, you don't really need to.
> 
> 
>     Once all that is done, you should be able to send email from the basement server over port 2525 to the Droplet which will then relay it over port 25. All of this but the firewall rules are covered in the Postfix configuration guide here:
>     <a href="http://www.postfix.org/BASIC_CONFIGURATION_README.html" target="_self">http://www.postfix.org/BASIC_CONFIGURATION_README.html</a>
> 
> Note: Every time you reboot your server, the Iptables rule will be lost and need to be entered again.  To prevent this constant reentry, install iptables-persistent and the entry will be entered into iptables automatically at boot:
> apt-get update
> apt-get install iptables-persistent

You can also do this, which is what I am doing:

 relayhost = [domain.com:2525]

That way you don't have to make any changes to SMTP.  I also use a transport file:

domain.name1    relay1
domain.name2    relay2

If a destination is not in the transport file, it defaults to the main.cf relayhost.  You just have to add

transport_maps = hash:/etc/postfix/transport

to your main.cf file and do a 

postmap /etc/postfix/transport && service postfix reload

when changing it.
Technical Details
Message-ID: <a8ad2c28-898f-46b9-900b-e3919f8f5a48@googlegroups.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf1.newsdeef.eu!not-for-mail
References: <8104ad75-9c73-4376-8b95-e66c832f6ae7@googlegroups.com> <1a2128d26d9d83c253c68a4992e0e0ad@remailer.org.uk>

Show Full Headers
Complete Article Headers
Message-ID: <a8ad2c28-898f-46b9-900b-e3919f8f5a48@googlegroups.com>
Subject: Re: Adding AnonUsa
Date: Sat, 01 Oct 2016 12:18:13 +0000
From: Anon <donald.e.flood@gmail.com>
References: <8104ad75-9c73-4376-8b95-e66c832f6ae7@googlegroups.com> <1a2128d26d9d83c253c68a4992e0e0ad@remailer.org.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf1.newsdeef.eu!not-for-mail
X-Received: by 10.31.11.77 with SMTP id 74mr3206131vkl.39.1475324293817;
X-Received: by 10.157.51.3 with SMTP id f3mr1109822otc.4.1475324293761; Sat,
Newsgroups: alt.privacy.anon-server
In-Reply-To: <1a2128d26d9d83c253c68a4992e0e0ad@remailer.org.uk>
Complaints-To: groups-abuse@google.com
 posting-account=az1zeAoAAAA003q7Fgh7R_LDCb8OBXhS
NNTP-Posting-Host: 50.82.188.216
User-Agent: G2/1.0
MIME-Version: 1.0
Injection-Date: Sat, 01 Oct 2016 12:18:13 +0000
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable