projects/sievemgr

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 Feb 03 13:34:44 2021 +0100 (7 months ago)
parents d14d93d011d7
children 4c3afbe3a152
files cmd/sievemgr/internal/config/config_test.go cmd/sievemgr/internal/config/parser.go go.mod go.sum
line diff
     1.1 --- a/cmd/sievemgr/internal/config/config_test.go	Tue Feb 02 23:57:37 2021 +0100
     1.2 +++ b/cmd/sievemgr/internal/config/config_test.go	Wed Feb 03 13:34:44 2021 +0100
     1.3 @@ -50,7 +50,7 @@
     1.4  	}
     1.5  	if conf.Accounts[0].Name != "foo" ||
     1.6  		conf.Accounts[0].Host != "imap.example.net" ||
     1.7 -		conf.Accounts[0].Port != "4190" ||
     1.8 +		conf.Accounts[0].Port != "" ||
     1.9  		conf.Accounts[0].User != "bar@example.net" ||
    1.10  		conf.Accounts[0].Password != "53cRe7" ||
    1.11  		conf.Accounts[0].Insecure {
     2.1 --- a/cmd/sievemgr/internal/config/parser.go	Tue Feb 02 23:57:37 2021 +0100
     2.2 +++ b/cmd/sievemgr/internal/config/parser.go	Wed Feb 03 13:34:44 2021 +0100
     2.3 @@ -92,7 +92,6 @@
     2.4  			}
     2.5  			acct = &Account{
     2.6  				Name: lit,
     2.7 -				Port: "4190",
     2.8  			}
     2.9  		case "default":
    2.10  			isDefault = true
     3.1 --- a/go.mod	Tue Feb 02 23:57:37 2021 +0100
     3.2 +++ b/go.mod	Wed Feb 03 13:34:44 2021 +0100
     3.3 @@ -3,6 +3,6 @@
     3.4  go 1.14
     3.5  
     3.6  require (
     3.7 -	go.guido-berhoerster.org/managesieve v0.8.0
     3.8 +	go.guido-berhoerster.org/managesieve v0.8.1
     3.9  	golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf
    3.10  )
     4.1 --- a/go.sum	Tue Feb 02 23:57:37 2021 +0100
     4.2 +++ b/go.sum	Wed Feb 03 13:34:44 2021 +0100
     4.3 @@ -2,6 +2,8 @@
     4.4  go.guido-berhoerster.org/managesieve v0.0.0-20201027164714-f9bb517e9447/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98=
     4.5  go.guido-berhoerster.org/managesieve v0.8.0 h1:MsFGL8llc0BVJM26CsivQajhF92TT1dRORuL9nrRv4k=
     4.6  go.guido-berhoerster.org/managesieve v0.8.0/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98=
     4.7 +go.guido-berhoerster.org/managesieve v0.8.1 h1:DV2rT9U55dv1vlTuw+OSDCK1fhk86nPU7Fs0SK6kugA=
     4.8 +go.guido-berhoerster.org/managesieve v0.8.1/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98=
     4.9  golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
    4.10  golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
    4.11  golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=