Author Topic: [SOLVED]Configuring the mail system to send using a domain not managed by server  (Read 2455 times)

fatbob

  • Zen Warrior
  • ***
  • Posts: 102
  • Karma: +1/-0
    • View Profile
[SOLVED]
Hi there


I have the following scenario:

My zentyal box (v3.01) is on a dynamic ip address and I don't have any intention to use it as my primary public mail server.

I have an external mail provider that recieves and sends mail for mydomain.com. Each user has a mail account on this provider

I want to replicate the setup I had on my previous suse box that works as follows:

Mail is downloaded from my mail provider to each users local mail box - this would be done using the "Mail retrieval from external accounts" option under the users configuration.

I would like the user setup so that when they reply to an email in Zarafa it is sent from there mydomain.com address.

I would like all mails to be relayed via my external mail providers smtp.

I should point out that the user names for the local user and the remote mailbox is the same. Ie a local user with a user name of "bob" would have a remote email address of "bob@mydomain.com"

It doesn't matter if a user sends a mail to another user using Zarafa and that mail is only sent internally. Ie if bob@mydomain.com emails alice@mydomain.com and the email goes to alices internal mail box but not to her external one, this is fine. However any mail bob sends externally must appear to come from bob@mydomain.com and must be relayed through the mail providers smtp. The users do not have any other email address they will send from.

I've seen lots of mails on here that seem similar but I'm not sure about it.

Cheers
fb
« Last Edit: February 10, 2013, 08:11:59 pm by fatbob »

christian

  • Guest
This doesn't work. Your mail can't be both "local" and "remote".
You can achieve something quite close but not 100% of what you describe. Furthermore, I can't comment on the Zarafa side.

Idea would be t define fake local mail domain.
- Rely on account management to implement mail retrieval.
- define real mail addresses as alternate mail addresses for accounts
- use these addresses in your mail client setup (this is where I don't know what Zarafa can provide)

It doesn't matter if a user sends a mail to another user using Zarafa and that mail is only sent internally.

This will not work: mail sent to your domain, would it be for internal user, will be send to external MX.


fatbob

  • Zen Warrior
  • ***
  • Posts: 102
  • Karma: +1/-0
    • View Profile
This worked perfectly using the configuration supplied by christian

To summarise the problem. My real email is delivered to a mail provider that handles mail for my domain (mydomain.com). Each user has a pop3 account at the mail provider. I want local users to receive email from this domain on the server and be able to send from the server web mail / zarafa client.

1) Created a virtual mail domain "mydomain.com" on the server and set as the default email domain for users.
2) Created a new email address for each user that matched there public mydomain.com email address.
3) Set the smart host for the mail server to be the smtp gateway for my mail provider. This is important. It means that emails in mydomain.com come from the correct source and prevents mails being rejected as spoof email addresses by recipients.
4) Configured the external mail retrieval for each user to pull mail from there pop3 account on the mail providers server on to my own server.

This set-up means that i have the security of a mail provider and all the advantages of a locally managed mail server (no limints on mail storage, access to the archive of mail and the ability to switch mail provicders easily or even manage it my self if I want to).

Fantasic

Thanks again to Christian