The API Gateway Appliance due to a variant LINUX version in API Gateway version 7.x and 8.x or 9.x has slightly different o/s commands to send email.
The 8.x and 9.x API Gateway work out of the box but sample syntax will be provided for o/s utility sendmail usage.
The 7.x API Gateway utilizes exim which will cause failures.
The 7.x API Gateway utilizes exim which out of the box is causing a failure, instructions to correct the fault, as well as sample usage are provided in this document.
[[email protected]]# echo "This is the main body of the mail" | mail -s "Subject of the Email" [email protected]
In the default out of the box all the mail messages will go to "frozen"
If you run o/s command you will see the frozen or email messages status.
[[email protected]]# mailq
To remove the frozen messages run,
[[email protected]]# exiqgrep -zi|xargs exim -Mrm
But when reviewing the exim logs you will find that exim is getting an exception thus why these were going frozen,
more /var/log/exim/main.log or tail /var/log/exim/main.log
You will find error,
smtp transport process returned non-zero status 0x000b
To resolve this problem modify the exim configuration with the following steps,
vi /etc/exim/exim.conf
find remote_smtp
Add the below line
hosts_avoid_tls=*
And the sendmail of below should work without issue.
[[email protected]]# echo "This is the main body of the mail" | mail -s "Subject of the Email" [email protected]
API Gateway 8.x and 9.x sample usage,
echo "Subject: My mail test123" | /usr/sbin/sendmail [email protected]
Note: Some internal mail filters may block this email so you may need to review your internal email policies.