Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 9468  / 1 Year ago, tue, march 28, 2023, 1:05:55

I was using the following mail command in my crontab to which worked flawlessly until we re installed our mail server last Friday:



echo "Testing 123" | mail -s "ECS PostDate Processed" "[email protected] [email protected]" -- -r "[email protected]" -F "ServerCronJobs"


previously the "--" would rout the command line parameters to sendmail to send from a name and add a reply-to address. Now it seems the -- is being ignored and all of the extra parameters are being treated as email addresses. so the email is going to:



from root <[email protected]>
to me, chrish, -r, noreply, -F, ServerCronJobs


What is missing now?


More From » mail

 Answers
3

mail points to one of the alternatives.



ls -l /usr/bin/mail
lrwxrwxrwx 1 root root 22 Jan 5 2011 /usr/bin/mail -> /etc/alternatives/mail

ls -l /etc/alternatives/mail
lrwxrwxrwx 1 root root 18 Jan 5 2011 /etc/alternatives/mail -> /usr/bin/bsd-mailx


You were probably using another mail program in the past. Try to figure out which it was.



After you have installed the right package, then change the alternative like this:



sudo update-alternatives --config mail

[#31198] Tuesday, March 28, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cheeturage

Total Points: 432
Total Questions: 111
Total Answers: 115

Location: Bahrain
Member since Tue, Mar 1, 2022
2 Years ago
cheeturage questions
Sat, Dec 4, 21, 02:22, 2 Years ago
Mon, Jan 2, 23, 22:39, 1 Year ago
Sun, Sep 12, 21, 03:21, 3 Years ago
;