1

Topic: Suggestions, Feature request, others

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2 from Github
- Deployed with iRedMail Easy or the downloadable installer? Download from Github
- Linux/BSD distribution name and version: FreeBSD 12.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL 12
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

# iRedMail Suggestions, Requests

## My setup

- FreeBSD 12.1 (soon 12.2, 13 next year)
- `openssl` instead of the defaults `libressl` (`libressl` does not have TLS 1.3 yet)
- Charset `en_AU.UTF-8` instead of `C`

## Suggestions

1. Create a question during the installation for `charset`, then do all-round configuration. I prefer to use `en_AU.UTF-8` instead of the default `C`.
    - FreeBSD

# Edit `/etc/login.conf`
    . . .
    default:\
            :charset=en_AU.UTF-8:\
            :lang=en_AU.UTF-8:\
            :setenv=LC_COLLATE=en_AU.UTF-8:\
    . . .
    root:\
            :charset=en_AU.UTF-8:\
            :lang=en_AU.UTF-8:\
            :setenv=LC_COLLATE=en_AU.UTF-8:\
    . . .
    postgres:\
            :charset=en_AU.UTF-8:\
            :lang=en_AU.UTF-8:\
            :setenv=LC_COLLATE=en_AU.UTF-8:\
            :tc=default:

# Update login db
cap_mkdb /etc/login.conf

# Edit `./iRedMail/conf/global`

    export LC_ALL=en_AU.UTF-8
    export LC_CTYPE=en_AU.UTF-8
    export LC_COLLATE=en_AU.UTF-8
    export LANG=en_AU.UTF-8

2. Update `perl 5.2` to `perl 5.3`

3. Is it `perl` used on anything else than replace strings, including `iredadmin`, `iredapd` and `mlmmjadmin`? If that is the case, could `iRedMail` use `sed` instead and avoid installing `perl`? I like installing the absolute minimum necessary for space and safety reasons. If it is a server, do not install what you do not need.

4. Skip installing docs. Unset build references to DEBUG, DOCS, EXAMPLES, MANPAGE, TEST (use `_UNSET`)
    - When used for production, there is no reason for documentation. Caution: Clam/Amavis need to catch issues in DOC files. Not the same kind of Doc.

5. `PHP 7.4` and `mcrypt` combo, both package and config (no longer necessary/available)

6. Update `Python 2` syntax (`except Exception, e:`). It is only two update files. ONly to keep the code clean.

find . -name "*.py" -print -exec grep ", e:" {} \;

