Rotate IP Addresses In PowerMTA: Introduction
Hello World, Rotate ip addresses in PowerMTA is been an unanswered question in many forums and then i decided to write an article about this problem and tried to make this as much easier as i can, but first i’m Sorry if i let you guys waiting so long, i know how important this information to many email marketers, so i will try my best to make this very easy to understand and i will be available to anyone who experience any issue of any kind in this industry from now on.
If this is your first time you visit rekblog.com, let me introduce myself, my name is Reda El Kasraoui i’m a PHP Developer, Affiliate Marketer, recently E-commerce marketer (Shopify) and Email Delivery Specialist, if you already know who i am let me refresh your memory, just click “F5” in your keyboard and YES! I’m still here lol.
Rotate IP Addresses In PowerMTA: Let Get Started
Before getting started i recommend everyone to read PowerMTA user guide.
You can find it inside the PowerMTA monitoring dashboard (you can download it from here) all your needs are already included in that document and if everyone is telling me that their user guide is not explained well i’m totally agree, you need to be an email delivery specialist to be familiar with it.
Understanding Telnet:
So let get things started:
There’s many ways to send an email but i recommend everyone to test delivery using Telnet, because this is very important in what we want to do here.
So first thing first let’s do this in an easy step by step using Telnet from your server terminal (Server that we want to work with their IP Addresses).
Open a telnet session: From a command prompt, type telnet 127.0.0.1 2500, and then press ENTER.
Please keep in mind that this line needs to be declared in your PowerMTA Config file inside /etc/pmta/
"smtp-listener 127.0.0.1:2500"
which means that PowerMTA is already listening to this port but wait… before you open a telnet session take these information seriously.
this time let’s say our VMTA in the PowerMTA config file is something similar to this
let’s make this very easy to everyone and let me explain it for you:
smtp-source-ip 1.2.3.4 #this is the IP Address for this Virtual MTA
host-name domain.com #this is the hostname that is linked to this ip address which is your domain name or a subdomain.
domain-key selector1,domain.com,/etc/pmta/domainKeys/x.x.private # this is the dkim private key record inside "x.x.private" file and of course the spf record is already declared in your registrar (ex: godaddy)
So the VMTA name is ip1.
In this example we will tell TELNET to send a test message for this IP Address using their VMTA name ip1 with the following header line “x-virtual-mta” and this header line will work like any header line you already know such as Date, Message ID, From, etc… and it’s not important if you type it before or after the known header lines.
let’s see what PowerMTA user guide is saying about this feature
also don’t forget to declare those two lines separately or make sure it’s already exist or this won’t work either.
relay-domain domain.com #domain.com is your domain name or subdomain.
smtp-listener 1.2.3.4:25 #1.2.3.4 is the ip address that you want to send from, and 25 is the port used.
Many of you will tell me that the header line “x-virtual-mta” will show up in the message header you stupid a$$hole, no habibi it will not show up that’s it haha Thanks to the Power of PowerMTA.
Let’s do the a telnet test the right way:
Open a telnet session: From a command prompt, type telnet 127.0.0.1 2500, and then press ENTER.
Type EHLO , and then press ENTER.
Type MAIL FROM:<sender@domain.com>, and then press ENTER. If the sender is not permitted to send mail, the SMTP server returns an error.
Type RCPT TO:<recipient@remotedomain.com>,and then press ENTER.If the recipient is not a valid recipient or the server does not accept mail for this domain, the SMTP server returns an error.
Type x-virtual-mta: ip1, remember ip1 is the vmta for the ip 1.2.3.4 that we have inside the virtual mta.
Type Data
If desired, type message text, press ENTER, type a period (.), and then press ENTER again.
If mail is working properly, you should see a response similar to the following indicating that mail is queued for delivery:
250 2.6.0
check your PowerMTA monitoring, and check the IN/OUT in the Traffic Totals stats, also to be sure that the exact IP Address that you want to deliver from is the one you saw in the PowerMTA Monitoring and then check the queued data inside the Top Domains in the Queue section.
Now check your inbox to make sure the message is already delivered to your email account.
Bingo!
I think many of you got my strategy, we will make a PHP code that send emails and rotate ip addresses using Telnet and PowerMTA, we can control each VMTA which means each ip address then we can rotate IP addresses using a While() loop in PHP.
Consider to use fsockopen(), fput() to be able to connect your PHP code with Telnet.
You can control now all your IP Addresses from a PHP Application and rotate your ip addresses the way you want it, also you should consider to create an SQL database and store all your servers information such as IP Addresses, gateways, Port used to send emails and you can do more.
I hope this Information is useful for you guys, and i hope you enjoyed my article.
I Wish you all a Great Earning and keep rotate ip addresses until you hit your million dollars, don’t forget to share your feedback in the bottom of this page.
Email Developer, SEO Specialist and Full Stack Web Developer
Tetouan, Tetouan/Tangier, 93000, Morocco
Almauser
we are waiting <3
Zakaria
we are waiting bro
Jalal
still waiting 😀
Azeddine
Wainting O_O
hamza
waiting u
interspire
many interested, please do it 😀
Kamil
Hi, you have very interesting posts on your blog’s page. I’m waiting for this one too.
Mohammed
Still waiting
Sondoss
Waiting for ur article man! 🙂
Ayyoub
yes bro , we are waiting
Lestraw
Im waiting for your article bro
Kamil
knock knock 🙂
Reda
waiting for that !!
chloe
we are waiting bro go on
soma
still waiting please do it asap!
siaf
still Waiting Bro 🙂
Reda El Kasraoui
Waiting for what ??
bulk mailing
i’m doing ip rotation with exim.. so i don’t understand why everyone bothers using powermta which is very expensive and nulled version has a lot of security issues…
Saad
Have Started Now I want this service
Fouad
If you have time can you write an article about postfix, and also explain some of your interesting fb post ( port 587 465, )