1

Topic: Can't modify constant item in scalar assignment at /etc/amavisd/amavi

==== Required information ====
- iRedMail version (check /etc/iredmail-release): v0.9.6
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

HI,

My amavisd service is failing to start with the following message.

[root@iredmail init.d]# /usr/sbin/amavisd -c /etc/amavisd/amavisd.conf debug
Error in config file "/etc/amavisd/amavisd.conf": Can't modify constant item in scalar assignment at /etc/amavisd/amavisd.conf line 86, near "secure
  # bypass_banned_checks_maps => [1],     # allow sending any file names and types
  terminate_dsn_on_notify_success"
syntax error at /etc/amavisd/amavisd.conf line 86, near "secure
  # bypass_banned_checks_maps => [1],     # allow sending any file names and types
  terminate_dsn_on_notify_success"

Below is the part of the conf file that is being referenced. Can anyone offer a solution/advice to solve this issue.

$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
  originating => 1,  # declare that mail was submitted by our smtp client
  allow_disclaimers => 1,  # enables disclaimer insertion if available
  # notify administrator of locally originating malware
  virus_admin_maps => ["virusalert\@$mydomain"],
  spam_admin_maps  => ["virusalert\@$mydomain"],
  warnbadhsender   => 1,
  # forward to a smtpd service providing DKIM signing service
  # forward_method => 'smtp:[127.0.0.1]:10027',
  # force MTA conversion to 7-bit (e.g. before DKIM signing)
  smtpd_discard_ehlo_keywords => ['8BITMIME'],
  logpath     = /var/log/secure
  # bypass_banned_checks_maps => [1],     # allow sending any file names and types
  terminate_dsn_on_notify_success => 0,   # don't remove NOTIFY=SUCCESS option
};

Many Thanks

----

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

2

Re: Can't modify constant item in scalar assignment at /etc/amavisd/amavi

auroralabs wrote:

  logpath     = /var/log/secure

Isn't it very obvious syntax error?

3

Re: Can't modify constant item in scalar assignment at /etc/amavisd/amavi

Thank you I am therfore assuming it is not required so I have removed the logpath directive.

Just curious where it came from as was not in the previous config file so either brought in from an upgrade or pasted in the middle of the function by magic or error?

4

Re: Can't modify constant item in scalar assignment at /etc/amavisd/amavi

auroralabs wrote:

Just curious where it came from as was not in the previous config file so either brought in from an upgrade or pasted in the middle of the function by magic or error?

I'm afraid that no one can answer this question. It's your server and no one but you has ssh access.