Overview
The customer was experiencing an issue with the configuration of mailx on their Primary viewer (IP: 192.168.81.31). The problem was preventing the automatic sending of daily reports to the customer's email account. The issue was also related to the scheduling and execution of a mail script via cron, a time-based job scheduler in Unix-like operating systems. The SMTP server alias had been changed, causing the mails to go into the queue and not be sent out. The domain name in the sendmail configuration had also been changed.
Recording: Explaining the issue
Ticket: 4141954
Solution
Verify the mailx on the system, by following the steps below:
- Verify the mail script with the following cron schedule:
[ipm@PEMSA051 ~]$ crontab -l | grep Reportmail.sh 00 10 * * * sh /opt1/ipm/Reportmail.sh
- The content of the `Reportmail.sh` script should be as follows:
DAY=`date -d "-1 days" +%Y%m%d`;echo -e "Dear Team,\nPlease find the IPLMS status Report\n\nRegards,\nTeam STL" | mailx -s "TSBB IPLMS Report" -a /u01/Report_Data/Final_EPS_Report/Report_${DAY}_TataSkyBB.html -r skyverasupport@tataplayfiber.co.in skyverasupport@tataplayfiber.co.in Navin.Fernandes@tataskybb.com Anand.Kumar1@tataplayfiber.comSandip.Hegishte@tataplayfiber.com
- The server details are as follows:
- IP: 192.168.56.51
- Username: ipm
- Password: [Your Password]
- Check the sendmail configuration and verify the domain name.
- Note: The issue was caused by the customer altering the domain name in the configuration settings.
- After setting up the mail script and server details, restart the service using the following command:
systemctl restart sendmail.service
Please note that you need to replace `[Your Password]` with your actual password.
Summary
The issue was related to the configuration of mailx and the scheduling of a mail script via cron. The SMTP server alias and the domain name in the sendmail configuration had been changed, causing the mails to go into the queue and not be sent out. The solution involved setting up the mail script with the correct cron schedule, ensuring the content of the script was correct, providing the correct server details, and restarting the service.
FAQ
-
What is mailx?
Mailx is a utility for sending and receiving mail on Unix-like operating systems. -
What is cron?
Cron is a time-based job scheduler in Unix-like operating systems. -
What is the sendmail service?
Sendmail is a general purpose internetwork email routing facility that supports many kinds of mail-transfer and delivery methods, including the Simple Mail Transfer Protocol (SMTP) used for email transport over the Internet.
Comments
0 comments
Article is closed for comments.