amavis will not sta...
 
Notifications
Clear all

[Solved] amavis will not start

8 Posts
2 Users
3 Reactions
1,389 Views
(@uk_simon)
Joined: 1 year ago
Posts: 36
Topic starter  

For the purposes of this post the output of echo "$(hostname -I) $(hostname -f)" is

123.123.123.123 mailhost.mydomain.com

as it should be.

The hostname in amavisd.conf however was mailhost and not a FQDN. When I edit the file with the FQDN I can momentarily restart zmamavisdctl. however within moments it stops, I go back to /opt/zextras/conf/amavisd.conf and the hostname has reverted to mailhost

Something in carbonio is editing the amavisd.conf file with an old and incorrect hostname which has not come from /etc/hosts

Can someone point me towards where this incorrect hostname is coming from? (as it is not coming from /etc/hosts) which file or script in carbonio writes to the amavisd.conf file?


   
Quote
(@anahuac)
Joined: 2 years ago
Posts: 328
 

The easiest way to fix that is change your /etc/hosts to look like this:

123.123.123.123 mailhost.mydomain.com mailhost

In fact, this is the way it should be =)

 


   
ReplyQuote
(@uk_simon)
Joined: 1 year ago
Posts: 36
Topic starter  

Posted by: @anahuac

The easiest way to fix that is change your /etc/hosts to look like this:

123.123.123.123 mailhost.mydomain.com mailhost

In fact, this is the way it should be =)

 

Thanks, but that is exactly as it is. single space between ip, fqdn and hostname. which is why I can tell the script or process that is editing the amavised.conf does not relate to /etc/hosts or /etc/hostname as both are correct.

I also realise that /opt/zextras/conf/amavisd.conf is a read only file and I need to find out what is editing it. sure I can save the FQDN in place of the hostname in /opt/zextras/conf/amavisd.conf and momentarily start amavis, but something is editing the file with the wrong information. I am guessing that the hosts file was incorrect at the time carbonio configured itself on installation, but I cannot find what is writing the wrong informaiton to /opt/zextras/conf/amavisd.conf now

any ideas would be gratefully received

 


   
ReplyQuote
(@anahuac)
Joined: 2 years ago
Posts: 328
 

I'm sorry if I insist:

1 - In your 1st message you said:

For the purposes of this post the output of echo "$(hostname -I) $(hostname -f)" is

123.123.123.123 mailhost.mydomain.com

2 - in your second message you said:

Thanks, but that is exactly as it is. single space between ip, fqdn and hostname.

But that's not what I'm saying. Look closely please:

IP_ADDREES FQND ALIAS

IP = 123.123.123.123
FQDN =  mailhost.mydomain.com
ALIAS = ??????

As far as I could understand your messages, you're missing the ALIAS.

Set it this way:

123.123.123.123 mailhost.mydomain.com mailhost

IP_ADDRESS=123.123.123.123
FQDN=mailhost.mydomain.com
ALIAS=mailhost

Restart all Carbonio and let us know if it works =)

 

 

 

 

 


   
ReplyQuote
(@uk_simon)
Joined: 1 year ago
Posts: 36
Topic starter  

Firstly, thank you so much for your attention and I appreciate your insistance 😉 however both statements 1 and 2 are true, my hosts file has the line;

123.123.123.123 mailhost.mydomain.com mailhost

exactly the same a my working zimbra server but that is not, I believe, the source of the problem. Please indulge me!

amavisd.conf has the line $myhostname = 'mailhost'; which is not a FQDN, therefore incorrect. 

I change it to  $myhostname = 'mailhost.mydomain.com'; however as soon as I try to restart amavis, another script overwrites the amavisd.conf file with the old hostname preventing amavis from starting.

I now realise that there is no point in editing $myhostname because it is the output of the line in amavis,conf.in that defines the hostname as @@zimbra_server_hostname@@

What I need to find is the carbonio file, written on installation when the hostmane was incorrect as it is clear that @@zimbra_server_hostname@@ is not the hostname in /etc/hosts

does that make sense?

 

 

 


   
anahuac reacted
ReplyQuote
(@uk_simon)
Joined: 1 year ago
Posts: 36
Topic starter  

I though about trying this;

/opt/zextras/libexec/zmsetservername -n mailhost.mydomain.com

if that's the correct command ..........or could it make things worse!

This post was modified 1 year ago by UK_Simon

   
ReplyQuote
(@anahuac)
Joined: 2 years ago
Posts: 328
 

It might make it worse. Only do that if you can do a snapshot before and be able to roll back if needed.

Ok... I'm glad he are now in the same page about your /etc/hosts LOL

zmconfigd is the one who overwrites all confs files based on the ".in" ones. So if you want to make that change permanente edit /opt/zextras/conf/amavisd.conf.in instead

idk what is causing this on your environment, but I'm sure that if you replace @@zimbra_server_hostname@@ by mailhost.mydomain.com in /opt/zextras/conf/amavisd.conf.in will fix this specific issue.

A reminder: you'll probably have to do that change after every upgrade.

Regards


   
UK_Simon reacted
ReplyQuote
(@uk_simon)
Joined: 1 year ago
Posts: 36
Topic starter  

@anahuac I took a snapshot and used the zmsetservername script and now amavisd.conf properly shows the FQDN and according to zmcontrol status everything is now running. I still have other unrelated issues but this problem is solved.

Thanks


   
anahuac reacted
ReplyQuote