1

Topic: Postfix / Amavis error during 1.3.2 install on FreeBSD

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2
- Deployed with iRedMail Easy or the downloadable installer? Download code from website.
- Linux/BSD distribution name and version: FreeBSD 12.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSql
- 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.
====

Error in rule during the installation of postfix.

# = = = = = = = = = =
# bash -xv iRedMail.sh
. . .
Updating /usr/ports/mail/postfix/work/stage/usr/local/man/man1/posttls-finger.1...
Updating /usr/ports/mail/postfix/work/stage/usr/local/sbin/posttls-finger...
bin/postconf: fatal: invalid process_limit field "PH_AMAVISD_MAX_SERVERS" in "smtp-amavis unix -  -   n   -   PH_AMAVISD_MAX_SERVERS  smtp    -o syslog_name=postfix/amavis    -o smtp_data_done_timeout=1200    -o smtp_send_xforward_command=yes    -o disable_dns_lookups=yes    -o max_use=20"
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/mail/postfix/work/postfix-3.5.7
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/mail/postfix
*** Error code 1

Stop.
make: stopped in /usr/ports/mail/postfix
+ '[' X1 == X0 ']'
+ ECHO_ERROR 'Port was not successfully installed, please fix it manually and then re-execute this script.'
+ echo -e '<< ERROR >> Port was not successfully installed, please fix it manually and then re-execute this script.'
<< ERROR >> Port was not successfully installed, please fix it manually and then re-execute this script.
+ echo -e '<< ERROR >> Port was not successfully installed, please fix it manually and then re-execute this script.'
+ exit 255
# = = = = = = = = = =
# tail -f ./iRedMail.1.3.2/runtime/install.log
. . .
[ INFO ] Fetching all distfiles for port: security/py-fail2ban
[ INFO ] Fetching all distfiles for port: sysutils/logwatch
[ INFO ] All ports:  devel/py-Jinja2 net/py-netifaces security/py-bcrypt www/py-requests databases/postgresql12-server databases/postgresql12-contrib mail/dovecot mail/dovecot-pigeonhole mail/spamassassin security/amavisd-new mail/postfix www/nginx www/uwsgi lang/php74 mail/php74-imap archivers/php74-zip archivers/php74-bz2 archivers/php74-zlib devel/php74-gettext security/php74-openssl www/php74-session converters/php74-iconv textproc/php74-pspell textproc/php74-dom databases/php74-pgsql devel/p5-Exporter-Tiny security/clamav mail/mlmmj mail/roundcube databases/py-psycopg2 databases/py-sqlalchemy10 dns/py-dnspython www/webpy devel/py-simplejson security/py-fail2ban sysutils/logwatch
[ INFO ] Installing port: devel/py-Jinja2 (2020-10-29 22:33:49) ...
[ INFO ] Installing port: net/py-netifaces (2020-10-29 22:50:50) ...
[ INFO ] Installing port: security/py-bcrypt (2020-10-29 22:50:58) ...
[ INFO ] Installing port: www/py-requests (2020-10-29 22:51:15) ...
[ INFO ] Installing port: databases/postgresql12-server (2020-10-29 22:51:52) ...
[ INFO ] Installing port: databases/postgresql12-contrib (2020-10-29 23:08:47) ...
[ INFO ] Installing port: mail/dovecot (2020-10-29 23:13:22) ...
[ INFO ] Installing port: mail/dovecot-pigeonhole (2020-10-29 23:23:07) ...
[ INFO ] Installing port: mail/spamassassin (2020-10-29 23:24:24) ...
[ INFO ] Installing port: security/amavisd-new (2020-10-30 00:51:31) ...
[ INFO ] Installing port: mail/postfix (2020-10-30 01:14:51) ...
<< ERROR >> Port was not successfully installed, please fix it manually and then re-execute this script.
# = = = = = = = = = =
# ./iRedMail-1.3.2/conf/amavisd
. ${CONF_DIR}/amavisd
+ . /root/iRedMail-1.3.2/conf/amavisd
#!/usr/bin/env bash

. . .

