Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've setup a mail.example.com, pointed it my server IP. I've also got my provider to setup a Reverse DNS to my server ip to the domain name I setup. AFAIK, what I need now is mail being sent from my mail server on my server IP to have the mail.example.com domain attached to it. How do I do that? Im using qmail.


share|improve this question
the current host is www.example.com. Would it be wiser to get the PTR record to point to that instead. Incase its been added to whitelists etc. –  madphp Aug 26 '09 at 8:34

1 Answer 1

up vote 1 down vote accepted

How is such mail sent from your mail server? If it's through a script using the sendmail alias (or qmail-inject), you just use

sendmail -fuser@mail.example.com

This will set the envelope sender (but not the From: field, that's up to you).

Or, you can put "mail.example.com" in /var/qmail/control/defaultdomain, which defaults to the content of /var/qmail/control/me, which should already be mail.example.com. If it's not, change it already.

share|improve this answer
cool. Im worred about people who may have added www.example.com to there whitelists. For that reason, Im going to stick with that domain, and get them to change the PTR. –  madphp Aug 26 '09 at 10:05

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.