local stanza only generated for IPv6
    Jeremy Ardley 
    jeremy at ardley.org
       
    Wed Jul  1 13:15:24 EEST 2020
    
    
  
Further to my report on stanzas being only generated the IPv6 addresses
I have found a work-around until someone in the development team comes
up with something like inet_listener_6 and inet_listener_4
The workaround is simply to get dovecot to listen in IPv4 and IPv6. It
has no effect on clients who will use ordinary MX records to access the
normal mailserver name
The workaround requires modifying DNS with duplicate A and AAAA records
(not CNAME or ALIAS) for the addresses of interest. So in the instance
of one domain:
mail    A       192.168.0.1
        AAAA    2001:0db8:85a3:0000:0000:8a2e:0370:7334
mail4   A       192.168.0.1
mail6   AAAA    2001:0db8:85a3:0000:0000:8a2e:0370:7334
Then the dovecot.conf file requires multiple local stanzas. In this case
two domains requires four stanzas
listen =
mail4.example.com,mail6.example.com,mail4.example2.com,mail6.example2.com,localhost
protocols = imap lmtp sieve
ssl_min_protocol = TLSv1.2
ssl_cipher_list = EECDH+AESGCM:EDH+AESGCM
ssl_prefer_server_ciphers = yes
local mail4.example.com {
  protocol imap {
     ssl_cert = </etc/letsencrypt/live/mail.example.com/fullchain.pem
     ssl_key = </etc/letsencrypt/live/mail.example.com/privkey.pem
     service imaps_login_4 {
       inet_listener imaps {
         address=mail4.example.com
       }
       inet_listener imap {
         address=mail4.example.com
       }
     }
  }
}
local mail6.example.com {
  protocol imap {
     ssl_cert = </etc/letsencrypt/live/mail.example.com/fullchain.pem
     ssl_key = </etc/letsencrypt/live/mail.example.com/privkey.pem
     service imaps_login_6 {
       inet_listener imaps {
         address=mail6.example.com
       }
       inet_listener imap {
         address=mail6.example.com
       }
     }
  }
}
local mail4.example2.com {
  protocol imap {
    ssl_cert = </etc/letsencrypt/live/example2.com/fullchain.pem
    ssl_key = </etc/letsencrypt/live/example2.com/privkey.pem
    service imaps_login_44 {
      inet_listener imaps {
         address = mail4.example2.com
      }
      inet_listener imap {
         address = mail4.example2.com
      }
    }
  }
}
local mail6.example2.com {
  protocol imap {
    ssl_cert = </etc/letsencrypt/live/example2.com/fullchain.pem
    ssl_key = </etc/letsencrypt/live/example2.com/privkey.pem
    service imaps_login_66 {
      inet_listener imaps {
         address = mail6.example2.com
      }
      inet_listener imap {
         address = mail6.example2.com
      }
    }
  }
}
    
    
More information about the dovecot
mailing list