  Given a finite connected multigraph $G=(V,E)$, the all-terminal reliability
function $R(G,p)$ is the probability that $G$ remains connected under
percolation with parameter $p$. We develop new results concerning the question
of which (multi)graphs~$G$ maximize $R(G,p)$ for a given number of vertices
$n$, edges $m$ and a given parameter $p$ -- such graphs are called optimally
reliable graphs -- paying particular attention to uniqueness and to whether the
answer depends upon $p$.
  We generalize the concept of a distillation, and build a framework which we
use to identify all optimally reliable graphs for which $m-n\in\{1,2,3\}$.
These graphs are uniformly optimal in $p$. Many of them have been previously
identified, but there are serious problems with these treatments, especially
for the case $m-n=3$. We also obtain some partial results for $m-n\in\{4,5\}$.
  For $m-n=3$, the optimal graphs were incorrectly identified by Wang in 1994,
in the infinite number of cases where $m\equiv 5 \pmod{9}$ and $m\geq 14$. This
erroneous result, which concerns subdivisions of $K_{3,3}$, has been cited
extensively and the mistake has not been detected. Furthermore, while the
optimal graphs were correctly identified for other values of $m$, the proof is
incorrect, as it also uses a claim for which we give a counterexample. Our
proof of the rectified statement is self-contained.
  Regarding $m-n=4$, it was recently shown by Romero and Safe that the optimal
graph depends upon $p$ for infinitely many $m$. We find a new such set of
$m$-values, which gives a different perspective on why this phenomenon occurs.
This leads us to conjecture that there are only finitely many $m$ for which
there are uniformly optimal graphs when $m-n=4$, but that, for $m-n=5$, there
are again infinitely many uniformly optimal graphs. We hope that our general
results and methods will be useful for continued investigations.
