Send-only solution for multiple domains

I'm working on a couple of web applications that I want to be able to send email from, for forum PMs and other site alerts. I like tinkering with databases and whatnot, but I generally consider email to be a pain, so I want something I can set up and forget about :) My apps share enough infrastructure that it should make sense to run them all on the same server (and all on the same app servers, if -willing the traffic grows enough to justify multiple linodes).

The simplest solution for one domain seems to be to use Google Apps for pretty much everything, and install a send-only MTA on the app server. However, all of the guides I've seen for this only apply to single-domain servers. What do I do if I want each app to be able to send email from its own domain?

(In case it matters, I'm using Ubuntu 10.10 and my apps are Rails 3…I'm also using Redmine, which requires Rails 2)

4 Replies

As long as the e-mail is coming from inside the system, exim (and other MTAs) don't care what address is used by the sender. So – unless you're relaying outgoing mail through Google Apps instead of sending it directly – the MTA configuration is the same.

I don't know how Rails would be set up to send outgoing mail, but I'd assume there's some application-specific default for the From: address.

@hoopycat:

As long as the e-mail is coming from inside the system, exim (and other MTAs) don't care what address is used by the sender. So – unless you're relaying outgoing mail through Google Apps instead of sending it directly – the MTA configuration is the same.

I don't know how Rails would be set up to send outgoing mail, but I'd assume there's some application-specific default for the From: address.

Interesting…Rails does allow you to use an arbitrary From: address, so that should work. Maybe I should have tried this before posting… :)

Will I run into any issues with spam filters due to the fact that reverse DNS won't necessarily resolve to the right thing on my outgoing messages? I think that's what I was really worried about.

@adam:

Will I run into any issues with spam filters due to the fact that reverse DNS won't necessarily resolve to the right thing on my outgoing messages?

It is not important for the DNS of your mailserver to match the From address of the email that is sends. It is extremely common for these to be mismatched, for example when google sends mail for your domain.

What IS important is that your server has a reverse DNS entry. Less important, but still maybe checked by some systems is that the reverse DNS matches the forward DNS and the name the mailserver announces itself as.

If there are SPF records for the domains you are sending for, make sure they include (through some mechanism) the IP address of your server.

My servers do have the default Linode RDNS, which should be fine if they're just checking that one exists.

I haven't bothered with SPF records, but it doesn't seem that difficult, so if that's all I need to do, consider this question answered!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct