@@ -441,9 +441,6 @@ pub(crate) struct ConfiguredLoginParam {
441
441
442
442
pub smtp_password : String ,
443
443
444
- /// Proxy configuration.
445
- pub proxy_config : Option < ProxyConfig > ,
446
-
447
444
pub provider : Option < & ' static Provider > ,
448
445
449
446
/// TLS options: whether to allow invalid certificates and/or
@@ -742,8 +739,6 @@ impl ConfiguredLoginParam {
742
739
} ] ;
743
740
}
744
741
745
- let proxy_config = ProxyConfig :: load ( context) . await ?;
746
-
747
742
Ok ( Some ( ConfiguredLoginParam {
748
743
addr,
749
744
imap,
@@ -754,7 +749,6 @@ impl ConfiguredLoginParam {
754
749
smtp_password : send_pw,
755
750
certificate_checks,
756
751
provider,
757
- proxy_config,
758
752
oauth2,
759
753
} ) )
760
754
}
@@ -837,11 +831,11 @@ impl ConfiguredLoginParam {
837
831
Ok ( ( ) )
838
832
}
839
833
840
- pub ( crate ) fn strict_tls ( & self ) -> bool {
834
+ pub ( crate ) fn strict_tls ( & self , connected_through_proxy : bool ) -> bool {
841
835
let provider_strict_tls = self . provider . map ( |provider| provider. opt . strict_tls ) ;
842
836
match self . certificate_checks {
843
837
ConfiguredCertificateChecks :: OldAutomatic => {
844
- provider_strict_tls. unwrap_or ( self . proxy_config . is_some ( ) )
838
+ provider_strict_tls. unwrap_or ( connected_through_proxy )
845
839
}
846
840
ConfiguredCertificateChecks :: Automatic => provider_strict_tls. unwrap_or ( true ) ,
847
841
ConfiguredCertificateChecks :: Strict => true ,
@@ -962,8 +956,6 @@ mod tests {
962
956
} ] ,
963
957
smtp_user : "" . to_string ( ) ,
964
958
smtp_password : "bar" . to_string ( ) ,
965
- // proxy_config is not saved by `save_to_database`, using default value
966
- proxy_config : None ,
967
959
provider : None ,
968
960
certificate_checks : ConfiguredCertificateChecks :: Strict ,
969
961
oauth2 : false ,
@@ -1066,7 +1058,6 @@ mod tests {
1066
1058
] ,
1067
1059
smtp_user : "[email protected] " . to_string ( ) ,
1068
1060
smtp_password : "foobarbaz" . to_string ( ) ,
1069
- proxy_config : None ,
1070
1061
provider : get_provider_by_id ( "posteo" ) ,
1071
1062
certificate_checks : ConfiguredCertificateChecks :: Strict ,
1072
1063
oauth2 : false ,
0 commit comments