  We present a detailed investigation of the Rastall gravity extension of the
standard $\Lambda$CDM model. We review the model for two simultaneous
modifications of different nature in the Friedmann equation due to the Rastall
gravity: the new contributions of the material (actual) sources (considered as
effective source) and the altered evolution of the material sources. We discuss
the role/behavior of these modifications with regard to some low redshift
tensions, including the so-called $H_0$ tension, prevailing within the standard
$\Lambda$CDM. We constrain the model at the level of linear perturbations, and
obtain the first constraints through a robust and accurate analysis using the
latest full Planck CMB data, with and without including BAO data. We find that
the Rastall parameter $\epsilon$ (null for general relativity) is consistent
with zero at 68\% CL (with a tendency towards positive values, $-0.0001 <
\epsilon < 0.0007$ (CMB+BAO) at 68\% CL), which in turn implies no significant
statistical evidence for deviation from general relativity, and also a
precision of $\mathcal{O}(10^{-4})$ for the coefficient $-1/2$ of the term
$g_{\mu\nu}R$ in the Einstein field equations of general relativity
(guaranteeing the local energy-momentum conservation). We explore the
consequences led by the Rastall gravity on the cosmological parameters in the
light of the observational analyses. It turns out that the effective source
dynamically screens the usual vacuum energy at high redshifts, but this
mechanism barely works due to the opposition by the altered evolution of CDM.
Consequently, two simultaneous modifications of different nature in the
Friedmann equation act against each other, and do not help to considerably
relax the so-called low redshift tensions. Our results may offer a guide for
the research community that studies the Rastall gravity in various aspects of
gravitation and cosmology.
