Multiple Smtp, ip rotation with phplist

Hello
I have a vps with multiple ip, what i did is to assign for every subdomain a dedicated ip.
Now the first solution to run phplist is to install on every subdomain a phplist. This is a long way i think.
I see as well multi smtp on the config.php option but ho to use multilple emails as well?
In other words do you know how to use ip rotation with phplist?

I’m not aware of a way to ‘rotate’ the ip addresses that phplist uses, other than specifying multiple smtp servers.
You can send multiple messages at a time, if configured to do so in the config.php file.
It will ‘share’ the sending across the multiple smtp servers, if configured.

You would also want to make sure your dns is setup properly (reverse dns), and that the spf records and dkim match what you are sending. These are not configured in phpList, but are part of a best practices approach that increases your deliverability.

Thank you for the fast response,
"You can send multiple messages at a time, if configured to do so in the config.php file.
It will ‘share’ the sending across the multiple smtp servers, if configured."
Any suggestion how to do this?

There is not much documentation, and I haven’t used that function (use multiple smtp servers) myself. Look in the config_extended.php file, it shows an example of how to configure phpList. You’ll have to play with the configuration to get it to work. I would assume that the logins to all the servers would need to be the same.

I already checked config_extended.php, no solution for multiple smtp.

Here is the section that you would want to modify (but move it into the config.php file for it to take effect)

# To use a SMTP server please give your server hostname here, leave it blank to use the standard
# PHP mail() command.
define("PHPMAILERHOST",'');

# in the above you can specify multiple SMTP servers like this:
# 'server1:port1;server2:port2;server3:port3' eg
#define('PHPMAILERHOST','smtp1.mydomain.com:25;smtp2.mydomain.com:2500;smtp3.phplist.com:5123');

any hack on the config.php how to assign multiple email account from different domains?
This is all the basics of the ip rotation

IP rotation isn’t a basic feature of phpList.

You can use different smtp servers, if they need authentication before it will accept, you should use the same login settings for each server, so the one set of phpList settings can login to all the smtp servers.

If you figure out how to use multiple logins, it would be good if you could post the findings here for others to refer to.

I think how can the UserName be same for different SMTP Servers. At least password can be same but how can the UserName. Suppose If I set three domains smtp.domainname1.com:25, smtp.domainname2.com:25 and smtp.domainname3.com:25 then User Name of three SMTPs can’t be same.

Any Idea

You would have to host your own smtp servers, and modify them so that this is possible.

Or, setup the servers so that you can send without authenticating. (This is an advanced setup, beyond the scope of phpList). If you are using a hosting service such as godaddy, this is not possible to configure that way.

Is this a matter of syntax? Is this possible:

ftp://username:password@hostname/

So maybe:

user1:password1@smtp.domain1.com:25;user2:password2@smtp.domain2.com:25;user3:password3@smtp.domain3.com:25

UPDATE: I tested the above and it didn’t work. Is there some kind of syntax we can use to make this work? Such as wrapping the smtpuser and the password inside phpmailerhost

define('PHPMAILERHOST','email-smtp.us-west-2.amazonaws.com');
$phpmailer_smtpuser = 'AKIAJDWJ3LKU3I76H3EQ';
$phpmailer_smtppassword = 'Amx1wq8Zxx0JRDUJeM5CcA4ZvEDxvsw3wbxX11cqc+cM';

As an experiment, I setup a server instance with multiple instances (3) of the PHP List code and 3 different config.php that specified 3 different SMTP server settings. All 3 instances were connected to the same database. It worked and seemed to do so without any conflicts.

Please can you be more specific about the installation? Also did you use different domains? or Subdomains?

Hello All,
Seems this is a old thread. But putting some insights to this. The options I tried is using the 
1st >Bash script to rotate 'postfix' IP. And add this to cron. 

ip_rotate.sh
==============
#!/bin/sh
ips='
    198.99.83.245 
    199.99.83.254
    197.99.83.255
    196.99.83.247
'
#####################################################
[ ! -f './current.txt' ] && echo '1' > ./current.txt

nIPS=0
for ip in ${ips}; do nIPS=$(( nIPS + 1 )); done

pos=$(cat ./current.txt)
counter=1
for oldip in ${ips}; do
[ $pos -eq $counter ] && break
counter=$(( counter + 1 ))
done

[ "$nIPS" -eq "$pos" ] && {
echo "limit reached"
pos=1
} || {
echo "increment!"
pos=$(( pos + 1 ))
}

echo "$pos"  > current.txt

counter=1
for newip in ${ips};do
[ $pos -eq $counter ] && break
counter=$(( counter + 1 ))
done

echo "prev: $oldip"
echo "new: $newip"
###This is your postfix main.cf file###
sed -ie "s/smtp_bind_address = $oldip/smtp_bind_address = $newip/g" /etc/postfix/main.cf
service postfix reload
==============
2.Option is to use multiple config.php file and create a simple bash script.
config_rotate.sh
-------------
#!/bin/sh
/usr/bin/phplist1  processqueue;
/usr/bin/phplist2  processqueue;
/usr/bin/phplist3 processqueue;
-------------
In all these phplist1,2,3 use same index.php and different config files. config1,2,3. make sure ';' is added to end of each line. So after finishing the phplist1 bacth only it will go to 2 and then to 3rd. So you can use different smtp accounts in each config file.

**Add this to cron.**
/bin/sh config_rotate.sh
Also if there is any other methods please update.strong text