Sendmail temporarily disables outgoing mail

I want to run a load test on a server, but the application sends emails as part of the testing.

I’m not interested to know if emails are coming, but I don’t want to be blacklisted as spam during the test.

So, is there a way to disable outgoing emails in sendmail, but still simulate the load on the system? For example, how do you tell sendmail to store outgoing mail in a directory instead of actually sending?

I know that I can just comment on the mail () function in the application source, and I will do it as a last resort, but it will not simulate sendmail loading during testing. Or can I just assume that it would be insignificant? (about 4-5 letters per second)

Leonty

+3
source share
1 answer

exec('/etc/init.d/sendmail stop); `

Disk I / O caused by saving mail instead of sending will distort your traffic / load measurements. Just redirect all sendmail output to a dummy SMTP server on your network — one that doesn't send mail at all.

+2
source

Source: https://habr.com/ru/post/1775930/


All Articles