Check keys at least every 3 hours
Doing so will permit to regularly populate the revocation file with the new entries.
This commit is contained in:
parent
d8e668916d
commit
4164274ad2
2 changed files with 3 additions and 2 deletions
|
@ -46,9 +46,9 @@ pub async fn key_rotation(db: &SqlitePool, cnf: &Config) -> Duration {
|
|||
durations.push(d);
|
||||
}
|
||||
}
|
||||
durations.push(Duration::from_secs(crate::KEY_CHECK_MIN_DELAY));
|
||||
durations.sort();
|
||||
durations.reverse();
|
||||
durations.pop().unwrap_or(Duration::from_secs(3600))
|
||||
durations[durations.len() - 1]
|
||||
}
|
||||
|
||||
async fn renew_key_if_expired(
|
||||
|
|
|
@ -36,6 +36,7 @@ const DEFAULT_CNF_KEY_DB: &str = "key-db.sqlite3";
|
|||
const DEFAULT_CNF_REVOCATION: u64 = 1728000;
|
||||
const DEFAULT_LIB_DIR: &str = env!("VARLIBDIR");
|
||||
const DEFAULT_MSG_SIZE: usize = 1024 * 1024;
|
||||
const KEY_CHECK_MIN_DELAY: u64 = 60 * 60 * 3;
|
||||
const LOG_LEVEL_ENV_VAR: &str = "OPENSMTPD_FILTER_DKIMOUT_LOG_LEVEL";
|
||||
|
||||
#[macro_export]
|
||||
|
|
Loading…
Reference in a new issue