sed -i '' -e "s/, e:/ as e:/" ./update/ldap/*.py

7. Configure compilers to minimum requirements such as disable cross-compile, etc. Some of the lengthy parts of the install are to compile all sorts of tools (dependency). Could those be installed using `pkg`?

8. Compile ahead supporting tools such as gmake, llvm, etc.

9. Curiosity: Why the install on FreeBSD compiles from the `ports` instead of using `pkg` binaries? I am guessing that this is historical to use the most recent code, and less for any specific flag. Having said that, I use `openssl` which is not the default on FreeBSD, so compilation is welcome.

Thanks
Stay safe.

----

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

2

Re: Suggestions, Feature request, others

angeloklin wrote:

1. Create a question during the installation for `charset`, then do all-round configuration. I prefer to use `en_AU.UTF-8` instead of the default `C`.

We set 'LC_ALL=C' for iRedMail installation, it's not wrote in config files.

angeloklin wrote:

2. Update `perl 5.2` to `perl 5.3`

Switched to 5.32.

angeloklin wrote:

3. Is it `perl` used on anything else than replace strings ...

Perl is required by many ports, it will always be installed as dependent package.

angeloklin wrote:

4. Skip installing docs. Unset build references to DEBUG, DOCS, EXAMPLES, MANPAGE, TEST (use `_UNSET`)

This is the default option. Maybe i missed this option for some port(s)? Let me know.

angeloklin wrote:

5. `PHP 7.4` and `mcrypt` combo, both package and config (no longer necessary/available)

This was fixed long time ago.

angeloklin wrote:

7. Configure compilers to minimum requirements such as disable cross-compile, etc. Some of the lengthy parts of the install are to compile all sorts of tools (dependency). Could those be installed using `pkg`?

I didn't try. Ports may requires newer version of the one installed with `pkg`.

angeloklin wrote:

9. Curiosity: Why the install on FreeBSD compiles from the `ports` instead of using `pkg` binaries? I am guessing that this is historical to use the most recent code, and less for any specific flag. Having said that, I use `openssl` which is not the default on FreeBSD, so compilation is welcome.

Because the binary packages may not have options we need. e.g. LDAP / MySQL / PGSQL support.

3

Re: Suggestions, Feature request, others

ZhangHuangbin wrote:
angeloklin wrote:

1. Create a question during the installation for `charset`, then do all-round configuration. I prefer to use `en_AU.UTF-8` instead of the default `C`.

We set 'LC_ALL=C' for iRedMail installation, it's not wrote in config files.

angeloklin wrote:

2. Update `perl 5.2` to `perl 5.3`

Switched to 5.32.

angeloklin wrote:

3. Is it `perl` used on anything else than replace strings ...

Perl is required by many ports, it will always be installed as dependent package.

angeloklin wrote:

4. Skip installing docs. Unset build references to DEBUG, DOCS, EXAMPLES, MANPAGE, TEST (use `_UNSET`)

This is the default option. Maybe i missed this option for some port(s)? Let me know.

angeloklin wrote:

5. `PHP 7.4` and `mcrypt` combo, both package and config (no longer necessary/available)

This was fixed long time ago.

angeloklin wrote:

7. Configure compilers to minimum requirements such as disable cross-compile, etc. Some of the lengthy parts of the install are to compile all sorts of tools (dependency). Could those be installed using `pkg`?

I didn't try. Ports may requires newer version of the one installed with `pkg`.

angeloklin wrote:

9. Curiosity: Why the install on FreeBSD compiles from the `ports` instead of using `pkg` binaries? I am guessing that this is historical to use the most recent code, and less for any specific flag. Having said that, I use `openssl` which is not the default on FreeBSD, so compilation is welcome.

Because the binary packages may not have options we need. e.g. LDAP / MySQL / PGSQL support.


Thanks for your reply and answers.

2. I saw the new commit with Perl 5.32.

4. UNSET documentation

grep -E "_SET\+=(DEBUG|DOCS|EXAMPLES|MANPAGE|TEST)" packages_freebsd.sh 
packages_freebsd.sh:OPTIONS_FILE_SET+=DOCS
packages_freebsd.sh:OPTIONS_FILE_SET+=EXAMPLES
packages_freebsd.sh:OPTIONS_FILE_SET+=DOCS
packages_freebsd.sh:OPTIONS_FILE_SET+=DOCS
packages_freebsd.sh:OPTIONS_FILE_SET+=TEST
packages_freebsd.sh:OPTIONS_FILE_SET+=DEBUG
packages_freebsd.sh:OPTIONS_FILE_SET+=DEBUGLOG

Be careful to NOT unset for Amavisd-new

# /var/db/ports/security_amavisd-new/options
OPTIONS_FILE_UNSET+=ALTERMIME
OPTIONS_FILE_SET+=ARC
OPTIONS_FILE_SET+=ARJ
OPTIONS_FILE_SET+=BDB
OPTIONS_FILE_SET+=CAB
OPTIONS_FILE_SET+=DOCS       <<<<<< This one must stay on !!!!!!!!
OPTIONS_FILE_SET+=FILE
OPTIONS_FILE_SET+=FREEZE
. . .

5. Mcrypt (some remaining code)

# /var/db/ports/lang_php${PREFERRED_PHP_VER}-extensions/options
. . .
OPTIONS_FILE_SET+=JSON
OPTIONS_FILE_UNSET+=LDAP
OPTIONS_FILE_SET+=MBSTRING
OPTIONS_FILE_SET+=MCRYPT   <<<< mcrypt
OPTIONS_FILE_UNSET+=MSSQL  <<<< Some are not in the ports documentation. I did not check `make config`
OPTIONS_FILE_UNSET+=MYSQL
OPTIONS_FILE_UNSET+=MYSQLI
OPTIONS_FILE_UNSET+=ODBC
. . .

7. The ones I remember because they stay long enought are `LLVM` and `gmake`. I think they are kicked within SpamAssassin. The chain goes deep, takes the longest, and it is not even about SpamAssassin compilation itself.

Cheers

4

Re: Suggestions, Feature request, others

angeloklin wrote:

4. UNSET documentation
5. Mcrypt (some remaining code)

Fixed.