Send email using a random IP?

saros

Active Member
Aug 28, 2013
30
0
6
cPanel Access Level
Root Administrator
How do I randomize the IPS?


this code not work /etc/exim.pl
-----------------
Code:
sub randinet {
@inet = ("x.x.x.1", "x.x.x.2", "x.x.x.3", "x.x.x.4");
return $inet[int rand($#inet+1)];
}
 
Last edited:

Sreejit

Member
Apr 11, 2011
20
0
51
cPanel Access Level
Root Administrator
Alternative Option : You can write script to update IP's in /etc/mailips file. Then set it up as cron to update it every 1 minute.

Make sure you disable the option "Send email from accounts dedicated IP" in WHM >> Exim configuration editor/manger
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

Could you elaborate on why you prefer to randomize the IP addresses you send out email from?

Thank you.