Let's say I wanted to compile voicemail greetings for a fun project which may be put online. The voicemails would be of school district administrators from their office phone numbers. Would the practice of recording the greetings be illegal? What about posting them online?
A voicemail greeting, like any original sequence of words, will be protected by copyright. Making and publishing a copy without permission would be an infringement of that copyright, and could subject the person who does it to a civil lawsuit.
However, such a greeting normally has no commercial value, and it is hard to see how any actual damages could be assessed. In the US, statutory damages could apply, but since the greeting is unlikely to carry a copyright notice, the person sued might claim to be an "innocent infringer", which could significantly reduce the damages assessed. (However if such a person had read this answer, and that were brought out in court, s/he would be on notice of the copyright protection, and could not claim to be "innocent".)
Moreover, the defendant could still raise the defense of fair-use (In the US). The would be no harm to the market for the work, since there is no market, which would favor fair use. The whole of the work would probably be used, which would tend against fair use. A greeting is somewhat creative, more so than a work of non-fiction, although usually less so than actual fiction or verse, which leans slightly against fair use. It is hard to say if this kind of reuse would be considered transformative, it would probably depend on what sort of commentary, if any, was provided. In all, a fair use defense seems pretty close to a coin flip, but not as predictable.
In any case, judges often do not favor suits over technical infringements of works with no commercial value where no meaningful damage has occurred, and often award minimal damages within the statutory range, which is wide.
Given all that, the risk of suit seems low. The question mentions "school district administrators" If the person doing this is a student, this might be looked on negatively by the school district, which might be able to frame it as against some district policy or other. Consider possible repercussions carefully.
As always on Law.SE, this is not legal advice. Before acting you may wish to consult an actual lawyer.
If there's any originality in the greetings, they're copyrightable, and hence copyrighted. That means that further reproduction without permission is unlawful.
One of the people who made a greeting could conceivably file suit against you in Federal court. Damages would be minimal, unless whoever registered a copyright, but the court decision could include an injunction against further use. To me, filing suit seems like an awful lot of time, money, and hassle to achieve that, but not everybody may feel that way.
You speak of putting the project online. In that case, anyone whose copyrighted work was used can send a DMCA takedown notice, which is likely to get your project removed from its hosting site. Filing one of those is a lot cheaper than a Federal case.
Would the practice of recording the greetings be illegal? What about posting them online?
Based on the information and your comments, I see no issues from legal or ethical standpoints.
A voicemail greeting is a message that a person intends to transmit to others (in general, to the public), with full awareness that the timing and recipients of the transmission are uncertain/unpredictable and beyond that person's control.
The possibility of triggering a reproduction of the recording through methods other than the dialing of that person's phone number does not by itself infringe that person's cognizable interests/rights such as privacy or safety. In other words, the use of a telephone system is not a legal prerequisite for each reproduction (or indeed, the broadcasting) of a person's greeting to the unknown public.
From the ethical standpoint, besides the absence of a secrecy or privacy factor, the nature of your initiative does not subject a person to undesirable effects such as a degradation of his relations or of his self-esteem.