Russ Allbery writes:
> Doesn't Postfix also behave in the same way? Seems to me that pretty much
> any MTA whose port 25 listener is running unprivileged is going to have
> the same problem
I don't think so.
getpwnam() will tell you if a userid is valid, or not, no matter what
userid you're running as.
> unless you want to periodically build a database of valid
> addresses or require that all information necessary to determine whether a
> given address is valid be world-readable on the system.
Well, it is: /etc/passwd is world readable.
Now, for Qmail, there's also an issue of dot-qmail files. Well, let's say
that I've been there and done that, and brought back pictures. These kinds
of things are very much possible.
At the very least, you can attempt to stat the .qmail file, and return an
invalid user if it fails with ENOENT. You can differentiate between that,
and EPERM, which you'll get if the home directory is not globally
executable.
--
Sam