I am having some troubles with the proof of this: let be $f\in\mathfrak{L}_1(X,S,\mu)$ such that exists $k\geq0$ that satisfies; for all $E\in S$ with $0<\mu(E)<\infty,$ $$\frac{|\int_{E}f \, d\mu|}{\mu(E)}\leq k$$ then $|f|\leq k$ almost everywhere. We can suppose that exists $E\in S$ with the condition.
I have proved the trivial case $k=0,$ but when $k>0$ I tried (with any conlcution) to define $E:=\{x\in X: |f(x)|>k\}$ and prove $\mu(E)=0$ by contradiction, we can prove $\mu(E)<\infty$ using $\,\,f$ is integrable and then we can use the hypothesis.