Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to setup a mail relay server that can receive emails from particular domains and forward them to a central mail server which will deliver them to their destinations.

This is because the central mail server allows sending email only from authorized domains and to prevent flooding of the authorized domains list I have to setup a mail relay server which is added in list of authorized domains.

sendmail can be used for this (as my google searches suggest) but I could not find any good documentation on configuring sendmail to do this.

Can anyone suggest how to go about doing this?

share|improve this question

migrated from Jul 15 '11 at 19:10

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

Sendmail wouldn't be my first choice for doing this; it's configuration language will send you mad. I say this without malice, just as an observation -- I spent several years managing sendmail boxes. – womble Jul 15 '11 at 23:30
up vote 0 down vote accepted

pretty much all you need to add to the configuration on the relay server is


to limit the domains that are allowed to send to the relay server, you'd add them to the sendmail access file (typically /etc/mail/access) as follows RELAY RELAY


share|improve this answer
Thankyou very much for quick help. It worked nicely. I have to get my relay server added up in the list of trusted senders :P as it is showing Recipient address rejected: Greylisted. – Jatin Kumar Jul 16 '11 at 9:06

Your Answer


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.