mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-11-17 14:19:21 +08:00
Do not panic when report hash = 0 (#60)
This commit is contained in:
parent
426c073b25
commit
79599f2f9c
1 changed files with 9 additions and 10 deletions
|
|
@ -205,16 +205,15 @@ impl SMTP {
|
||||||
.eval(&RecipientDomain::new(domain))
|
.eval(&RecipientDomain::new(domain))
|
||||||
.await
|
.await
|
||||||
.clone();
|
.clone();
|
||||||
path.push(
|
let hash = *self
|
||||||
(policy
|
.report
|
||||||
% *self
|
.config
|
||||||
.report
|
.hash
|
||||||
.config
|
.eval(&RecipientDomain::new(domain))
|
||||||
.hash
|
.await;
|
||||||
.eval(&RecipientDomain::new(domain))
|
if hash > 0 {
|
||||||
.await)
|
path.push((policy % hash).to_string());
|
||||||
.to_string(),
|
}
|
||||||
);
|
|
||||||
let _ = fs::create_dir(&path).await;
|
let _ = fs::create_dir(&path).await;
|
||||||
|
|
||||||
// Build filename
|
// Build filename
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue