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

Linux DNS networking question:

If an MX record points to IP address and A record of a domain points to, can I still send emails from on the behalf of a domain, without being classified as spam? The reason being this: I'd like to use javax.mail to send newsletters from the application, but to receive personal emails on Google Apps to avoid possible Linux sendmail/qrunner exploits.

share|improve this question

MX is to specify where incoming mail for that domain should be sent to. You can send mail on behalf of that domain from a completely separate host.

The problem with mail from being classified as spam doesn't have much to do with the MX record, but to other factors:

  • whether has a PTR (reverse DNS) record associated with it
  • whether that IP is in some black listed block
  • whether there is an SPF record for the domain saying that it is a legitimate sender of mail for the domain
  • whether you are signing the outgoing mail with DKIM

There are probably other things I haven't thought of off-hand. These are factors other than how spammy the contents of the email are, by the way.

One thing to keep in mind is that there are third party mass mailing services (e.g., Sendgrid) that have put some resources to solving these problems on your behalf.

share|improve this answer
This is a good answer - but I would add that there is literally no way on earth to guarantee that nobody will ever class your mail as spam. Each mail server operator or company will make up their own rules on what mail they will accept and what they will reject. All you can do is make sure you follow best practices, don't allow your server to be abused by spammers, don't spam yourself, and make sure any complaints you get are handled and responded to in a timely manner. – Jenny D Jul 18 '12 at 14:19
for the reference, if has reverse DNS record does it make sense to add SPF record? – Mladen Adamovic May 1 '15 at 9:34

Classified as spam by what (or who)? Sounds like it's going to be a question of how your recipients do their spam classification, and whether they use a reverse MX lookup.

If you want to be safe, you could always add an MX record for your domain's mailserver at a high priority value (lower numeric values are preferred). Your mail sever wouldn't even have to do anything, short of sending the HELO reply you want, to validate your domain against this kind of anti-spam check.

I'm afraid I don't know how commonly used reverse MX-lookups are as a spam-fighting technique, because that's all up to the mail admin(s) at the recipient's domain. Might be a good idea to check with the mail providers of your newsletter recipients (or at least the most common mail providers on your list) to see if you're going to run afoul of their anti-spam checks or not.

share|improve this answer

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.