Re: [SOGo] Choose login domain based on DNS domain used to access the server.

2015-07-28 Thread Nils Fredrik Gjerull

Den 27. juli 2015 17:17, skrev Steve Ankeny:

Does the other suggestion work?

https://lists.inverse.ca/sogo/arc/users/2015-07/msg00247.html

What you want to do is possible (auto select from a set of Sogo login 
domains, on a multi tenant multi DNS domain Sogo webmail server, based 
on http host header). The .WOX template file is a template based on 
Objective-C and with Objective-C you should be able to do anything, 
such as, in this case, get the http headers from the http request. 
Look for the http header called Host. Verify that it's a valid dns 
domain that you're hosting the Sogo webmail for, and then set the 
login domain to that Host value. `


Have a look here:
http://sope.opengroupware.org/en/docs/snippets/wox.html
I have never used Objective-C, .WO nor .WOX templates, and I have no 
idea what variables are available in the template context. Searching the 
sogo templates I found `page.context.uri` used one place. The 
documentation looks pretty sparse, but I will give it a try :).


Regards

--
Nils Fredrik Gjerull
-
Ministry of Eternal Affairs
Computer Department
( Not an official title :) )

--
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] Choose login domain based on DNS domain used to access the server.

2015-07-27 Thread Chris Coleman
What you want to do is possible (auto select from a set of Sogo login 
domains, on a multi tenant multi DNS domain Sogo webmail server, based 
on http host header).  The .WOX template file is a template based on 
Objective-C and with Objective-C you should be able to do anything, such 
as, in this case, get the http headers from the http request.  Look for 
the http header called Host. Verify that it's a valid dns domain that 
you're hosting the Sogo webmail for, and then set the login domain to 
that Host value.


Have a look here:
http://sope.opengroupware.org/en/docs/snippets/wox.html



On 7/27/2015 7:26 AM, Steve Ankeny wrote:

On 07/27/2015 05:42 AM, Nils Fredrik Gjerull wrote:

Hi,

Any thoughts please. Would appreciate at least an acknowledgement 
that the e-mail was read, so I know I am not sending e-mails into the 
void :)


I also had a proposal/question about using a http header to set the 
login domain. I guess that it is not supported so I should create a 
proposal for it?



Den 22. juli 2015 15:32, skrev Nils Fredrik Gjerull:

Hi,

I have a use case were I want to make the SOGo webmail client 
accessible through different DNS domains, and based on which DNS 
domain is used a login domain is automatically chosen. I want to use 
SOGo as a multi-tenant system without users having to choose a login 
domain.


Let say that SOGo is available on mail.domain1.com and 
mail.domain2.com, and in SOGo I have domain1 and domain2 as separate 
login domains. If a user access the SOGo webmail client through 
mail.domain1.com, domain1 will be used as the login domain. That way 
the user do not have to select the domain or append it to the username.


I am primarily thinking about the SOGo webmail client and not 
CardDAV and CalDAV, but I would not mind if it were possible to do 
it for them as well. I understand that there is some kind of 
template overriding system for the .wox templates. Would I be able 
to get the current URL/domain and be able to set a login domain 
within such a template?


I appreciate any suggestions.

Regards



It sounds to me like you're mixing technologies --

domain login (whether Windows or Samba AD) and SOGo webmail

Perhaps no one has responded simply because they are unsure what 
you're trying to do.


IF you already have SOGo webmail available via two domains, are you 
running two instances of SOGo and two instances of your mail server 
(Dovecot/Postfix, etc.) or have you configured one instance to work 
for both?


And, IF you have two domain logins are you running two AD servers?

Does domain login come before webmail login, etc?  I may be totally 
off-base (sorry)





--
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] Choose login domain based on DNS domain used to access the server.

2015-07-27 Thread Tanstaafl
On 7/27/2015 7:26 AM, Steve Ankeny stev...@cinergymetro.net wrote:
 It sounds to me like you're mixing technologies --
 
 domain login (whether Windows or Samba AD) and SOGo webmail
 
 Perhaps no one has responded simply because they are unsure what you're 
 trying to do.
 
 IF you already have SOGo webmail available via two domains, are you 
 running two instances of SOGo and two instances of your mail server 
 (Dovecot/Postfix, etc.) or have you configured one instance to work for 
 both?
 
 And, IF you have two domain logins are you running two AD servers?
 
 Does domain login come before webmail login, etc?  I may be totally 
 off-base (sorry)

It sounds to me like he is running a single SOGo instance hosting
multiple email domains, and has unique URLs (ie, his reference to 'DNS')
for each email domain, and wants SOGo to be able to append a fqdn to the
end of the username based on the URL of the login page?

If I understand this correctly, I'd love to see this ability as well.

So, depending on if a user goes to:

https://sogo.example1.com/SOGo/so/
or
https://sogo.example2.com/SOGo/so/

and entered a username of user1

SOGo would pass us...@example1.com or us...@example2.com as the
login username to whatever the backend auth mechanism is using.
-- 
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] Choose login domain based on DNS domain used to access the server.

2015-07-27 Thread Steve Ankeny

On 07/27/2015 05:42 AM, Nils Fredrik Gjerull wrote:

Hi,

Any thoughts please. Would appreciate at least an acknowledgement that 
the e-mail was read, so I know I am not sending e-mails into the void :)


I also had a proposal/question about using a http header to set the 
login domain. I guess that it is not supported so I should create a 
proposal for it?



Den 22. juli 2015 15:32, skrev Nils Fredrik Gjerull:

Hi,

I have a use case were I want to make the SOGo webmail client 
accessible through different DNS domains, and based on which DNS 
domain is used a login domain is automatically chosen. I want to use 
SOGo as a multi-tenant system without users having to choose a login 
domain.


Let say that SOGo is available on mail.domain1.com and 
mail.domain2.com, and in SOGo I have domain1 and domain2 as separate 
login domains. If a user access the SOGo webmail client through 
mail.domain1.com, domain1 will be used as the login domain. That way 
the user do not have to select the domain or append it to the username.


I am primarily thinking about the SOGo webmail client and not CardDAV 
and CalDAV, but I would not mind if it were possible to do it for 
them as well. I understand that there is some kind of template 
overriding system for the .wox templates. Would I be able to get the 
current URL/domain and be able to set a login domain within such a 
template?


I appreciate any suggestions.

Regards



It sounds to me like you're mixing technologies --

domain login (whether Windows or Samba AD) and SOGo webmail

Perhaps no one has responded simply because they are unsure what you're 
trying to do.


IF you already have SOGo webmail available via two domains, are you 
running two instances of SOGo and two instances of your mail server 
(Dovecot/Postfix, etc.) or have you configured one instance to work for 
both?


And, IF you have two domain logins are you running two AD servers?

Does domain login come before webmail login, etc?  I may be totally 
off-base (sorry)



--
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] Choose login domain based on DNS domain used to access the server.

2015-07-27 Thread Sven Nielsen

Am 27.07.2015 um 15:29 schrieb Nils Fredrik Gjerull:

Den 27. juli 2015 15:02, skrev Tanstaafl:

It sounds to me like he is running a single SOGo instance hosting
multiple email domains, and has unique URLs (ie, his reference to 'DNS')
for each email domain, and wants SOGo to be able to append a fqdn to the
end of the username based on the URL of the login page?

If I understand this correctly, I'd love to see this ability as well.

So, depending on if a user goes to:

https://sogo.example1.com/SOGo/so/
or
https://sogo.example2.com/SOGo/so/

and entered a username of user1

SOGo would pass us...@example1.com or us...@example2.com as the
login username to whatever the backend auth mechanism is using.


This is exactly what I have in mind :)

Regards


+1 for this!

Is it already possible, or would this need to be added as feature request?

Regards
--
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] Choose login domain based on DNS domain used to access the server.

2015-07-27 Thread Nils Fredrik Gjerull

Hi.

Thanks for a reply :)

Den 27. juli 2015 13:26, skrev Steve Ankeny:

It sounds to me like you're mixing technologies --

domain login (whether Windows or Samba AD) and SOGo webmail
What I mean by login domain is the domain directive in the sogo.conf 
file. Perhaps SOGo domain is a better word for it? Currently you can 
log in to the webmail client (in multi-domain setup) by either appending 
the domain to the username (e.g user@domain) or using the 
SOGoLoginDomains directive which gives you a drop-down of the available 
domains. It is not related to domain login through an AD server.
Perhaps no one has responded simply because they are unsure what 
you're trying to do.

Sure :)
IF you already have SOGo webmail available via two domains, are you 
running two instances of SOGo and two instances of your mail server 
(Dovecot/Postfix, etc.) or have you configured one instance to work 
for both?
I am running one instance of SOGo and of Dovecot/Postifix. I use nginx 
as a reverse proxy to make SOGo available on more than one DNS domain. I 
would like use an HTTP header set by nginx to select which SOGo domain 
to use. So that when a user logins through mail.customer1.com the SOGo 
domain customer1 is used. I would like to avoid having the user select 
customer1 with a drop-down or by appending it to the user-name (e.g. 
username@customer1).


sogo.conf:

domains = {
customer1 = {
...
};
customer2 = {
...
};
}


The idea is to be able to use the same SOGo instance for several small 
customers, and make it look like they have their own instance. So that 
the same user-name can be used by different customers without a name 
conflict.


And, IF you have two domain logins are you running two AD servers?

Does domain login come before webmail login, etc?  I may be totally 
off-base (sorry)
AD do not come into this at all. I realize now that the term login 
domain can be confused with domain login. I am talking about what the 
SOGo installation Guide 
(http://www.sogo.nu/files/docs/SOGo%20Installation%20Guide.pdf) calls 
Multi-domains Configuration.


I hope this clarifies what I am trying to do.

--
Nils Fredrik Gjerull
-
Ministry of Eternal Affairs
Computer Department
( Not an official title :) )

--
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] Choose login domain based on DNS domain used to access the server.

2015-07-27 Thread Nils Fredrik Gjerull

Den 27. juli 2015 15:02, skrev Tanstaafl:

It sounds to me like he is running a single SOGo instance hosting
multiple email domains, and has unique URLs (ie, his reference to 'DNS')
for each email domain, and wants SOGo to be able to append a fqdn to the
end of the username based on the URL of the login page?

If I understand this correctly, I'd love to see this ability as well.

So, depending on if a user goes to:

https://sogo.example1.com/SOGo/so/
or
https://sogo.example2.com/SOGo/so/

and entered a username of user1

SOGo would pass us...@example1.com or us...@example2.com as the
login username to whatever the backend auth mechanism is using.


This is exactly what I have in mind :)

Regards

--
Nils Fredrik Gjerull
-
Ministry of Eternal Affairs
Computer Department
( Not an official title :) )

--
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] Choose login domain based on DNS domain used to access the server.

2015-07-27 Thread Steve Ankeny

On 07/27/2015 09:29 AM, Nils Fredrik Gjerull wrote:

Den 27. juli 2015 15:02, skrev Tanstaafl:

It sounds to me like he is running a single SOGo instance hosting
multiple email domains, and has unique URLs (ie, his reference to 'DNS')
for each email domain, and wants SOGo to be able to append a fqdn to the
end of the username based on the URL of the login page?

If I understand this correctly, I'd love to see this ability as well.

So, depending on if a user goes to:

https://sogo.example1.com/SOGo/so/
or
https://sogo.example2.com/SOGo/so/

and entered a username of user1

SOGo would pass us...@example1.com or us...@example2.com as the
login username to whatever the backend auth mechanism is using.


This is exactly what I have in mind :)

Regards



Does the other suggestion work?

https://lists.inverse.ca/sogo/arc/users/2015-07/msg00247.html

What you want to do is possible (auto select from a set of Sogo login 
domains, on a multi tenant multi DNS domain Sogo webmail server, based 
on http host header). The .WOX template file is a template based on 
Objective-C and with Objective-C you should be able to do anything, such 
as, in this case, get the http headers from the http request. Look for 
the http header called Host. Verify that it's a valid dns domain that 
you're hosting the Sogo webmail for, and then set the login domain to 
that Host value.


Have a look here:
http://sope.opengroupware.org/en/docs/snippets/wox.html



--
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] Choose login domain based on DNS domain used to access the server.

2015-07-27 Thread Nils Fredrik Gjerull

Hi,

Any thoughts please. Would appreciate at least an acknowledgement that 
the e-mail was read, so I know I am not sending e-mails into the void :)


I also had a proposal/question about using a http header to set the 
login domain. I guess that it is not supported so I should create a 
proposal for it?



Den 22. juli 2015 15:32, skrev Nils Fredrik Gjerull:

Hi,

I have a use case were I want to make the SOGo webmail client 
accessible through different DNS domains, and based on which DNS 
domain is used a login domain is automatically chosen. I want to use 
SOGo as a multi-tenant system without users having to choose a login 
domain.


Let say that SOGo is available on mail.domain1.com and 
mail.domain2.com, and in SOGo I have domain1 and domain2 as separate 
login domains. If a user access the SOGo webmail client through 
mail.domain1.com, domain1 will be used as the login domain. That way 
the user do not have to select the domain or append it to the username.


I am primarily thinking about the SOGo webmail client and not CardDAV 
and CalDAV, but I would not mind if it were possible to do it for them 
as well. I understand that there is some kind of template overriding 
system for the .wox templates. Would I be able to get the current 
URL/domain and be able to set a login domain within such a template?


I appreciate any suggestions.

Regards

--
Nils Fredrik Gjerull
-
Ministry of Eternal Affairs
Computer Department
( Not an official title :) )

--
users@sogo.nu
https://inverse.ca/sogo/lists


Re: [SOGo] Choose login domain based on DNS domain used to access the server.

2015-07-23 Thread Nils Fredrik Gjerull

Hi,

Den 22. juli 2015 15:32, skrev Nils Fredrik Gjerull:
I have a use case were I want to make the SOGo webmail client 
accessible through different DNS domains, and based on which DNS 
domain is used a login domain is automatically chosen. I want to use 
SOGo as a multi-tenant system without users having to choose a login 
domain.


Just to follow up on my question. An other, and perhaps better, option 
is to make nginx set a http header which sets the login domain, like the 
x-webobjects-* headers. Would be nice to have a 
x-webobjects-login-domain (or perhaps x-sogo-login-domain) type header. 
Would a patch for this be welcome?


Would I be able to access http headers in a .wox template?

Regards
Nils Fredrik Gjerull
--
users@sogo.nu
https://inverse.ca/sogo/lists