cmail-mta / cmail

SQLite-backed mail processing suite
BSD 2-Clause "Simplified" License
50 stars 2 forks source link

Variable support in forward router argument #23

Closed cbdevnet closed 9 years ago

cbdevnet commented 9 years ago

(from-local) -> replace with local part of ENVELOPE-FROM (from-domain) -> replace with domain part of ENVELOPE-FROM (to-local) -> replace with local part of ENVELOPE-TO (to-domain) -> replace with domain part of ENVELOPE-TO

This would mainly imply fleshing out the router at https://github.com/cmail-mta/cmail/blob/master/cmail-smtpd/route.c#L123 a bit.

cbdevnet commented 9 years ago

This is actually a bit more involved, since it also involves modifying the path parser to remove all comments from user-supplied data to prevent potentially exploitable behaviour as well as implementing string substitution methods. The former has already been implemented, the latter is in the works.

cbdevnet commented 9 years ago

Implemented in d36a523305a9376b2f105e89965f0c175144bf63