1

Topic: autoconfig/autodiscover: Different configurations

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: CentOS 7.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL/MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?: Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Is it possible to send different configurations depending on the email client? For example, some versions of Outlook don't work with TLS on port 110 for POP, but will only work with SSL on port 995. But Thunderbird will work with the recommended port 110 over TLS. If I send the recommended configuration to Outlook users, they'll complain that the mail server is broken. This defeats the purpose of automatic configuration.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: autoconfig/autodiscover: Different configurations

Outlook uses autodiscover, Thunderbird uses autoconfig, they're different method, and it's easy to handle this if you handle autodiscover/autoconfig with different backend php/python/perl/cgi/... scripts.

3

Re: autoconfig/autodiscover: Different configurations

ZhangHuangbin wrote:

Outlook uses autodiscover, Thunderbird uses autoconfig, they're different method, and it's easy to handle this if you handle autodiscover/autoconfig with different backend php/python/perl/cgi/... scripts.

OK, so where are those in iRedMail? I see the file at /opt/www/autoconfig/config.inc.php, but how and where do I make different configs for autoconfig and autodiscover?

4

Re: autoconfig/autodiscover: Different configurations

i cannot remember i setup the autoconfig/autodiscover for you, sorry.

By default, autoconfig and autodiscover (setup by iRedMail team) uses same config file /opt/www/autoconfig/config.inc.php, it means they get same settings and return same settings to clients.

In your case, there're 2 possible solutions:

- Configure both Outlook and Thunderbird to use port 995+SSL.
- Modify the /opt/www/autoconfig/{autoconfig,autodiscover}.php, load different config files with different settings.

5

Re: autoconfig/autodiscover: Different configurations

Yes, you did set up this server with autoconfig/autodiscover.

I'd like to try and implement the second option.

I see the files /opt/www/autoconfig/{autoconfig,autodiscover}.php. They both get all of their parameters from config.inc.php in the same directory. I don't see an obvious place where I tell Outlook in autodiscover.php that it should use SSL and port 993/995, rather that STARTTLS and port 110/143.

6

Re: autoconfig/autodiscover: Different configurations

If you open /opt/www/autoconfig/{autoconfig,autodiscover}.php, there're two lines at the head of file:

// Load config file.
require_once "...";

You can point it to different file in each php file, then you can set different options for autoconfig/autodiscover.

7

Re: autoconfig/autodiscover: Different configurations

OK, so for the autodiscover version of config.inc.php I would just delete or comment out these lines to force use of SSL and 993/995 by Outlook?:

$imap_tls_enabled = true;
$imap_tls_port = '143';
$pop3_tls_enabled = true;
$pop3_tls_port = '110';

Or would I just change "true" to "false"?

8

Re: autoconfig/autodiscover: Different configurations

To disable an option, you'd better change true to false.

9

Re: autoconfig/autodiscover: Different configurations

Understood. Thanks.