File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,6 @@ module.exports = function (options) {
160160 let parts ;
161161 let cmd ;
162162 let upgraded = false ;
163- let hellod = false ;
164163
165164 /*
166165 if(mail.user && mail.pass){
@@ -184,7 +183,7 @@ module.exports = function (options) {
184183 case 220 :
185184 //* 220 on server ready
186185 //* 220 服务就绪
187- if ( / \b G o a h e a d \b / i . test ( msg ) || / \b T L S \b / i . test ( msg ) || hellod ) {
186+ if ( upgraded === "in-progress" ) {
188187 sock . removeAllListeners ( 'data' ) ;
189188
190189 let original = sock ;
@@ -234,7 +233,6 @@ module.exports = function (options) {
234233 cmd = 'HELO'
235234 }
236235 w ( cmd + ' ' + srcHost ) ;
237- hellod = true ;
238236 break ;
239237 }
240238
@@ -246,6 +244,7 @@ module.exports = function (options) {
246244 if ( upgraded != true ) {
247245 if ( / \b S T A R T T L S \b / i. test ( msg ) ) {
248246 w ( 'STARTTLS' ) ;
247+ upgraded = "in-progress" ;
249248 } else {
250249 upgraded = true ;
251250 }
You can’t perform that action at this time.
0 commit comments