Koozali.org: home of the SME Server

Partial domain hosting for e-mail

Offline itguy

  • 3
  • +0/-0
Partial domain hosting for e-mail
« on: August 14, 2009, 05:25:25 AM »
I work for an international nonprofit organisation with offices all over the world. We have our email addresses of the form user@organisation.org but I'm wondering if there is any way we can set up SME server in our local office, so that an email sent to user1@organisation.org by user2@organisation.org does not exit the local network, unless user1 is not found on the local network.

Eg: user1, user2, user3 are local users connecting to SME Server and thus can send emails via the local SMTP server.
User4, user5, & user6 do not work in the local office, and retrieve their email directly from mail.organisation.org (hosted somewhere else in the world)

Can we set up SME server so that user1@organisation.org can send an email to user2@organisation.org and have it delivered locally (ie not relayed to mail.organisation.org) and still send an email to user5@organisation.org that is relayed to mail.organisation.org?

Any suggestions much appreciated.
Thanks
Tim

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Partial domain hosting for e-mail
« Reply #1 on: August 14, 2009, 07:39:44 PM »
My 2c

Configure ONE SME as primary mail server (mail.organisation.org) . Now you must configure DNS so  this machine is primary mail server (MX ) for ALL e-mail from this domain.
After that, configure SME to allow secure connections to SMTP and configure clients (Thunderbird is my favorite) to connect to SME (for local or otherwise, server is same= mail.organisation.org) and collect/send e-mails to.

You even could force use of SMTP , but AFAIK this just work for LAN.

All e-mail will be handled by your SME server (under your control!).


...

Offline engdev

  • *
  • 71
  • +0/-0
Re: Partial domain hosting for e-mail
« Reply #2 on: August 14, 2009, 10:20:51 PM »
My 2p

Yes. What you want to achieve is how we have our mail setup. I know it's not what SME is designed for but it works for us:
1) Our server is setup in server only mode.
2) All external smtp mail is sent via our ISP's server (we did this as we occasionally had e-mails rejected if they were sent straight from SME)
3) Our domain is hosted by Google Apps.
4) For the majority of users the mail stays on the local network, you set this up in their user account to deliver the mail locally and then read it with built in Horde webmail or via Outlook/TBird client. Any internet mail sent to them is downloaded from the Google server using the Fetchmail pop contrib.
5) Some users need mail access outside the office or have iPhones so want Imap sync etc. For these users, mail sent to them on the local network is forwarded to another google apps account (say user5@organisation2.org) but it could equally be a normal gmail account if you don't have another domain hosted by Google. I then setup the user5@organisation2.org account to forward all messages to the user5@organisation.org. That way the messages seamlessly arrive in the correct account and you are not aware that any relaying has taken place.

There may well be other ways to relay the mail, but this just happens to be the setup that works for us. Hope this helps, if you need any more info pls ask.
regards
John

Offline itguy

  • 3
  • +0/-0
Re: Partial domain hosting for e-mail
« Reply #3 on: August 17, 2009, 03:13:00 AM »
Thanks John & Jader,

Sorry, but I don't think I've made myself clear as neither of your suggestions are possible in our environment. Let me try again.

mail.organisation.org is hosted internationally for all our offices worldwide. There are literally over 1200 users worldwide who connect to this server to get their email from different offices, so we can't setup alternative email addresses to have their emails forwarded to them where they are, and neither would we want to have to maintain a copy of the list of all those users anyway.

Within our one office here in Manila, we have an SME server running as our gateway server to our DSL connection which is also shared on a separate subnet via wireless for visitors to the office to use.

At the moment, we all have email addresses user1@organistion.org etc and currently connect to mail.organisation.org via the internet to send and receive emails. This means that even if user1 wants to send an email to user2 who also works in the Manila office, the email literally goes to the other side of the world and back to go from one outbox to another inbox.

I'm wondering if there is any way to shortcut this so that our SME server here in our office receives all emails sent from users in the Manila office, sees that it is for another local user and so delivers it to the local user's inbox on the local SME server (without ever going out the gateway to the internet). If the email is not for a local user, ie one of the other 1200+ users around the world, the email is simply relayed to mail.organisation.org.

Yes, this would mean checking two inboxes for incoming mail - both the local inbox and the existing inbox at mail.organisation.org for emails sent to us from other users.

We don't have access to change anything at mail.organisation.org to point to our SME server for our local users, and I'm not sure this would help anyway, since the outgoing emails need to be routed at our local SME server anyway.

It's just a matter of redirecting most outgoing emails to our main, external mail server but keeping some on the local server. Having a programming background, I know it should be possible, it's just a matter of how and where the configuration for this sort of things is exposed.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Partial domain hosting for e-mail
« Reply #4 on: August 17, 2009, 08:24:39 AM »
itguy

Kumusta

I think the simplest solution would be to setup another virtual domain on your sme server, eg organisation2.com, that does not have external DNS records configured for it, so therefore it is a domain that is only valid on the local network.

Add the users to sme who are local, and then send to user1@organisation2.com, user2@organisation2.com etc

I know it means that local users will need to select a different email address to send to other local users, but they will learn.

Configure local users email clients to also collect POP or read IMAP mail from the local sme servers mail server.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline itguy

  • 3
  • +0/-0
Re: Partial domain hosting for e-mail
« Reply #5 on: August 17, 2009, 10:15:33 AM »
Thanks Mary,

That may well be the simplest solution - one that we can implement straight away, and yes, they should get used to the idea.

However, there are at least two downsides I can see with this solution, and hence my desire for a better solution,
  • When sending an email to many users (mixed local and external users), my from address will need to be the @organisation.org so that external users can reply to me, but any local user who replies will then not be replying by default to my local address (@internal.domain).
  • Also when sending to mixed recipients (both local and external), any local addresses that I send to will be visible, but unreachable to other users if they "reply-to-all".

I'll keep waiting to see if anyone else can help...
Salamat po
Tim

Offline engdev

  • *
  • 71
  • +0/-0
Re: Partial domain hosting for e-mail
« Reply #6 on: August 17, 2009, 11:37:30 AM »
Sorry but I can't see a way to configure the base SME setup to achieve what you want as I don't believe there is an option to relay e-mails for non local users to a different domain. This is why we had to setup a 2nd domain for e-mail relaying to our out of office users.

best of luck
John

Offline mazkot

  • ***
  • 59
  • +0/-0
Re: Partial domain hosting for e-mail
« Reply #7 on: August 24, 2009, 08:28:08 AM »
Thanks Mary,

That may well be the simplest solution - one that we can implement straight away, and yes, they should get used to the idea.

However, there are at least two downsides I can see with this solution, and hence my desire for a better solution,
  • When sending an email to many users (mixed local and external users), my from address will need to be the @organisation.org so that external users can reply to me, but any local user who replies will then not be replying by default to my local address (@internal.domain).
  • Also when sending to mixed recipients (both local and external), any local addresses that I send to will be visible, but unreachable to other users if they "reply-to-all".

I'll keep waiting to see if anyone else can help...
Salamat po
Tim

i. A simple solution for this is setting it in their profile as default reply address is their external address.

ii as for this have no idea.