We present an analytical calculation of the spectra of CMB anisotropies and polarizations generated by relic gravitational waves (RGWs). As a substantial extension to the previous studies, three new ingredients are included in this work. Firstly, the analytic $C_l^{TT}$ and $C_l^{TE}$ are given; especially the latter can be useful to extract signal of RGWs from the observed data in the zero multipole method. Secondly, a fitting formula of the decaying factor on small scales is given, coming from the visibility function around the photon decoupling. Thirdly, the impacts by the neutrino free-streaming (NFS) is examined, a process that occurred in the early universe and leaves observable imprints on CMB via RGWs. It is found that the analytic $C_l^{TT}$ and $C_l^{TE}$ have profiles agreeing with the numeric ones, except that $C^{TT}_l$ in a range $l le 10$ and the $1^{st}$ trough of $C_l^{TE}$ around $l sim 75$ have some deviations. With the new damping factor, the analytic $C^{EE}_l$ and $C^{BB}_l$ match with the numeric ones with the maximum errors only $sim 3%$ up to the first three peaks for $lle 600$, improving the previous studies substantially. The correspondence of the positions of peaks of $C^{XX}_l$ and those of RGWs are also demonstrated explicitly. We also find that NFS reduces the amplitudes of $C^{XX}_l$ by $(20% sim 35%)$ for $lsimeq(100sim 600)$ and shifts slightly their peaks to smaller angles. Detailed analyses show that the zero multipoles $l_0$, where $C_l^{TE}$ crosses 0, are shifted to larger values by NFS. This shifting effect is as important as those causedby different inflation models and different baryon fractions.