Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Advice for building an SMTP server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dejima
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2004
Posts: 130
Location: Greece

PostPosted: Thu May 31, 2012 7:44 am    Post subject: Advice for building an SMTP server Reply with quote

I am looking for building an SMTP server that could handle sending some millions emails per month.
I am building an application(PHP based) more like a social media that users would be sending messages and invites using the application's internal mail system.
This SMTP server will only be responsible sending these emails.

Currently I am thinking that the web servers will be running on Amazon Cloud while our smtp server will be based on our dedicated servers.

I would like your advice on

1) What kind of software should I use (postfix, sendmail, etc...)
2) What would be the hardware requirements for such server (CPU, RAM, Storage etc...)
3) How can I restrict that this smtp server is used only for requests send from my application? My Amazon cloud probably won't have static IP addresses expect my load balancers.
4) If the volume of emails is increased to a certain level should I use some kind of load balancing between smtp servers?

Thank you in advance.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Fri Jun 01, 2012 7:21 am    Post subject: Re: Advice for building an SMTP server Reply with quote

dejima wrote:
I am looking for building an SMTP server that could handle sending some millions emails per month.
I am building an application(PHP based) more like a social media that users would be sending messages and invites using the application's internal mail system.
This SMTP server will only be responsible sending these emails.


how will the messages be stored? What you describe, if messages are ultimately stored in e.g. a database, and read by a web frontend, then involving SMTP at all is an unnecessary step

dejima wrote:

I would like your advice on

1) What kind of software should I use (postfix, sendmail, etc...) - Postfix wins on scale, security, and simplicity. Exim wins on configurability. Sendmail *can* be win in that commercial support is readily available. I personally am a "postfix guy"

2) What would be the hardware requirements for such server (CPU, RAM, Storage etc...) - anecdotally, at one of my past companies we used 4 Postfix gateways, handling tens of millions of messages a day. Again, these were gateways, not internal MTA's. They each had dual-core CPU's, 4GB RAM, and 15k SAS drives.

3) How can I restrict that this smtp server is used only for requests send from my application? My Amazon cloud probably won't have static IP addresses expect my load balancers. require ESMTP authentication. In the Postfix world, this is done via SASL, and SASL can backend to everything from flat files, to an rdbms or even LDAP

4) If the volume of emails is increased to a certain level should I use some kind of load balancing between smtp servers? Yes. And there are loads both freely and commercial available. HAProxy running in TCP mode does a tremendous job for load balancing SMTP traffic (or any TCP-based traffic really). You can also look to leverage some of the kernel's available built-ins for load balancing (slightly more complex, but very efficient)
Thank you in advance.


comments in blue above. I may be thinking way overkill for what you intend to do, but when you say millions of messages per day, i start thinking "enterprise class deployment". When you start talking "enterprise class", i.e. "this is going to be a large-scale deployment", your common "all-in-one" LAMP stack is not the best path. But, it can certainly be used temporarily as a test platform for both development and the initial user base.

HTH
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
dejima
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2004
Posts: 130
Location: Greece

PostPosted: Fri Jun 01, 2012 11:44 am    Post subject: Reply with quote

Thank you for all your answers.

You are right about "enterprise class deployment". I already have an production environment which will have a load balancer, web servers that will be launching depending on load/traffic, and MySQL servers which will all be hosted on Amazon.

The reason that I am thinking of having a separate SMTP server on my dedicated and not in Amazon is that this way I can have a static IP and mail servers don't tag the emails as spam or even blacklist them.

Even if messages are stored in the database then in order a user to be notified an smtp should be involved. If the local smtp(of the web servers) is used then it would be probably be tagged as spam or be blacklisted.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum