Koozali.org: home of the SME Server

Migrating to an external mail host

Offline dmajwool

  • *****
  • 180
  • +0/-0
Migrating to an external mail host
« on: December 24, 2007, 01:02:02 AM »
Hi, some pointers, please.

SME has been doing a fine job for a long time now as my LAN email Server/Gateway for mydomain.com but recently my broadband connection went offline for a few days which was a problem for users on the LAN and also the email users in the branch office.

So, I'm evaluating using google Apps to host email for mydomain.com

In Server-manager_ Hostnames I've set mail.mydomain.com to the google remote IP and everything is working fine apart from the following issue.

When adam@mydomain.com uses his workstation mail client inside the LAN to send mail to brian@mydomain.com, the mail only gets as far as brian's inbox on the SME server.  It doesn't leave the LAN.  Brian's mail client is now polling the google external pop3 server, so Brian doesn't receive the mail at his client.

How can Brian retain an account on SME, but not have internal mail intercepted before it gets to the external host?

At the desktop mail client, the smtp server is set to smtp.googlemail.com and in In Server-manager_ Email settings, the Address of Internet Provider's mail server is smtp.googlemail.com

Many thanks, and season's greetings

David.

Offline dmajwool

  • *****
  • 180
  • +0/-0
Re: Migrating to an external mail host
« Reply #1 on: December 24, 2007, 05:28:00 PM »
Sorted :-)

I think that my problem was not allowing long enough time for the MX record change in my DNS to be propagated back to the SME before testing.

All is working OK now and mail between LAN users of my domain is being routed via google. 

Thanks, David.

« Last Edit: December 24, 2007, 11:50:40 PM by dmajwool »

Offline dmajwool

  • *****
  • 180
  • +0/-0
Re: Migrating to an external mail host
« Reply #2 on: January 22, 2008, 03:20:40 PM »
I'm having a problem with forwarding admin emails from SME to an account on an external mail host.

My server is surprise2.mydomain.com and I want to forward admin mails to serverlogs@mydomain.com which is an account on an external host - gmail.

But this fails because SME interprets serverlogs@mydomain.com as an internal account.

I have server-manager SMTP proxy disabled and user-generated mail to and from mydomain.com is correctly routed via the external host.  The MX records are all in order for more than a month.

Here is the message I receive in Horde (again delivered internally when I expected it to be delivered to the external host) when I deliberately trigger a mail to admin by sending email to an account that does not exist on a second domain on my server. (The mail originates from outside my server's LAN.)

Code: [Select]
Hi. This is the qmail-send program at mydomain.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<admin@mydomain.com>:
This message is looping: it already has my Delivered-To line. (#5.4.6)

--- Below this line is a copy of the message.

Return-Path: <david@mydomain.com>
Received: (qmail 19634 invoked by alias); 22 Jan 2008 13:00:05 -0000
Delivered-To: serverlogs@surprise2.mydomain.com
Received: (qmail 19631 invoked by alias); 22 Jan 2008 13:00:05 -0000
Delivered-To: alias-localdelivery-serverlogs@mydomain.com
Received: (qmail 19628 invoked by uid 101); 22 Jan 2008 13:00:05 -0000
Delivered-To: admin@surprise2.mydomain.com
Received: (qmail 19624 invoked by alias); 22 Jan 2008 13:00:04 -0000
Delivered-To: alias-localdelivery-admin@mydomain.com
Received: (qmail 19621 invoked by alias); 22 Jan 2008 13:00:04 -0000
Delivered-To: name_does_not_exist@surprise2.mydomain.com
Received: (qmail 19618 invoked by alias); 22 Jan 2008 13:00:04 -0000
Delivered-To: alias-localdelivery-name_does_not_exist@secondDomainOnTheSameServer.co.uk
Received: (qmail 19615 invoked by uid 453); 22 Jan 2008 13:00:04 -0000
X-Virus-Checked: Checked by ClamAV on mydomain.com
X-Spam-Status: No, hits=1.1 required=5.0
        tests=RCVD_IN_SORBS_WEB
X-Spam-Check-By: mydomain.com
Received: from fg-out-1718.google.com (HELO fg-out-1718.google.com) (72.14.220.157)
    by mydomain.com (qpsmtpd/0.40) with ESMTP; Tue, 22 Jan 2008 12:59:56 +0000
Received: by fg-out-1718.google.com with SMTP id e12so1850394fga.4
        for <name_does_not_exist@secondDomainOnTheSameServer.co.uk>; Tue, 22 Jan 2008 04:59:54 -0800 (PST)
Received: by 10.82.161.19 with SMTP id j19mr14647211bue.25.1201006793607;
        Tue, 22 Jan 2008 04:59:53 -0800 (PST)
Return-Path: <david@mydomain.com>
Received: from pc-00089.mydomain.net ( [213.123.178.117])
        by mx.google.com with ESMTPS id f13sm6729522gvd.9.2008.01.22.04.59.49
        (version=SSLv3 cipher=OTHER);
        Tue, 22 Jan 2008 04:59:49 -0800 (PST)
Date: Tue, 22 Jan 2008 12:59:47 +0000
From: David <david@mydomain.com>
X-Mailer: The Bat! (v3.62.14) Professional
Reply-To: David <david@mydomain.com>
Organization: mydomain
X-Priority: 3 (Normal)
Message-ID: <291623764.20080122125947@mydomain.com>
To: name_does_not_exist@secondDomainOnTheSameServer.co.uk
Subject: This should route to admin
Comments: Inbox
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello name_does_not_exist,

Pointers to a solution welcomed, I'm not having much luck in the bug tracker  http://bugs.contribs.org/show_bug.cgi?id=3038

Many thanks, David.

Offline haymann

  • *
  • 212
  • +0/-0
Re: Migrating to an external mail host
« Reply #3 on: February 11, 2008, 03:46:11 PM »
Hi David,

I just started messing w/ Google Apps over the weekend, so I haven't played too much yet...

Is serverlogs a "special" account name for SME? Maybe if you tried a different name to forward it too...? I was going to add a nickname to my admin user on Google for something like SME.Admin and then go into SME and have SME forward admin emails to SME.Admin@mydomain.com. I am not quite ready to point my mx records to Google quite yet to know if I will like that arrangement, or if it will work now that I have read your post...

Ryan


Offline dmajwool

  • *****
  • 180
  • +0/-0
Re: Migrating to an external mail host
« Reply #4 on: February 11, 2008, 04:14:26 PM »
Hi Ryan.

"serverlogs@mydomain.com" is a regular account I created at the gmail host.

My conclusion to my difficulties is that it is not currently possible to program an SME gateway named server.mydomain.com to route internally generated admin mails addressed to admin/root@mydomain.com onto an external host.  The mails continue to be delivered to the localhost.

My workaround solution has been to to route those admin mails to a third party address outside of the localhost (eg name@isp.com) and then get name@isp.com to forward the mails to my original target (serverlogs@mydomain.com)

Our experience has been very good with the google mail hosting and would recommend it as a robust and easy-to-use option.

If you find the same difficulty with routing admin mails beyond the localhost, could you post back and maybe we could raise a NFR.

Cheers, David.