Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I maintain an application that sends out a ton of e-mail on a daily basis. Soon, we will have to migrate to another SMTP-server for that, which has an ip address that has no reputation with respect to email delivery. So instead of just flipping the switch, I would like to start by sending a small percentage of all mail through the new server, and then gradually increase that percentage until we reach 100%.

It wouldn't be very hard to implement something in the application itself, but I would like to know if there is an easier, more reliable out-of-the-box-type solution for this.

My first thought was to use round-robin DNS for this, but the servers require different credentials, use different protocols (one uses SASL, the other doesn't) and even different port numbers, so I think that rules out the DNS based solution.

Is there any way, for example, to configure Postfix to send 1 out of x e-mails to relay host A and the rest to relay host B? Or perhaps a different MTA?

share|improve this question
    
Not sure your architecture is clear here, so does the application store connection info for each SMTP box or does it send it to a local queue which then gets forwarded to an SMTP box for final delivery? –  Brent Pabst Oct 12 '12 at 11:57
    
The application connects directly to a remote SMTP server at the moment. –  Bart van Wissen Oct 12 '12 at 13:11
1  
"Warmed up" an IP address? That's a new one. I don't understand all those non-technical terms. Can you translate that into jargon? –  Michael Hampton Oct 12 '12 at 13:29
    
When an ISP encounters lots of incoming email from a yet unknown address, it may block or throttle the sender. To establish a reputation as a legitimate email sender, you have to start with a small number of email addresses per day. It is explained in this article by Sendgrid: sendgrid.com/blog/how-to-warm-up-an-ip –  Bart van Wissen Oct 12 '12 at 15:14
1  
Aha. That looks like some term they just made up. –  Michael Hampton Oct 12 '12 at 22:20

2 Answers 2

I would setup a load balancer in front of your old and new mail servers. Use a weighted round robin balancing algorithm and send 1% of your email to the new server to warm up the IPs. I've used this method on the past and it works great.

share|improve this answer

Cronjob that changes configs?, use new server as mail-relay for 10 minutes each hour..

/etc/postfix/switch_to_new.sh

#!/bin/bash
#Switch to new mail relay for a bitty...
postconf -e relayhost=[mail.mynewserver.com]:587
postfix reload

/etc/postfix/switch_back.sh

#!/bin/bash
#delete relayhost
postconf -e relayhost=
postfix reload

then just cron between them as needed.. when you are up to 100% relayed, switch your app to the new server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.