I am trying to write a script which sends an alert to a few email ids. The script will fetch its data from pmta log file.
As my script is ready but it's not sending out the mail. The server on which this script will run is installed with PowerMTA to relay out its bulk mails which queued up.
When I just checked whether mail is going out or not I tried:
echo "This will go into the body of the mail." | mail -s "Hello world" email@example.com
I waited for 5 hours but did not receive the mail.
I had installed mailx, below is the port detail which might be helpful.
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1225/pmtad
Any help will be highly appreciated. If anyone needs more information then please let me know and I will provide.