changeset 19:854167f55839

Fix SRV record lookup Do not use a configuration file default value for port in order to detect when it is not set by the user so that SRV record lookup is triggered. Depend on version 0.8.1 of go.guido-berhoerster.org/managesieve which contains an additional necessary fix.
author Guido Berhoerster <guido+sievemgr@berhoerster.name>
date Wed, 03 Feb 2021 13:34:44 +0100
parents d14d93d011d7
children 4c3afbe3a152
files cmd/sievemgr/internal/config/config_test.go cmd/sievemgr/internal/config/parser.go go.mod go.sum
diffstat 4 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/cmd/sievemgr/internal/config/config_test.go	Tue Feb 02 23:57:37 2021 +0100
+++ b/cmd/sievemgr/internal/config/config_test.go	Wed Feb 03 13:34:44 2021 +0100
@@ -50,7 +50,7 @@
 	}
 	if conf.Accounts[0].Name != "foo" ||
 		conf.Accounts[0].Host != "imap.example.net" ||
-		conf.Accounts[0].Port != "4190" ||
+		conf.Accounts[0].Port != "" ||
 		conf.Accounts[0].User != "bar@example.net" ||
 		conf.Accounts[0].Password != "53cRe7" ||
 		conf.Accounts[0].Insecure {
--- a/cmd/sievemgr/internal/config/parser.go	Tue Feb 02 23:57:37 2021 +0100
+++ b/cmd/sievemgr/internal/config/parser.go	Wed Feb 03 13:34:44 2021 +0100
@@ -92,7 +92,6 @@
 			}
 			acct = &Account{
 				Name: lit,
-				Port: "4190",
 			}
 		case "default":
 			isDefault = true
--- a/go.mod	Tue Feb 02 23:57:37 2021 +0100
+++ b/go.mod	Wed Feb 03 13:34:44 2021 +0100
@@ -3,6 +3,6 @@
 go 1.14
 
 require (
-	go.guido-berhoerster.org/managesieve v0.8.0
+	go.guido-berhoerster.org/managesieve v0.8.1
 	golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf
 )
--- a/go.sum	Tue Feb 02 23:57:37 2021 +0100
+++ b/go.sum	Wed Feb 03 13:34:44 2021 +0100
@@ -2,6 +2,8 @@
 go.guido-berhoerster.org/managesieve v0.0.0-20201027164714-f9bb517e9447/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98=
 go.guido-berhoerster.org/managesieve v0.8.0 h1:MsFGL8llc0BVJM26CsivQajhF92TT1dRORuL9nrRv4k=
 go.guido-berhoerster.org/managesieve v0.8.0/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98=
+go.guido-berhoerster.org/managesieve v0.8.1 h1:DV2rT9U55dv1vlTuw+OSDCK1fhk86nPU7Fs0SK6kugA=
+go.guido-berhoerster.org/managesieve v0.8.1/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=