Jump to content

Recommended Posts

Hi,

 

Can someone advise or provide an example PHP script where I can create (based on a pool of five dedicated IP addresses I have assigned to a virtual private server) so that I can - via MySQL table - assign one of those five ip addresses to each 'outgoing' email being sent using the mail function?

 

I've searched the Net and found nothing that really explains how to do this and no examples.

Would appreciate any insight to help me figure out this solution.

 

I know its possible b/c apps like Interspire & PowerMTA does it and you can assign the block of IP's via their app's GUI - just saying, i know its possible.

I found some info regarding Postfix and EXIM but nothing in details - reason I'm asking for help here to figure this out...

 

Objective: I just want to set (rotate) the ip addresses - that's bound to that server - as each 'outbound' email is being sent out from said server.

 

thx,

Craig

You can't "assign" an IP address to an email. What you do is have each of those servers configured to send email, which means installing appropriate MTA software and then doing whatever it takes to get the email message to those servers to be sent.

 

The MTA software is basically up to you. Postfix and EXIM are two of the big ones that can do it.

 

The other half depends - you haven't really given any requirements besides "send from multiple servers"...

 

You mentioned MySQL? And you're posting on a PHP forum? You can set up a PHP-based cronjob on each server that scans the database for emails that it should send and then sends them.

<?php

foreach (/* get list of emails from the database */ as $email) {
	mail($email["to"], $email["subject"], $mail["message"], $mail["headers"]);
}
as a very basic example. More appropriate would be to install something like PHPMailer and use that to send the emails instead of mail(), because it can do a better job of it.

 

 

But this whole thing is weird. Why bother with assigning specific servers? If they're all sending on behalf of the same domain then it doesn't really matter.

Hi & thanks for response.

Maybe my initial comments a bit unclear but you gave me the insight i needed to make this work.

Yes, I've concluded i need MTA software to manage the MTA (pools of ip's) and this setup is not for a fourm but a 'bulk email server' which sending currently 1/2 million or more transactional emails, monthly.

I've figured it out - thanks for your response.

 

brgds,

Thounda

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.