Minimal mail setup?

palantir

Verified User
Joined
Nov 13, 2008
Messages
18
Location
Trento, Italy
Hello,

There are two services I'd like to run externally: DNS and email. I have already found an article in the wiki for the DNS part.

Now I'd like to ask if there is a way to get rid of all the email stuff from DA, and have a minimal setup with the only requirement that the sendmail command will deliver mails correctly. I don't want to keep any mailbox on my server, no webmail, etc... Is this possible?

Palantir
 
You have to edit the templates to get rid of the email links. They are in /usr/local/directadmin/data/skins
 
I did it modifying the MX and TXT (SPF) record and removing the domain from /etc/virtual/domains.
I guess that's all you need to do. /etc/virtual/domainowners will probably help exim set the correct domain for any outgoing Email.

This won't of course remove all the Email options in the DirectAdmin interface for that domain, and won't probably even prevent the user from accessing his (empty) mailbox via IMAP/POP3 (through webmail or not).

It's just a fast hack to make exim deliver the Email externally instead of internally when sending an Email to that domain.
Just be sure to use the same DNS config on your DA server as on the external DNS server, otherwise exim will go on a loop and freeze/discard the Email.
 
Thanks for the quick answers :) I'll be trying this out.

It's not important to me to hide the email options from the users' control panels, as I am planning to use them internally. I have seen that if I set the package to have 0 mailboxes, all the options will be removed anyway, only the header will stay.
 
I did it modifying the MX and TXT (SPF) record and removing the domain from /etc/virtual/domains.
Which you can do from the user control panel; see MX Records. To see MX Records you must have DNS control turned on for the reseller and for the domain.
I guess that's all you need to do. /etc/virtual/domainowners will probably help exim set the correct domain for any outgoing Email.
The domainowners file is used only in local delivery, SpamAssassin and the like. Our exim.conf file always sends email as the servername, which is as it should be.
This won't of course remove all the Email options in the DirectAdmin interface for that domain, and won't probably even prevent the user from accessing his (empty) mailbox via IMAP/POP3 (through webmail or not).
Correct.
It's just a fast hack to make exim deliver the Email externally instead of internally when sending an Email to that domain.
If all you want to is use an external mailserver you can get away with just the changes in MX Records, and you can even turn DNS control back off after you've made the change.
Just be sure to use the same DNS config on your DA server as on the external DNS server, otherwise exim will go on a loop and freeze/discard the Email.
You shouldn't use your local nameserver as a cacheing nameserver; it shouldn't be listed in your /etc/resolv.conf file. So if you're using an extrenal DNS solution it shouldn't matter as long as your local server isn't listed at your registrar as an authoritative server.

Jeff
 
If all you want to is use an external mailserver you can get away with just the changes in MX Records, and you can even turn DNS control back off after you've made the change.
Correct me if I'm wrong, but this won't be enough.
If any PHP or cron script tries to send an Email to that domain, the Email will get lost (delivered locally). The /etc/virtual/domains file must be modified manually, it's not an option and there is no way to do that from DA.
You shouldn't use your local nameserver as a cacheing nameserver; it shouldn't be listed in your /etc/resolv.conf file. So if you're using an extrenal DNS solution it shouldn't matter as long as your local server isn't listed at your registrar as an authoritative server.
Jeff
Usually someone would need an external mailserver just for one domain, not all of them.

But you are right, you shouldn't manually copy the zone as it can get confusing: It's way better to modify the BIND configuration and make the zone secondary, then permit AXFR from the primary DNS. This way the zone will be transfered automatically to the DA server.
 
The /etc/virtual/domains file must be modified manually, it's not an option and there is no way to do that from DA.

In the MX records section there is a check box for "Local Mail Server." Unchecking the box and saving deletes the domain from /etc/virtual/domains.
 
We are all wrong at some point. I once thought I made a mistake but I was wrong. :D
 
Oh and there is a little thing about separate DNS that I think I should clarify.

Why did I say to set manually the DNS, or later to set up a secondary DNS, instead of simply removing the zone?
Well, the reason is that any user/admin backup will fail with this error: "Unable to get data from file: /etc/bind/<domain>.db".
By the way all the user data is saved correctly, but it's a little annoying because I've to check the entire backup message every time since the subject is always "An error occurred during the backup.".

Maybe you will correct me on this too :) I hope so.
 
Why did I say to set manually the DNS, or later to set up a secondary DNS, instead of simply removing the zone?

I didn't realize you did. Reading back through this thread several times I still don't understand.

I realize why you would not want to remove the zone file. I don't think anybody suggested that.

And when you say manually do you mean through DA or command line? I consider command line to be manual and DA to be automatic.
 
I didn't realize you did. Reading back through this thread several times I still don't understand.
I said:
"Just be sure to use the same DNS config on your DA server as on the external DNS server", then I corrected myself:
"you shouldn't manually copy the zone as it can get confusing: It's way better to modify the BIND configuration and make the zone secondary".
I realize why you would not want to remove the zone file. I don't think anybody suggested that.
That's right, I'll rephrase my question: do you know if DA (or sysbk) can be set to ignore the backup of a zone if the domain is there but the zone is not?
And when you say manually do you mean through DA or command line? I consider command line to be manual and DA to be automatic.
By "set manually the DNS" I meant "copy, using DA's interface, the DNS zone from the external DNS server to yours".

I've been a little confusing here... sorry :o
 
do you know if DA (or sysbk) can be set to ignore the backup of a zone if the domain is there but the zone is not?

I don't know the answer to that question but why not have the zone there? I don't see any harm in having the zone present. If the domain is not pointed to your server from the root nameservers AND you are not using your server for dns lookups then it will not matter if the zone file is present or not.

I could be totally misunderstanding the question and if I am maybe its better if somebody else took over for me.
 
My servers always use themselves for any DNS lookup, as I'm a fan of anternative DNS root servers (currently using ORSN) and sadly no ISP offer that service.
 
Take the domain out of /etc/named.conf and the zone won't get loaded but it will be there for the backup.
 
I guess `touch /etc/bind/<domain>.db' will do too, thanks. Just hoped there was some switch, like you told there is for the Email domain ;)
 
But you are right, you shouldn't manually copy the zone as it can get confusing: It's way better to modify the BIND configuration and make the zone secondary, then permit AXFR from the primary DNS. This way the zone will be transfered automatically to the DA server.
One of us is confused. If you're not using the local DirectAdmin nameserver as an authoritative server you should probably turn it off and let your local server use either OpenDNS or your upstream's nameservers. That's what I meant, even if I wasn't clear enough.

Jeff
 
Back
Top