posted 1 year ago
.I was not getting alerts from check_mk when my servers needed attention. I then tried the mail command from the server designed to be the checkmk server. The mail command did not return any error and I used mailq command and saw that no messages were in q. However, When I checked my work email (which uses Microsoft Outlook) there was No email there. One of my colleagues suggested that the issue is how the sender appears and that it is seen as spam before it gets to my inbox. It used to appear like this <root@fullyqualifieddomainnameofserver> (ONE email of the 25 I sent came through) so I created this script #!/bin/bash
# Input parametersFROM="$1"SUBJECT="$2"
# Send email/usr/sbin/sendmail.sendmail -f "$FROM" "$TO" <<EOFFrom: $FROMSubject: $SUBJECTTo: "workemail"BODY:"test content"SMTPPORT:25EOF
I have been changing the From variable; however, I am still NOT Receiving any emails. Does anyone know why?