I have a standard staging environment on a Ubuntu server (LAMP), with a couple of webpages on it.
There are some webpages that send Emails on particular workflow events.
I have to run few tests on the system, but can not allow random emails to fly over and spam the moderators (it happened once).
Disabling the particular part of the code, or adjusting the webpage settings is not good scenario, as the system need to be in a production-like setup, plus there may be in several places (or a fallback scenario if one of the options is disabled) and I can not risk it.
Most reasonable solution I can think of is to simple disable (temporary) all mailing services (commonly used with PHP).
I have full access on the server and basic Linux skills.
found this witch looks nice for start:
sudo /etc/init.d/sendmail stop
But I need to know how if there are other possible mail services,
how to check if they are running,
how to stop them,
how to validate.
I guess the above command will probably be enough... but I would like to hear the opinion of some one with more experience in the subject.