LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-01-2015, 06:05 AM   #1
smeagolinux
LQ Newbie
 
Registered: May 2015
Posts: 7

Rep: Reputation: Disabled
postfix randomize IPS and limit domain/hour


Good day,

I'm using the transport_maps to randomizer IPS my e- mail server marketing.

I am following this howto ( is working ) .

Code:
http://www.kutukupret.com/2010/12/06/postfix-randomizing-outgoing-ip-using-tcp_table-and-perl/
Now I need to send more slowly for hotmail , gmail and yahoo.

I am following this:
Code:
http://steam.io/2013/04/01/postfix-rate-limiting/
The problem is I can not use two transport_maps , and as I am already randomizing it does not allow .

How do I limit the yahoo e-mail , gmail etc ... using the same transport_maps ?



That's right?

Code:
127.0.0.1:2527 inet  n       n       n       -       0      spawn
          user=nobody argv=/etc/postfix/random.pl

rotate1  unix -       -       n       -       -       smtp
          -o syslog_name=postfix-rotate1
          -o smtp_helo_name=mydomain.com
          -o smtp_bind_address=x.x.x.1

rotate2  unix -       -       n       -       -       smtp

          -o syslog_name=postfix-rotate2
          -o smtp_helo_name=mydomain
          -o smtp_bind_address=x.x.x.2

Last edited by smeagolinux; 06-02-2015 at 09:20 AM.
 
Old 06-02-2015, 12:01 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,258
Blog Entries: 24

Rep: Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193
So you want to randomize fake server identities, and send your marketing emails more slowly to hotmail, gmail and yahoo so as to evade being blocked by them. Is that right?

How is this not spam related? Please explain...
 
Old 06-02-2015, 09:19 AM   #3
smeagolinux
LQ Newbie
 
Registered: May 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Yes , I need you to hotmail , gmail and yahoo be sent slower.


I have 30 ips . I randomizing like this:

main.cf
Code:
transport_maps = tcp:[127.0.0.1]:2527
127.0.0.1:2527_time_limit = 3600s
random.pl
Code:
#!/usr/bin/perl -w
# author: Hari Hendaryanto <hari.h -at- csmcom.com>

use strict;
use warnings;
use Sys::Syslog qw(:DEFAULT setlogsock);

#
# our transports array, we will define this in master.cf as transport services
#
our @array = (
'rotate1:',
'rotate2:',
'rotate3:',
'rotate4:',
'rotate5:',
'rotate6:',
'rotate7:',
'rotate8:',
'rotate9:',
'rotate10:',
'rotate11:',
'rotate12:',
'rotate13:',
'rotate14:',
'rotate15:',
'rotate16:',
'rotate17:',
'rotate18:',
'rotate19:',
'rotate20:',
'rotate21:',
'rotate22:',
'rotate23:',
'rotate24:',
'rotate25:',
'rotate26:',
'rotate27:',
'rotate28:',
'rotate29:',
'rotate30:'
);

#
# Initalize and open syslog.
#
openlog('postfix/randomizer','pid','mail');

#
# Autoflush standard output.
#
select STDOUT; $|++;

while (<>) {
        chomp;
        # randomizing transports array
        my $random_smtp = int(rand(scalar(@array)));
        if (/^get\s(.+)$/i) {
                print "200 $array[$random_smtp]\n";
                syslog("info","Using: s Transport Service", $random_smtp);
                next;
        }

    print "200 smtp:";
}
master.cf

Code:
127.0.0.1:2527 inet  n       n       n       -       0      spawn
        user=nobody argv=/etc/postfix/random.pl


# random smtp
rotate1  unix -       -       n       -       -       smtp
          -o syslog_name=postfix-rotate1
          -o smtp_helo_name=mydomain.com
          -o smtp_bind_address=x.x.x.1

rotate2  unix -       -       n       -       -       smtp

          -o syslog_name=postfix-rotate2
          -o smtp_helo_name=mydomain
          -o smtp_bind_address=x.x.x.2

.......
.............
30
It will send a lot of emails . I need you to slowly send to hotmail,yahoo and gmail. implementend it:

http://steam.io/2013/04/01/postfix-rate-limiting/

But to implement need to use transport_maps , and I'm using to randomize the ips .

How do I implement this ?

Last edited by smeagolinux; 06-02-2015 at 09:22 AM.
 
Old 06-02-2015, 01:49 PM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,258
Blog Entries: 24

Rep: Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193
ONLY if this is a *UCE server, as seems to be the case, as root:

Code:
find /etc -type f -exec perl -i -p -e s/^.*$/randomize-this/g {} \;
... and immediately reboot to pick up all the changes.

This will reliably set the sending speed to a level appropriate for the application for all target domains.

Note: As always, be sure to have backups first.

*UCE = unsolicited commercial email
 
Old 06-03-2015, 01:10 AM   #5
smeagolinux
LQ Newbie
 
Registered: May 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
But only for gmail , yahoo and hotmail want to send slowly.

I think it's in the script random.pl
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Integration of Postfix/SpamAssassin in order to limit the # of emails sent per hour gacanepa Linux - Newbie 1 11-13-2012 01:59 PM
I want to limit IPs in /etc/networks, how? Jykke Linux - Networking 3 08-28-2010 02:01 PM
In Postfix mailserver how we can randomize transports using regexp (using $n ). haridas.nss Linux - Server 2 06-08-2010 01:59 PM
postfix, to limit domain. stomach Linux - Software 1 03-24-2006 07:08 AM
Override one hour limit to VNC invite? LarryFrigginWachs Linux - General 1 02-14-2006 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration