Relaying Mail from Subdomains

By Sandra Henry-Stocker  Add a new comment

Many releases ago (starting with sendmail 8.9), sendmail defaults changed so that email would no longer be
relayed unless the application was specifically built or configured to allow this behavior. Too many spammers were taking advantage of the friendly posture of our mail servers to help them with their nasty business. If, on the other hand, you are sending mail to or from the local domain, no problem.

Relaying for sendmail is defined as mail coming from outside the domain being sent to outside the domain. For example, trying to send mail from a.com to c.com would involve a relay if asked of b.com and won't be supported by b.com if relaying is denied.

The behavior on modern sendmail servers to refuse to relay mail can bite you, however, if what you want is to be able to send mail from a subdomain to systems on your parent domain. In this case, allowing mail to be fowarded can be altered with your sendmail settings.

If the relay_entire_domains feature is supported (which it generally is), all you have to do is add your subdomains to a file named /etc/mail/relay-domains and then restart sendmail. If a sendmail service on subatomic.particles.org needs to relay mail to or from hosts on the particles.org, add the parent domain to its relay-domains file.

# domainname
subatomic.particles.org
# cat /etc/mail/relay-domains
particles.org
# /etc/rc2.d/S88sendmail restart

If a finer-grained relay mechanism is needed, you can use the relay_hosts_only feature and allow relaying only to particular systems

# domainname
subatomic.particles.org
# cat /etc/mail/relay-domains
boson.particles.org
fermion.particles.org
# /etc/rc2.d/S88sendmail restart

You can also relay domains using the access_db feature, though a little more work is involved. You have to set up your access database, add records to it and run the makemap command to build the file sendmail will read. Then you still have to restart sendmail or send it an HUP signal so tha it will take note of the changes.

    Add a comment

    Post a comment using one of these accounts
    Or join now
    At least 6 characters

    Note: Comment will appear soon after you have activated your account.
    Obscene/spam comments will be removed and accounts suspended.
    The information you submit is subject to our Privacy Policy and Terms of Service.

    ITworld LIVE

    IT Management/StrategyWhite Papers & Webcasts

    White Paper

    Evaluator Group: Storage Federation - IT Without Limits (Analysis of HP Peer Motion with Storage Federation)

    As the role of IT increases within organizations, the need to move data when and where it is needed is critical to support emerging business requirements. This has become increasingly difficult due to the huge growth of data volumes. This white paper sponsored by HP + Intel evaluates a solution that aims to enable the movement of data without physical limitations. Read now and see how this could enable agility and efficiency.

    White Paper

    ESG Lab Validation Report: HP Data Protector & Deduplication Solutions

    Many organizations have deployed disk-to-disk backup technologies to improve the speed and reliability of their backup and disaster recovery operations. A growing number of these now look to data deduplication to enhance retention periods and reduce costs. This ESG Lab Validation Report sponsored by HP + Intel examines a number of backup and recovery solutions and evaluates their ease of implementation as well as their ability to improve reliability and reduce costs.

    White Paper

    Business Value of Blade

    The nature of the blade platform makes system management, monitoring and provisioning easy and efficient. Access this resource to learn how blade migration will save your data center time and money while increasing performance.

    White Paper

    Accelerate time to application value

    For your IT organization to keep pace with the business, you need a new, faster approach to infrastructure deployment-an approach that increases agility and accelerates time to application value. That's HP Converged Systems. Built on Converged Infrastructure, these systems deliver the industry's first portfolio of pre-integrated, tested, and optimized infrastructure solutions for applications running in virtual, cloud, dedicated, or hybrid environments.

    White Paper

    Converged Infrastructure for Dummies

    As you know, everything is mobile, connected, interactive, and immediate. This is exactly why organizations need a highly agile IT infrastructure in order to keep pace with extreme fluctuations in business demand. This book will help you understand why infrastructure convergence has been widely accepted as the optimal approach for simplifying and accelerating your IT to deliver services at the speed of business while also shifting significantly more IT resources from operations to innovation.

    See more White Papers | Webcasts

    Ask a question

    Ask a Question