The low-energy scattering properties of two aligned identical bosonic and identical fermionic dipoles are analyzed. Generalized scattering lengths are determined as functions of the dipole moment and the scattering energy. Near resonance, where a new bound state is being pulled in, all non-vanishing generalized scattering lengths diverge, with the a 00 and a 11 scattering lengths being dominant for identical bosons and identical fermions, respectively, near both broad and narrow resonances. Implications for the energy spectrum and the eigenfunctions of trapped two-dipole systems and for pseudo-potential treatments are discussed. PACS numbers: 34.10.+x Currently, the creation of ultracold heteronuclear ground state molecules poses one of the major experimental challenges in the field of ultracold physics [1]. The trapping of ultracold ground state molecules with large phase space density promises to allow an exciting array of novel research lines to be studied. Although the largest phase space density of ultracold ground state molecules achieved to date is still fairly small, a number of promising cooling schemes have been demonstrated [2]. Thus, it is expected that degenerate molecular gases with large electric dipole moment will be created in the laboratory in the near future. Polar molecules are a candidate for qubits in quantum computing [3] and may be used in high precision measurements that aim at placing yet stricter limits on the electric dipole moment of the electron [4]. Furthermore, dipolar gases are predicted to show roton-like features [5] and to exhibit rich stability diagrams whose details depend on the trapping geometry [6]. The stability of dipolar atomic Cr condensates has recently been investigated experimentally. To enhance the anisotropic effects, which are due to Cr's magnetic dipole moment, the s-wave scattering length was tuned to zero by applying an external field in the vicinity of a Fano-Feshbach resonance [7].To create and then utilize ultracold molecules, it is mandatory to develop a detailed understanding of the scattering properties of two interacting dipoles in free space and in a trap. Unlike the interaction between s-wave alkali atoms, the interaction between two dipoles is long-range and angledependent. A two-dipole system can, e.g., be realized experimentally by loading an optical lattice with either two or zero dipoles per site. If the optical lattice is sufficiently deep and if the interaction between nearest and next to nearest neighbors are absent or negligible, then each optical lattice site can be treated as an independent approximately harmonic trap. This paper determines the scattering properties of two aligned dipoles, either identical bosons or identical fermions, as functions of the dipole moment and the scattering energy. In general, the dipoles can either be magnetic or electric. For concreteness, we restrict our discussion in the following to the scattering between molecular electric dipoles. Sequences of scattering resonances, which can be classified as "broad...