mirror of
https://github.com/chatmail/relay.git
synced 2026-09-05 15:03:14 +00:00
chore(tests): Add a way to disable DKIM for tests (#50)
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
committed by
GitHub
parent
4eb7e9fd63
commit
6e2a37956c
+10
-1
@@ -96,9 +96,18 @@ async fn main() {
|
||||
process::exit(1);
|
||||
}
|
||||
} else {
|
||||
// Skip DKIM verification (used for tests).
|
||||
let skip_dkim = env::var("FILTERMAIL_SKIP_DKIM")
|
||||
.map(|val| val == "1" || val.eq_ignore_ascii_case("true"))
|
||||
.unwrap_or(false);
|
||||
|
||||
if skip_dkim {
|
||||
log::warn!("DKIM verification DISABLED! This should not be used in production.");
|
||||
}
|
||||
|
||||
let handler = Arc::new(
|
||||
// We want to panic here if the handler cannot be created.
|
||||
IncomingBeforeQueueHandler::new(config.clone()).unwrap(),
|
||||
IncomingBeforeQueueHandler::new(config.clone(), skip_dkim).unwrap(),
|
||||
);
|
||||
let addr = format!("127.0.0.1:{}", config.filtermail_smtp_port_incoming);
|
||||
let max_size = config.max_message_size;
|
||||
|
||||
Reference in New Issue
Block a user