Results 1 to 9 of 9

Thread: Amavisd doesn't want to start // How to set the hostname

  1. #1
    Join Date
    Sep 2010
    Posts
    30
    Rep Power
    5

    Default Amavisd doesn't want to start // How to set the hostname

    Hello everyone,

    on my new Zimbra-installation, the amavisd doesn't want to start:

    ~$ zmamavisdctl start
    Starting amavisd... The value of variable $myhostname is "zimbra", but should have been
    a fully qualified domain name; perhaps uname(3) did not provide such.
    You must explicitly assign a FQDN of this host to variable $myhostname
    in amavisd.conf, or fix what uname(3) provides as a host's network name!


    As we see, the amavisd complains about the hostname "zimbra", which should be something like "zimbra.example.com". Of course I can edit the amavisd.conf, and enter an FQDN hostname.

    But where would be the zimbra-way to set the hostname correctly? The Admin-Page under "Configuration" > "Server" doesn't let me change the hostname.

    What to do?

    Thanks very much for help!
    Andre

  2. #2
    Join Date
    May 2008
    Posts
    432
    Rep Power
    7

    Default

    The hostname is set in Linux (hostname command) and during Zimbra installation.

  3. #3
    Join Date
    Sep 2010
    Posts
    30
    Rep Power
    5

    Default

    Quote Originally Posted by iway View Post
    The hostname is set in Linux (hostname command) and during Zimbra installation.
    Of course:

    # hostname
    zimbra
    # hostname --fqdn
    zimbra.example.com

    But amavis doesn't seem to like this. So I wonder if it's OK to edit the amavisd.conf manually, or if there is a more zimbra-like way to tell amavis about the FQDN.

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by Alphaphi View Post
    Of course:

    # hostname
    zimbra
    # hostname --fqdn
    zimbra.example.com

    But amavis doesn't seem to like this. So I wonder if it's OK to edit the amavisd.conf manually,
    Not a good idea to edit the config giles.

    Quote Originally Posted by Alphaphi View Post
    or if there is a more zimbra-like way to tell amavis about the FQDN.
    Go to the Split DNS article and run the commands asked for in the 'Verify...' section then post the output here for confirmation that it's OK.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    Join Date
    Sep 2010
    Posts
    30
    Rep Power
    5

    Default

    Quote Originally Posted by phoenix View Post
    Not a good idea to edit the config giles.
    Yes, that's why I'm asking here.

    Quote Originally Posted by phoenix View Post
    Go to the Split DNS article and run the commands asked for in the 'Verify...' section then post the output here for confirmation that it's OK.
    Indeed we have a split-horizon situation here. Let's see if everything ist correct [1]:

    ===== First Query =====

    # dig company.com mx

    [...]

    ;; ANSWER SECTION:
    company.com. 86400 IN MX 20 mail.company2.com.
    company.com. 86400 IN MX 10 mail.company.com.
    [...]
    ;; ADDITIONAL SECTION:
    mail.company.com. 172800 IN A 192.168.116.200 *)
    mail.company2.com. 5146 IN A 78.46.xxx.yyy **)

    *) this is the correct internal IP of our current mailrelay, and the
    machine where the current split horizon DNS is running on.
    **) this is the correct external IP ouf our current backup mailrelay.

    ===== End first query =====


    ===== Second query =====

    # dig company.com any

    [...]

    ;; ANSWER SECTION:
    company.com. 86090 IN MX 10 mail.company.com.
    company.com. 86090 IN MX 20 mail.company2.com.
    company.com. 86277 IN NS ns49.1und1.de.
    company.com. 86277 IN NS ns50.1und1.de.
    company.com. 7467 IN A 82.165.104.167

    [...]
    ;; ADDITIONAL SECTION:
    mail.company.com. 172800 IN A 192.168.116.200
    mail.company2.com. 4836 IN A 78.46.xxx.yyy
    ns49.1und1.de. 86090 IN A 195.20.224.149
    ns50.1und1.de. 86090 IN A 212.227.123.63

    ===== end second query =====


    ===== third query =====

    # host $(hostname)
    zimbra.company.com has address 192.168.116.202 *)

    *) This is the correct internal IP of the zimbra-Server in question here.


    # cat /etc/resolv.conf
    ### BEGIN INFO
    #
    # Modified_by: NetworkManager
    # Process: /usr/bin/NetworkManager
    # Process_id: 4413
    #
    ### END INFO

    nameserver 192.168.116.200 *)
    domain company.com


    *) This is the correct IP of our internal DNS-Server, which provides the inner
    part of the split DNS horizon, and forwards the rest of the queries to some
    external DNS.
    This is also the IP of our current mail relay.



    # cat /etc/hosts
    127.0.0.1 localhost
    127.0.1.1 zimbra.company.com zimbra

    [...following some IPv6-stuff...]

    ===== end third query =====


    For my eyes this looks correct. What do you say about this?

    At the moment I don't see the connection between the DNS entries and the amavisd complaining about the non-FQDN-entry in $hostname. Where does the $hostname-information in amavisd.conf come from?

    Thanks for reading all this!
    Andre




    [1] I don't (yet) expect the mail system to work properly in any case. It's enough that Zimbra-users can send mails to themselves to receive appointment invitations. And maybe mails should run to the relayhost to reach the outside world.
    Mail need not be received at the moment from the outside world by zimbra. This comes as a later step, and still not directly from outside, but via the current mail relay as a front relay.

  6. #6
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    There's two problems with your set-up. The first one is your hosts file is incorrect, go to the 'Verify ...' section of the Split DNS article and check the format in there. The second problem is that you have no DNS A & MX records for the Zimbra server itself and they are required, the server must also reside on a LAN IP and not the loopback IP.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  7. #7
    Join Date
    Sep 2010
    Posts
    30
    Rep Power
    5

    Default

    Hello Phoenix,

    sorry that I have to ask again for help. I went through the split-DNS-article, and have set up the split-horizon. But still the amavisd doesn't work, as the $hostname variable is simply "zimbra", but should be an FQDN.

    The DNS-Situation is shown below. As I see it your points should be solved:

    Hosts-file is fixed (line 76, 77)
    A-/MX-records exist and point to the zimbra-server (line 13, 19, 40, 41)

    One last thing is not clear for me: what do you mean with "the server must reside on a LAN IP, not on the loopback"?



    On the server itself:

    1 # dig example.net mx
    2
    3 ; <<>> DiG 9.4.2-P2.1 <<>> example.net mx
    4 ;; global options: printcmd
    5 ;; Got answer:
    6 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59185
    7 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
    8
    9 ;; QUESTION SECTION:
    10 ;example.net. IN MX
    11
    12 ;; ANSWER SECTION:
    13 example.net. 300 IN MX 10 zimbra.example.net.
    14
    15 ;; AUTHORITY SECTION:
    16 example.net. 300 IN NS zimbra.example.net.
    17
    18 ;; ADDITIONAL SECTION:
    19 zimbra.example.net. 300 IN A 192.168.116.202
    20
    21 ;; Query time: 0 msec
    22 ;; SERVER: 192.168.116.202#53(192.168.116.202)
    23 ;; WHEN: Tue Oct 12 14:09:56 2010
    24 ;; MSG SIZE rcvd: 88
    25
    26
    27 # dig example.net any
    28
    29 ; <<>> DiG 9.4.2-P2.1 <<>> example.net any
    30 ;; global options: printcmd
    31 ;; Got answer:
    32 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34739
    33 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
    34
    35 ;; QUESTION SECTION:
    36 ;example.net. IN ANY
    37
    38 ;; ANSWER SECTION:
    39 example.net. 300 IN SOA zimbra.example.net. it.example.net. 2010006 43200 3600 3600000 2592000
    40 example.net. 300 IN A 192.168.116.202
    41 example.net. 300 IN MX 10 zimbra.example.net.
    42 example.net. 300 IN NS zimbra.example.net.
    43
    44 ;; ADDITIONAL SECTION:
    45 zimbra.example.net. 300 IN A 192.168.116.202
    46
    47 ;; Query time: 0 msec
    48 ;; SERVER: 192.168.116.202#53(192.168.116.202)
    49 ;; WHEN: Tue Oct 12 14:10:13 2010
    50 ;; MSG SIZE rcvd: 152
    51
    52
    53 # host $(hostname)
    54 zimbra.example.net has address 192.168.116.202
    55
    56
    57 # host $(hostname)
    58 zimbra.example.net has address 192.168.116.202
    59 root@zimbra:~# cat /etc/resolv.conf
    60 ### BEGIN INFO
    61 #
    62 # Modified_by: NetworkManager
    63 # Process: /usr/bin/NetworkManager
    64 # Process_id: 4413
    65 #
    66 ### END INFO
    67
    68 search example.net
    69 nameserver 192.168.116.202
    70
    71
    72 # cat /etc/hosts
    73 #127.0.0.1 localhost
    74 #127.0.1.1 zimbra.example.net zimbra
    75
    76 127.0.0.1 localhost.localdomain localhost
    77 192.168.116.202 zimbra.example.net zimbra
    78
    79 # The following lines are desirable for IPv6 capable hosts
    80 ::1 ip6-localhost ip6-loopback
    81 [...]

  8. #8
    Join Date
    Sep 2011
    Posts
    4
    Rep Power
    4

    Default

    This reply is about as useful as a rubber crutch.

  9. #9
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by arinath View Post
    This reply is about as useful as a rubber crutch.
    So is posting to an old thread. Are you actually saying that his host file was correct or have you posted to an old thread just to start flaming? Unless I've missed something obvious about the hosts file, it is incorrect and will cause problems.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Similar Threads

  1. Replies: 7
    Last Post: 02-03-2011, 06:01 AM
  2. [SOLVED] zimbra cant start after crash ldap error
    By bonadio in forum Administrators
    Replies: 3
    Last Post: 02-12-2010, 11:24 AM
  3. Change hostname and IP Address!
    By celeron in forum Administrators
    Replies: 6
    Last Post: 07-15-2007, 09:27 PM
  4. why won't ldap start?
    By vaneck in forum Administrators
    Replies: 6
    Last Post: 05-18-2006, 03:43 PM
  5. Is it started or not
    By kwelipatton in forum Installation
    Replies: 10
    Last Post: 03-28-2006, 10:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •