1

Topic: amavisd won't start after adding secondary domain.

Hi ZHB, i already created new topic..my main issue right now is when i add my secondary domain which is "uniorient.net" in /etc/amavisd/amavisd.conf then after adding i restarted the amavisd it has an error come out and it won't start the service.
but my main domain theres no any issue and its working fine with the amavisd which is "bluecrossphilippines.com"
here's the output error of amavisd:

● amavisd.service - Amavisd-new is an interface between MTA and content checkers                                                                             .
   Loaded: loaded (/usr/lib/systemd/system/amavisd.service; enabled; vendor pres                                                                             et: disabled)
   Active: failed (Result: start-limit) since Tue 2016-03-15 07:37:02 PHT; 15s a                                                                             go
     Docs: http://www.ijs.si/software/amavisd/#doc
  Process: 5686 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=e                                                                             xited, status=2)
Main PID: 3826 (code=exited, status=0/SUCCESS)

Mar 15 07:37:02 mail.eurogroup.com systemd[1]: amavisd.service: control process                                                                              exited, code=exited status=2
Mar 15 07:37:02 mail.eurogroup.com systemd[1]: Failed to start Amavisd-new is an                                                                              interface between MTA and content checkers..
Mar 15 07:37:02 mail.eurogroup.com systemd[1]: Unit amavisd.service entered fail                                                                             ed state.
Mar 15 07:37:02 mail.eurogroup.com systemd[1]: amavisd.service failed.
Mar 15 07:37:02 mail.eurogroup.com systemd[1]: amavisd.service holdoff time over                                                                             , scheduling restart.
Mar 15 07:37:02 mail.eurogroup.com systemd[1]: start request repeated too quickl                                                                             y for amavisd.service
Mar 15 07:37:02 mail.eurogroup.com systemd[1]: Failed to start Amavisd-new is an                                                                              interface between MTA and content checkers..
Mar 15 07:37:02 mail.eurogroup.com systemd[1]: Unit amavisd.service entered fail                                                                             ed state.
Mar 15 07:37:02 mail.eurogroup.com systemd[1]: amavisd.service failed.


note: my serverhostname is mail.eurogroup.com

here's the screenshot of my /etc/amavisd/amavisd.conf


# Add dkim_key here.
dkim_key("bluecrossphilippines.com", "dkim", "/var/lib/dkim/bluecrossphilippines.com.pem");
dkim_key("uniorient.net", "dkim", "/var/lib.dkim/uniorient.net.pem");
# Note that signing mail for subdomains with a key of a parent
# domain is treated by recipients as a third-party key, which
# may 'hold less merit' in their eyes. If one has a choice,
# it is better to publish a key for each domain (e.g. host1.a.cn)
# if mail is really coming from it. Sharing a pem file
# for multiple domains may be acceptable, so you don't need
# to generate a different key for each subdomain, but you
# do need to publish it in each subdomain. It is probably
# easier to avoid sending addresses like host1.a.cn and
# always use a parent domain (a.cn) in 'From:', thus
# avoiding the issue altogether.
#dkim_key("host1.bluecrossphilippines.com", "dkim", "/var/lib/dkim/bluecrossphilippines.com.pem");
#dkim_key("host3.bluecrossphilippines.com", "dkim", "/var/lib/dkim/bluecrossphilippines.com.pem");

# Add new dkim_key for other domain.

@dkim_signature_options_bysender_maps = ( {
    # ------------------------------------
    # For domain: bluecrossphilippines.com.
    # ------------------------------------
    # 'd' defaults to a domain of an author/sender address,
    # 's' defaults to whatever selector is offered by a matching key

    #'postmaster@bluecrossphilippines.com'    => { d => "bluecrossphilippines.com", a => 'rsa-sha256', ttl =>  7*24*3600 },
    #"spam-reporter@bluecrossphilippines.com"    => { d => "bluecrossphilippines.com", a => 'rsa-sha256', ttl =>  7*24*3600 },

    # explicit 'd' forces a third-party signature on foreign (hosted) domains
    "bluecrossphilippines.com"  => { d => "bluecrossphilippines.com", a => 'rsa-sha256', ttl => 10*24*3600 },
    "uniorient.net" => { d => "uniorient.net", a => 'rsa-sha256', ttl => 10*24*3600 },
    #"host1.bluecrossphilippines.com"  => { d => "host1.bluecrossphilippines.com", a => 'rsa-sha256', ttl => 10*24*3600 },
    #"host2.bluecrossphilippines.com"  => { d => "host2.bluecrossphilippines.com", a => 'rsa-sha256', ttl => 10*24*3600 },
    # ---- End domain: bluecrossphilippines.com ----

    # catchall defaults
    '.' => { a => 'rsa-sha256', c => 'relaxed/simple', ttl => 30*24*3600 },
} );


