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.

We have multiple applications that currently talk SMTP to an external MTA. The emails have arbitrary destination domains (they're emails to be sent to our users), but all from the same internal domain (support@company.com).

I want to set up an internal MTA (i guess with sendmail) that queues all mails, and have the internal MTA forward these emails to the external MTA, because the external MTA occasionally goes down and this causes various problems in our applications. I figure I can set up sendmail as a queuing middleware.

If the above assumptions are correct, what would the sendmail configuration look like? The 'mailertable' feature looks promising, and so does 'SMART_HOST'.

Any thoughts before I explore these possibilities?

  • Jae
share|improve this question

migrated from stackoverflow.com Aug 26 '09 at 22:16

This question came from our site for professional and enthusiast programmers.

5 Answers 5

Such a configuration (relaying all mail to a single other MTA) is called a 'nullclient' configuration. Some guides are available:

For sendmail, all you should need it:

FEATURE(`nullclient', `mailhub.domain.notused')dnl

Some distros (openSuSE) provide a separate 'nullclient.mc' configuration file for this purpose.

share|improve this answer

The SMART_HOST parameter is exactly what you're looking for. Exact configuration details will depend on your sendmail version, but it's fairly straightforward. You'll specify the name of the external MTA as the smart host when you configure it. (Be sure that the machine you're configuring can resolve the name of the smart host, too.)

share|improve this answer

The question is very similar to some that have been asked before.

Consider the option of using SSMTP instead as my answer here.

Save yourself the complexity and security issues of using Sendmail for such a simple task.

share|improve this answer

I steered well clear of sendmail and opted for an 'minimal relay server' called nullmailer.

I blogged about it here and it works well for my scenario - your mileage may vary ;-)

share|improve this answer

With postfix, which is my preferred mail software, the configuration options is relayhost.

share|improve this answer

Your Answer

 
discard

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