Multiple Domains on one IP

AudiAddict

Verified User
Joined
Oct 10, 2008
Messages
85
I've just purchased Directadmin and I've installed it on a clean Debian Server.

Everything seems to be working except the e-mail functionality.

I have 7 domains (let's say domain1.com, domain2.com etc)

They are all registered with my provider (which is different then my server hoster).

The provider allows me to set the DNS settings for the domain names. All the records (including the mail/www/ns) point to the direct admin ip.

The server hoster set the reverse DNS as domain1.com (my company domain).

Now comes the part which doesn't work and I don't understand.

When sending an e-mail with domain2, it uses the reverse dns of domain1. Some providers will not allow this and see these e-mails as spam.

Does this mean I need to use a different external ip for each domain (and add a different reverse dns for each?).

And last but not least, which Nameservers do I need to set for domain2, domain3 etc?

I've attached some screenshots as an example.

The first screenshot is the DNS panel of my provider. I've set the hostname as webserver.domain1.com (jasperbosch.nl)
 

Attachments

  • directadmin.jpg
    directadmin.jpg
    33.6 KB · Views: 455
  • directadmin1.jpg
    directadmin1.jpg
    42.7 KB · Views: 447
  • directadmin2.jpg
    directadmin2.jpg
    33.4 KB · Views: 296
  • directadmin3.jpg
    directadmin3.jpg
    34 KB · Views: 476
When sending an e-mail with domain2, it uses the reverse dns of domain1.
The mail server will send all email with the main IP#. The reverse DNS is coming from the receiving server.
Some providers will not allow this and see these e-mails as spam.
If they do their not RFC-compliant; the only requirement is that reverse DNS works.

Be that as it may, your interest is in getting email accepted. For that to occur the best way to set up reverse DNS is to point to the server hostname. I've never found an email server that won't accept that.
Does this mean I need to use a different external ip for each domain (and add a different reverse dns for each?).
You could, but you need to do custom modifications to the /etc/exim.conf file (and to any future updates) so exim will use the correct IP# to send the email.
And last but not least, which Nameservers do I need to set for domain2, domain3 etc?
I don't understand the question. Perhaps someone else will post.

Jeff
 
It seems to be working now, I think.. maybe just late nameserver changes..

Will have to wait and see what happends.

I still don't understand where I set the dns settings though, should this be done at the panel at my provider (which has all the domains)? Or should I do this in directadmin?

Two other questions, which I think would be stupid to post elsewhere.

- Most of my domains use [email protected], when creating a user I can't call them all info (to get the same mail). If I add these users by first name or something they will get automaticaly [email protected] as there e-mail.

Now I have to create another e-mail account for each domain for [email protected]. This looks like of messy, since each domain/client now has two standard e-mails? Is there not another way of doing it?

- Directadmin does not have antispam enabled after the initial install, do I need to install this myself? I have no linux knowledge at all.. is this hard to do?
 
I still don't understand where I set the dns settings though, should this be done at the panel at my provider (which has all the domains)? Or should I do this in directadmin?
If you point the domains to your provider's nameservers, then that's where you should make the settings. If you poing the domains to your nameservers, then you should point the domains there.

DirectAdmin does an admirable job of automatically managing DNS; we use them has hidden masters and use two stand-alone nameservers for public resolution. We keep them updated with Master2Slave DNS Replicator.
Most of my domains use [email protected], when creating a user I can't call them all info (to get the same mail). If I add these users by first name or something they will get automaticaly [email protected] as there e-mail.

Now I have to create another e-mail account for each domain for [email protected]. This looks like of messy, since each domain/client now has two standard e-mails? Is there not another way of doing it?
We don't use the site username for email at all; we always create a separate email and forward the username email to that. In your case I'd create the user with any username, then set up an admin@ address for each domain, and set up forwarding for the username@ to admin@ for each domain.
Directadmin does not have antispam enabled after the initial install, do I need to install this myself? I have no linux knowledge at all.. is this hard to do?
We use both SpamAssassin and SpamBlocker. (Disclaimer: we wrote SpamBlocker for DirectAdmin.)

SpamAssassin installation instructions are found here.

SpamBlocker installation:

1) While SpamBlocker has very few false positives, it have them occasionally. Therefore you should create a page on your site where users can visit to get themselves unblocked. For inspiration, see mine, here. You can copy most of it but be sure to use your own contact information. Do NOT use those two spinning images at the top. I have permission to use them but I don't have permission to give you permission to use them.

You may use either a form or email address for getting the unblock information from users. We use an email address; it makes it easier for us to unblock based on mailservers rather than on return addresses or domains.

2) Make some changes to your /etc/exim.conf file:

First search for http://example.com; be sure to make changes so when your users are inadvertently blocked and get a message from your server they'll know to go to your site to get unblocked.

Then if you've used an email address for receiving notice, you need to make sure the incoming address is whitelisted. Look for the address [email protected] and replace it in the proper places with your email address to be whitelisted.

After you modify your exim.conf file be sure to restart exim.

3) If you want to use SpamBlocker for all domains on your server, adding them and deleting them automatically, remove the file /etc/virtual/use_rbl_domains and replace it with a link to /etc/virtual/domains. If you want to use SpamBlocker for only some domains, then simply copy the domain names from /etc/virtual/domains into /etc/virtual/use_rbl_domains[/], one to a line. It's not necessary to restart exim when changes are made to these files.

4) When and if you get any unblock requests you may use any of these files, all in /etc/virtual:

whitelist_domains (We do NOT recommend using this file at all. If you do use it, do NOT put any common domain names in here; for example, do NOT use this for gmail.com or hotmail.com or yahoo.com. Why? Because then anyone using these domains as a from address will be able to relay spam through your server. Future versions of SpamBlocker will NOT have this file, but until then you can use it for relatively unknown domains, as long as you watch your server to make sure no one is relaying spam through it.)

whitelist_senders (You can generally put whole email addresses here, in the format [email protected]. But note that anyone using any of these addresses can relay through your server.)

whitelist_hosts (This is the safest place to whitelist. Use either complete hostnames or IP#s of mailservers you wish to whitelist. IP#s should be placed before hostnames.)

You also have several local blocklists you can use yourself, also in /etc/virtual:

bad_sender_hosts (Only hostnames or IP#s, with IP#s first. Servers using this hostname or IP# will NOT be able to send email to anyone on your server).

blacklist_domains (Domains in this file will NOT be able to send mail to anyone on your server.)

blacklist_senders (users with email addresses in this file will NOT be able to send mail to anyone on your server.)

It is NOT necessary to restart exim when adding or removing from these files.

Jeff
 
Back
Top