# Num of pre-forked children.
# Try to set it to memory size (in GB)
export AMAVISD_MAX_SERVERS='2'
++ export AMAVISD_MAX_SERVERS=2
++ AMAVISD_MAX_SERVERS=2
if [ X"${KERNEL_NAME}" == X'LINUX' ]; then
    _mem_size_gb="$(free -g | grep '^Mem:' | awk '{print $2}')"
    export AMAVISD_MAX_SERVERS="$((${_mem_size_gb} + 1))"
elif [ X"${KERNEL_NAME}" == X'FREEBSD' ]; then
    _mem_size="$(sysctl hw.realmem | awk '{print $2}')"
    export AMAVISD_MAX_SERVERS="$((${_mem_size} / 1024 / 1024 / 1024 + 1))"
elif [ X"${KERNEL_NAME}" == X'OPENBSD' ]; then
    _mem_size="$(sysctl hw.physmem | awk -F'=' '{print $2}')"
    export AMAVISD_MAX_SERVERS="$((${_mem_size} / 1024 / 1024 / 1024 + 1))"
fi
++ '[' XFREEBSD == XLINUX ']'
++ '[' XFREEBSD == XFREEBSD ']'
+++ sysctl hw.realmem
+++ awk '{print $2}'
++ _mem_size=4294967296
++ export AMAVISD_MAX_SERVERS=5
++ AMAVISD_MAX_SERVERS=5
# = = = = = = = = = =
# tail -f ./iRedMail.1.3.2/runtime/install.status
. . .
export status_fetch_port_security_pyfail2ban='DONE'  # 8 seconds, ~= 0 minute(s)
export status_fetch_port_sysutils_logwatch='DONE'  # 8 seconds, ~= 0 minute(s)
export status_fetch_all_src_tarballs='DONE'
export status_install_port_devel_pyJinja2='processing'
export status_install_port_devel_pyJinja2='DONE'  # 1021 seconds, ~= 17 minute(s).
export status_install_port_net_pynetifaces='processing'
export status_install_port_net_pynetifaces='DONE'  # 8 seconds, ~= 0 minute(s).
export status_install_port_security_pybcrypt='processing'
export status_install_port_security_pybcrypt='DONE'  # 17 seconds, ~= 0 minute(s).
export status_install_port_www_pyrequests='processing'
export status_install_port_www_pyrequests='DONE'  # 37 seconds, ~= 0 minute(s).
export status_install_port_databases_postgresql12server='processing'
export status_install_port_databases_postgresql12server='DONE'  # 1015 seconds, ~= 16 minute(s).
export status_install_port_databases_postgresql12contrib='processing'
export status_install_port_databases_postgresql12contrib='DONE'  # 275 seconds, ~= 4 minute(s).
export status_install_port_mail_dovecot='processing'
export status_install_port_mail_dovecot='DONE'  # 585 seconds, ~= 9 minute(s).
export status_install_port_mail_dovecotpigeonhole='processing'
export status_install_port_mail_dovecotpigeonhole='DONE'  # 77 seconds, ~= 1 minute(s).
export status_install_port_mail_spamassassin='processing'
export status_install_port_mail_spamassassin='DONE'  # 5227 seconds, ~= 87 minute(s).
export status_install_port_security_amavisdnew='processing'
export status_install_port_security_amavisdnew='DONE'  # 1400 seconds, ~= 23 minute(s).
export status_install_port_mail_postfix='processing'

----

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

2

Re: Postfix / Amavis error during 1.3.2 install on FreeBSD

angeloklin wrote:

bin/postconf: fatal: invalid process_limit field "PH_AMAVISD_MAX_SERVERS" in "smtp-amavis unix -  -   n   -   PH_AMAVISD_MAX_SERVERS  smtp    -o syslog_name=postfix/amavis    -o smtp_data_done_timeout=1200    -o smtp_send_xforward_command=yes    -o disable_dns_lookups=yes    -o max_use=20"

This doesn't seem right.
While building ports, iRedMail doesn't touch any config files yet (because they don't even exist), i don't understand why it got this "PH_AMAVISD_MAX_SERVERS" variable.