Increase connection timeout
This commit is contained in:
parent
abb905cbd0
commit
e9d5124a26
2 changed files with 15 additions and 2 deletions
|
@ -1,5 +1,13 @@
|
|||
# SpamAssassin Milter changelog
|
||||
|
||||
## 0.3.1 (unreleased)
|
||||
|
||||
### Fixed
|
||||
|
||||
* The milter’s connection timeout duration has been increased substantially. The
|
||||
previously used duration of five minutes turned out to be too short for some
|
||||
slow SMTP conversations.
|
||||
|
||||
## 0.3.0 (2022-03-08)
|
||||
|
||||
In this release, the milter implementation has been replaced with the new
|
||||
|
|
|
@ -17,7 +17,7 @@ mod error;
|
|||
|
||||
pub use crate::config::{Config, ConfigBuilder};
|
||||
use indymilter::IntoListener;
|
||||
use std::{future::Future, io};
|
||||
use std::{future::Future, io, time::Duration};
|
||||
|
||||
/// The name of the SpamAssassin Milter application.
|
||||
pub const MILTER_NAME: &str = "SpamAssassin Milter";
|
||||
|
@ -56,7 +56,12 @@ pub async fn run(
|
|||
shutdown: impl Future,
|
||||
) -> io::Result<()> {
|
||||
let callbacks = callbacks::make_callbacks(config);
|
||||
let config = Default::default();
|
||||
|
||||
// Override default timeout, which is too short in practice.
|
||||
let config = indymilter::Config {
|
||||
connection_timeout: Duration::from_secs(7210),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
indymilter::run(listener, callbacks, config, shutdown).await
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue