Author Topic: Multi relayhost MTA  (Read 3991 times)

mappy

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Multi relayhost MTA
« on: November 08, 2012, 10:20:38 am »
Hi, I need to install a zentyal mail server with firewall and mail server, I need to fetch 2 external mail with different domain and use separated smtp host for each one. At the moment I can receive mail with imap protocol for each external mail but how can I set different relay host?

es:

user 1:
external mail 1 <external@ext.net> imap: imap.ext.net   smtp:  smtp.ext.net
external mail 2 <external@ext.org> imap: imap.ext.org   smtp:  smtp.ext.org

thank you

christian

  • Guest
Re: Multi relayhost MTA
« Reply #1 on: November 08, 2012, 10:56:16 am »
what is the exact purpose of different relay hosts?

mappy

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Multi relayhost MTA
« Reply #2 on: November 08, 2012, 01:11:14 pm »
each one of mail address need to use his proper external smtp host, due to not solvebale problem with our mailserver provider.
We want user work with zentyal webmail service and not with client pc software, this is mandatory for our purpose.
thanks

christian

  • Guest
Re: Multi relayhost MTA
« Reply #3 on: November 08, 2012, 01:17:35 pm »
each one of mail address need to use his proper external smtp host, due to not solvebale problem with our mailserver provider.
We want user work with zentyal webmail service and not with client pc software, this is mandatory for our purpose.
thanks

Sure but using either webmail or mail client, assuming mail server is Zentyal, it has no impact on the relay host which is mainly supposed to be used when your provider doesn't permit outgoing mail flow from your IP to any other MTA that the ones from your provider.

Once mail is sent, whatever its destination, provider's MTA will relay it.

For what I understand, your problem may exist if you have 2 gateways with similar constraint in term of outgoing mail and want to use load balancing or failover. Otherwise, I don't really understand and would appreciate if you could elaborate.

mappy

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Multi relayhost MTA
« Reply #4 on: November 08, 2012, 07:03:04 pm »
Due to my english writing I'm not explayining well  :-[
I'll try again:
we need to install a zentyal mail server in our school administration office, at the moment they have two email readed by one user in her PC with thundirbird (other office had other e-mail address but don't need any changes), due to a lot of daily mail received and usage of an old hardware PC (and wrong OS  :-X) he have many daily crashes or freeze. Any mail have different domain and we need to use the proper smtp relay host beacuse for each one many times need to send messages to the same domain:

from: ourmail@host1.net - to: othermail@host1.net


No one of them is our ISP, the first is a governative domain and the second is our website domain.
if I set the smarthost in zentyal configuration every address use the same relay that works until he send message to the same domain, otherwise the email to "host1.net" from "host1.net" but from an IP (our IP) different from his proper was rejected. So if I set the correct smarthost for the first email that work correctly but do not work the second e-mail, the same if I set the second email host as zentyal smarthost work only the second mail. I think we need to change some postfix configuration file, that's correct? And if it is what I need to change?

I hope this time my messages is more readble  :)
Thank you
« Last Edit: November 08, 2012, 07:07:48 pm by mappy »

christian

  • Guest
Re: Multi relayhost MTA
« Reply #5 on: November 08, 2012, 07:21:15 pm »
Sorry, this is even more confused for me but I'm not native English speaker too. This is perhaps the reason why I don't understand. I hope someone else will jump in and give us his understanding.  BTW, what is your native language?

