mail_auth/common/mod.rs
1/*
2 * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <hello@stalw.art>
3 *
4 * SPDX-License-Identifier: Apache-2.0 OR MIT
5 */
6
7use crate::{Error, IprevResult};
8
9pub mod auth_results;
10pub mod base32;
11pub mod cache;
12pub mod crypto;
13pub mod headers;
14pub mod message;
15pub mod parse;
16pub mod resolver;
17pub mod verify;
18
19impl From<Error> for IprevResult {
20 fn from(err: Error) -> Self {
21 if matches!(&err, Error::DnsError(_)) {
22 IprevResult::TempError(err)
23 } else {
24 IprevResult::PermError(err)
25 }
26 }
27}