Once upon a time, Tom Hendrikx <tom@whyscream.net> said:
You could drop the default realm completely, and create a second passdb lookup which uses only the username part to lookup credentials. This means that, as long as you have no conflicts as usernames 'john@foo.com' vs 'john@bar.com', you'd be able to support username 'john'.
The domains I need to handle are separate telephone company ISPs, so they all want common things like "sales", so that won't work.
All my users are in MySQL. Reading the docs, I see that "%l" expands to the local IP address "almost everywhere". If that's available in the userdb SQL expansion, I could write a (somewhat convoluted) SQL statement that adds a domain based on the local IP. Does that sound like it'll work? Not quite as "elegant" as just setting auth_default_realm in separate listeners, but should work I guess.
-- Chris Adams <cma@cmadams.net>