It would be nice if every package instance could define its own prefixes to listen to. Like what acs mail lite and notifications do now.
But if we allow that it would leed to the following problem:
- the parameter is set on the package instance level, how does acs mail lite find that out
- for each prefix an entry in /etc/postfix/virtual is required. Should acs mail lite be allowed to create these entries
Another question is if you have a single mail server but several oacs sites running, how do you make sure that the right site gets the email forwarded by postfix.
I personally would recommend not to do that on instance level. Instead since each package interested in processing incoming emails has to provide an implementation for the callback I would go for a standard rule. Any of these packages are required to send out the From or Reply-To header like this:
mailto:impl_name-whatever@myhost.com
So the sweeper in acs mail lite will extract the impl_name which is equal to the name of the callback implementation and and call the corresponding proc to process the email.
Also Dave recommended since you can have a single mail server multiple site instances scenario to go for something like this:
mailto:sitetoken-impl_name-whatever@myhost.com
For each sitetoken there is an entry in the postfix configuration. Thus postfix would forward always to the correct site instance.
Note: "whatever" is all that a package can define required to process the email correctly and is therefore package specific.
With this solution we wouldn't need packages to register/unregister prefixes.
Any comments?