Anyway, when you write othermail@host.net you make a mistake  :-[
Mail address is always(1) mail@domain or mail@fdqn (fqdn being host.domain)
Therefore my previous answer about MX for given domain.

As you try to hide everything behind some abstraction so that domains and hosts can not be identified but as you misunderstand (I think) some concepts, I'm afraid your explanation is not 100% accurate.

(1) in some cases, in case of local mail only, mail delivery may work using host only.

ichat

  • Zen Hero
  • *****
  • Posts: 795
  • Karma: +28/-16
  • RTFM!
    • View Profile
Re: Multi relayhost MTA
« Reply #6 on: November 08, 2012, 08:10:24 pm »
what i am assuming here.. please correct me if im wrong..   is that  the user is using  3rd party mail  providers...

for example   gmail,  hotmail   (or thair  buisyness / or governmental equivilents...   meaning that  the mail adresses  ar not:  me@my-zentyal.network.net       

but instead:    my-organisation@my-country.gov 


if that is the case,   than indead you need to use thair provided smtp to not get blacklisted ..   (if thair mail settup requires it ...)...  my advice would be to install a webmail platform that supports these features...
and i expect  that tools like zarafa, or  e-groupware  are perfectly able to support this...   

targetting the opposit of sieve can be troublesome (meaning sending instead of recieving from remote mail servers out of your control), 
All tips hints and advices are based on my personal experience.
As I try my best to be as accurate as possible, following my advice is always at your own risk,
I claim absolutely NO responsibility in any way!

mappy

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Multi relayhost MTA
« Reply #7 on: November 08, 2012, 08:11:55 pm »
I'm italian, and your native language?

Now I'll use real domain (not real email adress, just for secutiry reason, I'll take from my fantasy) so I hope it's more easy to understand.

the email are:
1. school@istruzione.it    governative domain
2. office@scuola.it         this is our web-site and mail domain (not the real one this is take from my fantasy)

we have installed zentyal in a microserver with firewall and mail server (this is the fourth zentyal I installed in a school but the first with mail server), created virtual domain (istruzione.it - scuola.it), created one user, from the user panel we set parameter to retrieve mail from external pop3 for school@istruzione.it and office@scuola.it. Everything goes well, but wen we try to write to teacher@istruzione.it from school@istruzione.it our mail was rejected because the external server refuse to receive mail from itself send by an external (for him) IP. The same for the other mail domain. So I set in zentyal the smarthost to use the istruzione.it smtp server and now domain istruzione.it work fine but not the other, setting scuola.it as smarthost the email for this domain work well but not email with istruzione.it as domain. So how can I set multi relay host to use with different email sender?
If I use a client like thundirbird I can set more email address to retrieve and send each one of them and for each one I can set different smtp and pop3/imap server. What we want is to retrieve all email in our server and work on it using zentyal webmail service, we don't want any client.
Thanks again

mappy

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Multi relayhost MTA
« Reply #8 on: November 08, 2012, 08:14:49 pm »
I read now ichat,
yes that is what I try to explane  ;D

we use zentyal 2.2 so we need zarafa?

thanks

christian

  • Guest
Re: Multi relayhost MTA
« Reply #9 on: November 09, 2012, 12:50:52 am »
@mappy
I'm French, so perhaps my French is not to far from your Italian.
In case it's not, be aware that I've a lot of Italian friends of mine, bikers, who can translate if needed, even in the IT world   ;)

I think I now understand better what you mean. Well, either you learn what we try to explain in this forum or, if you're prone to buy services from some either Zentyal or other professional services.
I'll come back to you tomorrow morning   ;)

mappy

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Multi relayhost MTA
« Reply #10 on: November 09, 2012, 10:00:13 am »
@christian
peraphs is better if we try again in english so someone else can come in our help, and we can use our native language just in case of misunderstanding.

Following suggestion of ichat we have installed zarafa but we can't find hoe to set different smtp relay host.

Thanks to all

christian

  • Guest
Re: Multi relayhost MTA
« Reply #11 on: November 09, 2012, 10:20:14 am »
Reading all this stuff again and again, there is something missing in your explanation or in my understanding: what is the mail domain you have defined in Zentyal?

christian

  • Guest
Re: Multi relayhost MTA
« Reply #12 on: November 09, 2012, 10:46:48 am »
Hoops, have you defined these 2 external domains in Zentyal and hope to have mails delivered in 2 different mailboxes for same user or account?

mappy

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Multi relayhost MTA
« Reply #13 on: November 09, 2012, 11:54:03 am »
The same local user must use two different e-mail with different domain, we need to retrieve all incoming mail in our zentyal server and to use some webmail features to read and send mail for both two external mail, so we need to use external smtp to avoid blacklist problem.

Our zentyal configuration: (all domain is by my fantasy, only for examplr purpose)

zentyal domain: our-school.loc

mail virtual domain:
istruzione.loc
scuola.loc

external mail:
school@istruzione.it
office@scuola.it

I hope this is what you ask  :)

christian

  • Guest
Re: Multi relayhost MTA
« Reply #14 on: November 09, 2012, 12:50:06 pm »
How do you expect to have one single account in Zentyal with 3 different mailboxes ( @your-school, @istruzione, @scuola)
For one given account, there is only one single mailbox.

This said, you can retrieve mail delivered to external mail boxes and store it locally in this mailbox.
You can also have mail client defined with multiple mail accounts and send mail with different "sender" mail address. Still at this stage there is not link any relay host stuff.

for instance, look at what I've here:
- Zentyal mail server with local mailbox
- 2 external mailboxes for 2 different mail addresses

when I retrieve mails from these boxes, I store it in my local (Zentyal mailbox).
What you may have noticed is that I do NOT define, in Zentyal, mail domain for may external addresses (this doesn't make sense) but my mail client is configured with 3 accounts (one for each mail address) so that I can send mail "as".
I don't use any relay host. Zentyal is my local MTA.

Does it clarify a bit ?