File tree Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ impl FormHandler for Server {
101
101
if let Some ( domain) = from_email. rsplit_once ( '@' ) . and_then ( |( local, domain) | {
102
102
if !local. is_empty ( )
103
103
&& domain. contains ( '.' )
104
- && psl:: suffix ( domain. as_bytes ( ) ) . is_some ( )
104
+ && psl:: domain ( domain. as_bytes ( ) ) . is_some_and ( |d| d . suffix ( ) . typ ( ) . is_some ( ) )
105
105
{
106
106
Some ( domain)
107
107
} else {
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ impl<T: SessionStream> Session<T> {
204
204
SpanId = self . data. session_id,
205
205
) ;
206
206
207
- self . write ( b"421 4.3.0 Too many authentication errors, disconnecting.\r \n " )
207
+ self . write ( b"455 4.3.0 Too many authentication errors, disconnecting.\r \n " )
208
208
. await ?;
209
209
Err ( ( ) )
210
210
}
Original file line number Diff line number Diff line change @@ -850,7 +850,7 @@ impl<T: SessionStream> Session<T> {
850
850
Limit = self . data. messages_sent
851
851
) ;
852
852
853
- self . write ( b"451 4.4.5 Maximum number of messages per session exceeded.\r \n " )
853
+ self . write ( b"452 4.4.5 Maximum number of messages per session exceeded.\r \n " )
854
854
. await ?;
855
855
Ok ( false )
856
856
}
Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ impl<T: SessionStream> Session<T> {
513
513
) ;
514
514
515
515
self . data . mail_from = None ;
516
- self . write ( b"451 4.4.5 Rate limit exceeded, try again later.\r \n " )
516
+ self . write ( b"452 4.4.5 Rate limit exceeded, try again later.\r \n " )
517
517
. await
518
518
}
519
519
}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ impl<T: SessionStream> Session<T> {
50
50
SpanId = self . data. session_id,
51
51
Limit = self . params. rcpt_max,
52
52
) ;
53
- return self . write ( b"451 4.5.3 Too many recipients.\r \n " ) . await ;
53
+ return self . write ( b"455 4.5.3 Too many recipients.\r \n " ) . await ;
54
54
}
55
55
56
56
// Verify parameters
@@ -347,7 +347,7 @@ impl<T: SessionStream> Session<T> {
347
347
return self
348
348
. write (
349
349
concat ! (
350
- "422 4.2.2 Greylisted, please try " ,
350
+ "452 4.2.2 Greylisted, please try " ,
351
351
"again in a few moments.\r \n "
352
352
)
353
353
. as_bytes ( ) ,
@@ -385,7 +385,7 @@ impl<T: SessionStream> Session<T> {
385
385
386
386
self . data . rcpt_to . pop ( ) ;
387
387
return self
388
- . write ( b"451 4.4.5 Rate limit exceeded, try again later.\r \n " )
388
+ . write ( b"452 4.4.5 Rate limit exceeded, try again later.\r \n " )
389
389
. await ;
390
390
}
391
391
@@ -448,7 +448,7 @@ impl<T: SessionStream> Session<T> {
448
448
if !has_too_many_errors {
449
449
self . write ( response) . await
450
450
} else {
451
- self . write ( b"421 4.3.0 Too many errors, disconnecting.\r \n " )
451
+ self . write ( b"451 4.3.0 Too many errors, disconnecting.\r \n " )
452
452
. await ?;
453
453
Err ( ( ) )
454
454
}
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ impl<T: SessionStream> Session<T> {
169
169
}
170
170
} else if bytes_read > self . data. bytes_left {
171
171
self
172
- . write( format!( "451 4.7.28 {} Session exceeded transfer quota.\r \n " , self . hostname) . as_bytes( ) )
172
+ . write( format!( "452 4.7.28 {} Session exceeded transfer quota.\r \n " , self . hostname) . as_bytes( ) )
173
173
. await
174
174
. ok( ) ;
175
175
@@ -181,7 +181,7 @@ impl<T: SessionStream> Session<T> {
181
181
break ;
182
182
} else {
183
183
self
184
- . write( format!( "453 4.3.2 {} Session open for too long.\r \n " , self . hostname) . as_bytes( ) )
184
+ . write( format!( "421 4.3.2 {} Session open for too long.\r \n " , self . hostname) . as_bytes( ) )
185
185
. await
186
186
. ok( ) ;
187
187
@@ -246,7 +246,7 @@ impl<T: SessionStream> Session<T> {
246
246
Reason = "Server shutting down" ,
247
247
CausedBy = trc:: location!( )
248
248
) ;
249
- self . write( b "421 4.3.0 Server shutting down.\r \n ") . await . ok( ) ;
249
+ self . write( format! ( "421 4.3.0 {} Server shutting down.\r \n " , self . hostname ) . as_bytes ( ) ) . await . ok( ) ;
250
250
break ;
251
251
}
252
252
} ;
You can’t perform that action at this time.
0 commit comments