mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-05 05:57:39 +03:00
Rename modules and introduce namespace-aware module name lookups
See #248.
This commit is contained in:
parent
4ea9f1eef7
commit
03d9e52627
44 changed files with 184 additions and 123 deletions
|
@ -41,7 +41,7 @@ func NewReplaceAddr(modName, instName string, _, inlineArgs []string) (module.Mo
|
|||
}
|
||||
|
||||
func (r *replaceAddr) Init(cfg *config.Map) error {
|
||||
return modconfig.ModuleFromNode(r.inlineArgs, cfg.Block, cfg.Globals, &r.table)
|
||||
return modconfig.ModuleFromNode("table", r.inlineArgs, cfg.Block, cfg.Globals, &r.table)
|
||||
}
|
||||
|
||||
func (r replaceAddr) Name() string {
|
||||
|
@ -122,6 +122,8 @@ func (r replaceAddr) rewrite(val string) (string, error) {
|
|||
}
|
||||
|
||||
func init() {
|
||||
module.Register("replace_sender", NewReplaceAddr)
|
||||
module.Register("replace_rcpt", NewReplaceAddr)
|
||||
module.Register("modify.replace_sender", NewReplaceAddr)
|
||||
module.RegisterDeprecated("replace_sender", "modify.replace_sender", NewReplaceAddr)
|
||||
module.Register("modify.replace_rcpt", NewReplaceAddr)
|
||||
module.RegisterDeprecated("replace_rcpt", "modify.replace_rcpt", NewReplaceAddr)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue