Removed term 'whitelist'
This commit is contained in:
parent
19ebd247f7
commit
5ac1425b44
4 changed files with 7 additions and 7 deletions
|
@ -6,7 +6,7 @@ pub struct Config {
|
|||
pub bind_address: Option<String>,
|
||||
pub bind_port: Option<String>,
|
||||
pub client_storage_path: Option<String>,
|
||||
pub receiver_whitelist: Option<Vec<String>>,
|
||||
pub allowed_receivers: Option<Vec<String>>,
|
||||
pub clients: Vec<ClientConfig>,
|
||||
pub mappings: Vec<Mapping>,
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ async fn main() {
|
|||
|
||||
let service = SmtpService::create(format!("{}:{}", config.bind_address.unwrap(), config.bind_port.unwrap()).parse().unwrap(), "matrixmailer".into(),
|
||||
Arc::new(ToMatrixConverter {
|
||||
receiver_whitelist: config.receiver_whitelist,
|
||||
allowed_receivers: config.allowed_receivers,
|
||||
matrix_clients: clients,
|
||||
mappings: config.mappings,
|
||||
}));
|
||||
|
@ -32,7 +32,7 @@ struct ToMatrixConverter {
|
|||
// If None, any incoming mail will be accepted.
|
||||
// If Some(x), any mail with a mail address in x in its recipients will be accepted.
|
||||
// "Not accepted" means the sender will get a "RCPT failed" reply
|
||||
receiver_whitelist: Option<Vec<String>>,
|
||||
allowed_receivers: Option<Vec<String>>,
|
||||
matrix_clients: Vec<Client>,
|
||||
mappings: Vec<Mapping>,
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ struct ToMatrixConverter {
|
|||
impl Handler for ToMatrixConverter {
|
||||
// Checks whether receipient is local (and the mail should thus be handled by this service)
|
||||
async fn recipient_local(&self, recipient: &Mailbox) -> bool {
|
||||
match &self.receiver_whitelist {
|
||||
match &self.allowed_receivers {
|
||||
None => true,
|
||||
Some(list) => {
|
||||
let addr = format!("{}@{}", recipient.local, recipient.domain.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue