POSTFIX Show Mail Error-Log after ISPCONFIG 3 update (maybe)

Discussion in 'Server Operation' started by FFG28, Oct 17, 2019.

  1. FFG28

    FFG28 Member

    Good Day:

    I just updated to 3.1.15p2 and have recently noticed the following constant error on my Mail Error-Log in ISPCONFIG3

    Code:
    Oct 17 06:30:01 mail postfix/smtpd[32516]: fatal: cannot handle socket type AF_INET6 with "inet_protocols = ipv4"
    I still have SMTP working though (or it appears to be working - emails do come in and go out), and I say "MAYBE" because I also did change the following code on etc/postfix/main.cf

    Code:
    inet_protocols = all
    to

    Code:
    inet_protocols = ipv4
    I did the above because "user: electronico_nc" mentioned that Ispconfig updates always rewrites the Postfix config from "inet_protocols = ipv4" to "inet_protocols = all" concerning an issue that I had back then, although I do recognize that the issue was related to something else.

    https://www.howtoforge.com/communit...s-ubuntu-18-perfect-server.80717/#post-382764

    My question know is:

    Should I pay attention to the FATAL ERROR
    Should I change "inet_protocols = ipv4" back to "inet_protocols = all"

    Please Advise

    Cheers
     
  2. Steini86

    Steini86 Active Member

    If not specified, postfix uses the IP addresses in /etc/hosts to bind to. It seems, like you have an IPv6 address assigned to localhost there. Therefore, postfix tries to bind to this IPv6 address, which gives an error, because of your restriction to IPv4 only. So you have two options:
    1) Explicitly specify the IP address postfix should listen to with "inet_interfaces = <IP's>" in your main.cf
    2) Activate IPv6 by changing back to "inet_protocols = all"

    Option 1 is the one to get a working system fast, option 2 is the one for the future. You should have IPv6 working for your server, when doing that ;-)
     
    FFG28 likes this.
  3. FFG28

    FFG28 Member

    Thank you Steini86
    so I checked etc/hosts and it shows the following:

    Code:
    127.0.0.1       localhost
    myIPV4 ipnumber     myFQDN     myHostname
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    and in postfix/main.cf

    Code:
    inet_interfaces = all
    Should I only put the IP in MAIN.CF or change something else in HOSTS as well

    Thank you for the help

    Cheers
     
  4. Steini86

    Steini86 Active Member

    It depends on what you want. You have not specified this. You just asked, what you should do but not what you want to achieve.
    If you want your mail server to be available by IPv4 and IPv6, you have to set "inet_protocols = all" and should be all good.

    http://www.postfix.org/IPV6_README.html
     
    FFG28 likes this.
  5. FFG28

    FFG28 Member

    Good Day:

    To your question. I would like to have a fully capable server that can send from IPV4 clients (all my clients are IPV4), but could receive from all posible scenarios if possible or recommended (if I understand correctly, you are saying that Is ok to leave it as it is for IPV4 and IPV6 mail receipts). As yo can see I'm sort of confused on this part.

    Mostly my concern was the FATAL ERROR. Hopefully I did explain myself
     
  6. Steini86

    Steini86 Active Member

    Well, your error should be gone when you set "inet_protocols = all".
     
    FFG28 likes this.
  7. FFG28

    FFG28 Member

    Done

    Thankyou for the help
     
    Steini86 likes this.
  8. FFG28

    FFG28 Member

    I I were to use the IPV4 setting, what would be the correct way of doing inet_interfaces for my etc/hosts config

    Loop back IP or Host IP?
     
  9. FFG28

    FFG28 Member

    Already tried Loopback only and did not work. Doing Host IP and it started working. Would appreciate to know why one works and not the other given that my understanding is that the Loop back should point to the host IP.

    What am I seeing wrong?

    BTW, the reason of the change is that I started seeing an error related to the dovecot DataBase and wanted to check if it was related
     
  10. FFG28

    FFG28 Member

    Just to follow up. I did went back to "inet_protocols = all" and "inet_interfaces = all". Bunch of errors started popping out on the Logs with the previous test. I assume from not readjusting the etc/hosts config.

    POSTFIX is working now with no errors.

    Thank for the help.
     
  11. Steini86

    Steini86 Active Member

    Your server has several IP interfaces. This settings tells the postfix server, on which interface it should listen for incoming packets. If you set it to the loopback interface, it listens to requests coming from its own network interface. Therefore, it stopped working for everyone else. If you set it to ALL, then postfix is listening to packages on all interfaces. For the usual server setup, this is the way to go.

    It seems you are changing settings until something is working by chance and you do not understand what you are doing. I strongly recommend reading the manual!
    A server in the internet is nothing one should learn by doing, but learn by reading the manual first!
     
    FFG28 likes this.
  12. FFG28

    FFG28 Member

    Thank you. I’ll follow your recommendation

    Cheers
     
    Steini86 likes this.

Share This Page