thanks..for the support

----

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

2

Re: amavisd won't start after adding secondary domain.

OK, you just created a new topic but no output of command "/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf"?

3

Re: amavisd won't start after adding secondary domain.

here's the output of the /etc/amavisd/amavisd.conf

kindly review thanks..
i only paste the dkim adding area..


# Add dkim_key here.
dkim_key("bluecrossphilippines.com", "dkim", "/var/lib/dkim/bluecrossphilippines.com.pem");
dkim_key("uniorient.net", "dkim", "/var/lib/dkim/uniorient.net.pem");

# Note that signing mail for subdomains with a key of a parent
# domain is treated by recipients as a third-party key, which
# may 'hold less merit' in their eyes. If one has a choice,
# it is better to publish a key for each domain (e.g. host1.a.cn)
# if mail is really coming from it. Sharing a pem file
# for multiple domains may be acceptable, so you don't need
# to generate a different key for each subdomain, but you
# do need to publish it in each subdomain. It is probably
# easier to avoid sending addresses like host1.a.cn and
# always use a parent domain (a.cn) in 'From:', thus
# avoiding the issue altogether.
#dkim_key("host1.bluecrossphilippines.com", "dkim", "/var/lib/dkim/bluecrossphilippines.com.pem");
#dkim_key("host3.bluecrossphilippines.com", "dkim", "/var/lib/dkim/bluecrossphilippines.com.pem");

# Add new dkim_key for other domain.

@dkim_signature_options_bysender_maps = ( {
    # ------------------------------------
    # For domain: bluecrossphilippines.com.
    # ------------------------------------
    # 'd' defaults to a domain of an author/sender address,
    # 's' defaults to whatever selector is offered by a matching key

    #'postmaster@bluecrossphilippines.com'    => { d => "bluecrossphilippines.com", a => 'rsa-sha256', ttl =>  7*24*3600 },
    #"spam-reporter@bluecrossphilippines.com"    => { d => "bluecrossphilippines.com", a => 'rsa-sha256', ttl =>  7*24*3600 },

    # explicit 'd' forces a third-party signature on foreign (hosted) domains
    "bluecrossphilippines.com"  => { d => "bluecrossphilippines.com", a => 'rsa-sha256', ttl => 10*24*3600 },
    "uniorient.net" => { d => "uniorient.net", a => 'rsa-sha256', ttl => 10*24*3600 },
    #"host1.bluecrossphilippines.com"  => { d => "host1.bluecrossphilippines.com", a => 'rsa-sha256', ttl => 10*24*3600 },
    #"host2.bluecrossphilippines.com"  => { d => "host2.bluecrossphilippines.com", a => 'rsa-sha256', ttl => 10*24*3600 },
    # ---- End domain: bluecrossphilippines.com ----

    # catchall defaults
    '.' => { a => 'rsa-sha256', c => 'relaxed/simple', ttl => 30*24*3600 },
} );

4

Re: amavisd won't start after adding secondary domain.

I'm asking for output of command "/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf", not the content of amavisd.conf.

5 (edited by rhex.diaz 2016-03-16 13:29:44)

Re: amavisd won't start after adding secondary domain.

no output was displayed..after i enter the command /usr/sbin/amavisd -c /etc/amavisd/amavisd.conf


sorry i din't get what you said before..








ZhangHuangbin wrote:

I'm asking for output of command "/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf", not the content of amavisd.conf.

6

Re: amavisd won't start after adding secondary domain.

The systemctl status command says Amavisd service cannot be started, if you run Amavisd on command line manually, it should report the error message:

/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf

7 (edited by rhex.diaz 2016-03-17 13:49:03)

Re: amavisd won't start after adding secondary domain.

yup,, that's my main reason why does amavisd won't start its service after i add the second domain in amavisd.conf..

i already created the zone file and the test of dkim was all pass the first and the second domain but amavisd wont start there were error message


ZhangHuangbin wrote:

The systemctl status command says Amavisd service cannot be started, if you run Amavisd on command line manually, it should report the error message:

/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf

8

Re: amavisd won't start after adding secondary domain.

Try again with "debug" option:

/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf debug

If it runs as expected, try to send some testing emails and keep monitor the terminal output.