Support for external email addresses on mailing lists (closes #152)
This commit is contained in:
@@ -482,6 +482,7 @@ impl SmtpConnection {
|
||||
//let c = println!("-> {:?}", text);
|
||||
self.writer.write_all(text.as_bytes()).await.unwrap();
|
||||
self.writer.write_all(b"\r\n").await.unwrap();
|
||||
self.writer.flush().await.unwrap();
|
||||
}
|
||||
|
||||
pub async fn send_raw(&mut self, text: &str) {
|
||||
|
||||
@@ -80,6 +80,7 @@ test
|
||||
|
||||
pub async fn test(params: &mut JMAPTest) {
|
||||
// Enable Enterprise
|
||||
println!("Running Enterprise tests...");
|
||||
let mut core = params.server.inner.shared_core.load_full().as_ref().clone();
|
||||
let mut config = Config::new(METRICS_CONFIG).unwrap();
|
||||
core.enterprise = Enterprise {
|
||||
|
||||
@@ -343,7 +343,7 @@ type = "console"
|
||||
level = "{LEVEL}"
|
||||
multiline = false
|
||||
ansi = true
|
||||
disabled-events = ["network.*", "telemetry.webhook-error"]
|
||||
disabled-events = ["network.*", "telemetry.webhook-error", "http.request-body"]
|
||||
|
||||
[webhook."test"]
|
||||
url = "http://127.0.0.1:8821/hook"
|
||||
@@ -370,8 +370,8 @@ pub async fn jmap_tests() {
|
||||
)
|
||||
.await;
|
||||
|
||||
/*webhooks::test(&mut params).await;
|
||||
email_query::test(&mut params, delete).await;
|
||||
webhooks::test(&mut params).await;
|
||||
/*email_query::test(&mut params, delete).await;
|
||||
email_get::test(&mut params).await;
|
||||
email_set::test(&mut params).await;
|
||||
email_parse::test(&mut params).await;
|
||||
@@ -384,9 +384,9 @@ pub async fn jmap_tests() {
|
||||
mailbox::test(&mut params).await;
|
||||
delivery::test(&mut params).await;
|
||||
auth_acl::test(&mut params).await;
|
||||
auth_limits::test(&mut params).await;*/
|
||||
auth_limits::test(&mut params).await;
|
||||
auth_oauth::test(&mut params).await;
|
||||
/*event_source::test(&mut params).await;
|
||||
event_source::test(&mut params).await;
|
||||
push_subscription::test(&mut params).await;
|
||||
sieve_script::test(&mut params).await;
|
||||
vacation_response::test(&mut params).await;
|
||||
@@ -396,8 +396,8 @@ pub async fn jmap_tests() {
|
||||
crypto::test(&mut params).await;
|
||||
blob::test(&mut params).await;
|
||||
permissions::test(¶ms).await;
|
||||
purge::test(&mut params).await;
|
||||
enterprise::test(&mut params).await;*/
|
||||
purge::test(&mut params).await;*/
|
||||
enterprise::test(&mut params).await;
|
||||
|
||||
if delete {
|
||||
params.temp_dir.delete();
|
||||
|
||||
@@ -414,7 +414,10 @@ pub async fn test(params: &JMAPTest) {
|
||||
"/api/principal",
|
||||
&Principal::new(u32::MAX, Type::Individual)
|
||||
.with_field(PrincipalField::Name, "john@foobar.org")
|
||||
.with_field(PrincipalField::Roles, vec!["admin".to_string()])
|
||||
.with_field(
|
||||
PrincipalField::Roles,
|
||||
vec!["tenant-admin".to_string(), "user".to_string()],
|
||||
)
|
||||
.with_field(
|
||||
PrincipalField::Secrets,
|
||||
PrincipalValue::String("tenantpass".to_string()),
|
||||
@@ -571,7 +574,7 @@ pub async fn test(params: &JMAPTest) {
|
||||
[
|
||||
(
|
||||
PrincipalField::Roles,
|
||||
&["admin", "no-mail-for-you@foobar.com"][..],
|
||||
&["tenant-admin", "no-mail-for-you@foobar.com", "user"][..],
|
||||
),
|
||||
(PrincipalField::Members, &[][..]),
|
||||
(PrincipalField::EnabledPermissions, &[][..]),
|
||||
|
||||
Reference in New Issue
Block a user