Email problems with new DirectAdmin install

Qwalk

New member
Joined
Jun 9, 2012
Messages
6
Hi there,

I'm having some e-mail problems. This is my scenario:

w1.mydomain.com is the hostname of my DirectAdmin server.

- w1.mydomain.com has an A record to my server
- mydomain.com has MX records to Google Apps
- w1.mydomain.com has an MX record to my server with preference 10


Okay, so @mydomain.com is hosted by Google Apps,
and @w1.mydomain.com is hosted by me.

I cannot send mails to my Google Apps hosted accounts from either of the domains.

Alright, I know it isn't a great idea to send mails from a domain on my DirectAdmin server where that domain is hosted by Google Apps. But the thing is, I have an exact same setup on a different server with different domain names. Where the main mail domain is hosted by Google Apps, and the reseller on the server has that domain as default domain. He can send welcome messages etc. to the Google Apps hosted domain with no problems.

The thing is that if I create a reseller with the [email protected] Google Apps hosted account, he doesn't even receive the welcome message. And that is sent from [email protected] on which I have MX records to my DirectAdmin server.

I have no SPF records.

When logging into my reseller default mail account ([email protected]) and tries to send an email to [email protected] (hosted by Google Apps) I get this:

PHP:
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  [email protected]
    

------ This is a copy of the message, including all the headers. ------

Return-path: <[email protected]>
Received: from localhost.localdomain ([127.0.0.1] helo=w1.mydomain.com)
        by w1.mydomain.com with esmtpa (Exim 4.76)
        (envelope-from <[email protected]>)
        id 1Sdcx1-0008LQ-DI
        for [email protected]; Sun, 10 Jun 2012 11:52:43 +0400
Received: from XX.XX.XX.XX
        (SquirrelMail authenticated user reseller)
        by w1.mydomain.com with HTTP;
        Sun, 10 Jun 2012 07:52:43 -0000
Message-ID: <[email protected]>
Date: Sun, 10 Jun 2012 07:52:43 -0000
Subject: test
From: [email protected]
To: [email protected]
User-Agent: SquirrelMail/1.4.22
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal

test


NOTE: I can send mails to other accounts like; gmail, live and so on, but they are marked and received as SPAM.
 
Note also that DirectAdmin doesn't support a server name the same as a domain name; it can be done, but you're pretty much on your own in getting it to work.

Jeff
 
Note also that DirectAdmin doesn't support a server name the same as a domain name; it can be done, but you're pretty much on your own in getting it to work.

Jeff

What do you mean by this?

I can't use this scenario:

- I own the domain: mydomain.com at a domain host
- I have these A records:
- mydomain.com > server IP
- w1.mydomain.com > server IP
- I have these MX records:
- mydomain.com > aspmx.l.google.com (and other Google Apps records)

- My DirectAdmin server hostname is w1.mydomain.com
- I have a reseller with the domain: mydomain.com


I can't send mails from any user/domain on my server including welcome message, to my Google Apps registered mails, but to other gmail, hotmail etc. I can (but they are getting received in SPAM).

Is this a problem? Do you advice me to change hostname on my DIrectAdmin server? To a whole other domain?

I want to use my own primary domain name like this:

- My Domain: Mail hosted by Google Apps (in case my server are down, clients should be able to conact me on mail)
- My Domain: Website hosted on my server
- My clients domains: website & mail hosted by my server.

What is the best setup here?
 
What do you mean by this?

I can't use this scenario:

- I own the domain: mydomain.com at a domain host
- I have these A records:
- mydomain.com > server IP
- w1.mydomain.com > server IP
- I have these MX records:
- mydomain.com > aspmx.l.google.com (and other Google Apps records)
Yes, this is fine; I must have misread your original post. However see the link zEitEr lists. If you want your email to work when your server is down, then you should be certain to have Slave DNS running somewhere else besides your network; you can share with someone, or use a commercial service such as the one I offer.

Jeff
 
Alright. I will now try to make things clear, to prevent misunderstandings. I have bought a new domain to use just for the DirectAdmin server.

Lets say the domain is: cp.com
I have my company domain: company.com

Both domains were bought at GratisDNS which is a Domain/DNS provider. So the domains nameservers are not my DA server, but GratisDNS official nameservers.

In the GratisDNS DNS control panel i have set it up like this:

cp.com:
- A record: s1.cp.com > DA server IP

company.com
- A record: *company.com > DA server IP
- MX records: Google Apps pointers

To all my clients domains, I use my DA server as a hidden primary/master allowing transfer and notify to GratisDNS' name servers. This works like a charm and I've been doing this in years. So this is not the problem.

The problem occurs when I add a reseller and assign the domain: company.com. When I've done this, I cannot send mails to *@company.com. I get undeliverable messages, and when I try to test it this occurs:

Code:
[root@s1 ~]# exim -bt [email protected]
[email protected] is undeliverable:

When I delete the reseller with the company.com domain, there is no problems sending mails to *@company.com:

Code:
[root@s1 ~]# exim -bt [email protected]
[email protected]
  router = lookuphost, transport = remote_smtp
  host aspmx.l.google.com      [173.194.70.27] MX=10
  host alt2.aspmx.l.google.com [74.125.127.26] MX=20
  host alt1.aspmx.l.google.com [173.194.71.26] MX=20
  host aspmx2.googlemail.com   [173.194.69.27] MX=30
  host aspmx3.googlemail.com   [74.125.127.27] MX=30

I wish to use web on my DA server with my company.com domain. But email on Google Apps. I don't wish to add the domain like my clients domains, and control DNS on my DA server, because if my DA server crashes, I wont be able to receive mails even if they are controlled my Google (since the DNS server is down on my DA ofc.).

What is a solution here? Do I really have to outsource all activity on company.com to another host?

Kind regards
 
Thank you very much. I think this helped. The exim test command showed the right results. I will test it out later. Thank you again.

Just weird since I had the exact same setup at another VPS provider with DA installed. I did not uncheck local mail server, but sending mails to the domain weren't a problem at all. I guess it might can be 2 different DA versions.
 
Thank you very much. I think this helped. The exim test command showed the right results. I will test it out later. Thank you again.

Just weird since I had the exact same setup at another VPS provider with DA installed. I did not uncheck local mail server, but sending mails to the domain weren't a problem at all. I guess it might can be 2 different DA versions.

I've been testing it out now, and it works perfect now. I also changed ~all to -all so messages aren't received in spam to gmail/hotmail accounts.

Thanks a lot for your help!
 
The link was posted 3 times, and it was mentioned by not only me... I'm glad you've finally made it to work.

I know, thank you for the link. But as I already said, I have another DirectAdmin server with the exact same setup as now, same domains and DNS records, although without the need to chose not to use the local mail server for a domain.
 
That's about impossible.

For server a to server b email ok, server a will ask ns where to ask for email. but from da server to same da server unless you do that check the da server will ask himself for email without checking outside mail server (also be sure to have set MX record correctly on da aswell so he will not try to use the one he got).

Regards
 
Back
Top