dns - alias but not for email?

terrordaddy

Verified User
Joined
Aug 25, 2008
Messages
8
Hello,

is it possible to have a domain alias that does't forward mails?

Situation:

main domain: www.mydomain.com

www.my-domain.com => alias for => www.mydomain.com

now all my emails are forwarded as well: [email protected] => [email protected].

Is there a way to disable the email forwarding but keep the forward function for the http domains? I receive a lot of spam on the first address, that's why I don't want to receive all the emails send to that account...

Thx!
 
You can just delete the link in /etc/virtual

rm -rf /etc/virtual/my-domain.com
 
Thanks for the quick reply. I would like to try your solution, only problem is that I have a reseller account with no ssh access, so I can't change the virtual host file... Isn't there a way to do this in DirectAdmin?
 
Well that would require your server owner. I dont think there is a way in directadmin to do it. If you have dns access you could just delete the mx records for the domain then it would not be routable for mail.
 
Maybe we need to ask directadmin for a feature with domain pointers to not forward mail.
 
I've deleted the mx record for that domain via DirectAdmin. But I read in the help that it could take up to 24 hours for the change to take place... Tomorrow I'll see if it worked... Thanks
 
Instead of removing the MX record, point it to 127.0.0.1. Some MTAs search for an A record when the MX is missing, but by setting it to something bogus this won't happen.
With actual DA's DNS TTL settings the change will take up to 4 hours for RFC-aware ISPs and some more for bad ISPs.
 
Thanks tillo, but:

In DirectAdmin:

When I click 'domain pointers', source domain => 'manage dns', I cannot enter a value for the MX-record, there is a dropdown with values from 0 to 60.
 
That's not where you set the DNS records. If you can add records manually you should have a "DNS Management" link directly in the first panel of your domain.
 
Oh yes, you are right.
In fact you just have to write "localhost." in the left input box and choose 10 as priority. Differently than the other records, the MX record just has one input box and is for the record value (the name is always $zone).
 
Last edited:
This is what I've entered for the alias domain I don't want to receive emails from:

name type value
localhost MX 10

Hope it works, will check again tomorrow.

edit:
changed name to localhost. (with a dot)
 
Last edited:
Make sure you insert "localhost." with a dot and not "localhost".
Actually, Tillo, DirectAdmin by default adds localhost.example.com. so either with or without the trailing dot it should work.

Jeff
 
That's not what I meant. It's a bad habit to not paying attention whether a final dot is needed or not.
 
Back
Top