IT management/strategy

Relaying Mail from Subdomains

September 8, 2009, 02:06 PM — 

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.

Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
peer-to-peer

Esther Schindler
If the comments are ugly, the code is ugly

claird
SVG a graphics format for 21st century

pasmith
Take Chrome OS for a test spin

Sandra Henry-Stocker
Solaris Tip: Have Your Files Changed Since Installation?

sjvn
64-bits of protection?

jfruh
Android fragments vs. the iPhone monolith

mikelgan
What Gizmodo missed about the Pro WX Wireless USB disk drive

 

Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325

Join the conversation here

The Daily Tip

The Daily TipQuick, practical advice for IT pros. Made fresh daily.

Hot tips:

Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.

Newsletters

Subscribe to ITWORLD TODAY and receive the latest IT news and analysis.

I would like to receive offers via email from ITworld partners.
By clicking submit you agree to the terms and conditions outlined in ITworld's privacy policy.
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace