Mercurial > masqmail
diff src/deliver.c @ 317:55b7bde95d37
reworked allowed and denied addrs for routes
The following refactorings had been made:
- allowed_mail_locals + allowed_return_paths -> allowed_senders
- not_allowed_mail_locals + not_allowed_return_paths -> denied_senders
- allowed_rcpt_domains -> allowed_recipients
- not_allowed_rcpt_domains -> denied_recipients
The new options allow more consistent and more flexible matching.
author | meillo@marmaro.de |
---|---|
date | Thu, 28 Apr 2011 09:55:06 +0200 |
parents | c98aa884d2cb |
children | 412385b57dc4 |
line wrap: on
line diff
--- a/src/deliver.c Mon Apr 25 15:17:30 2011 +0200 +++ b/src/deliver.c Thu Apr 28 09:55:06 2011 +0200 @@ -560,21 +560,21 @@ continue; } - /* filter by allowed return paths (= envelope sender) */ - if (!route_is_allowed_mail_local(route, msgout->msg->return_path) - || !route_is_allowed_return_path(route, msgout->msg->return_path)) { + /* filter by allowed envelope sender */ + if (!route_sender_is_allowed(route, msgout->msg->return_path)) { destroy_msg_out(msgout_cloned); continue; } - /* filter by allowed rcpt addrs (= envelope rcpts) */ - GList *rcpt_list_allowed = NULL, *rcpt_list_notallowed = NULL; - msg_rcptlist_route(route, msgout_cloned->rcpt_list, &rcpt_list_allowed, &rcpt_list_notallowed); - + /* filter by allowed envelope rcpts */ + GList* rcpt_list_allowed = NULL; + GList* rcpt_list_notallowed = NULL; + route_split_rcpts(route, msgout_cloned->rcpt_list, &rcpt_list_allowed, &rcpt_list_notallowed); if (!rcpt_list_allowed) { destroy_msg_out(msgout_cloned); continue; } + logwrite(LOG_NOTICE, "%s using '%s'\n", msgout->msg->uid, route->name); g_list_free(msgout_cloned->rcpt_list);