Updating this thread because a) I have an answer and b) we had a problem with localhost today, regarding the use of LOCALHOST in the email configuration, especially for alerts.
I searched Clovertech and did not find a similar topic but I also have a faint memory of posting about this problem previously.
a) the localhost value is a default, found in Options / Site, under the Alert Configuration tab.
b) some of our alerts fired today, as usual, but others did not, which is not usual. Sadly these were alerts notifying us of getting NO input from our HIS. We like to be the first to know in these situations.
When I say the alerts did not fire, I mean that they did fire, but we received no emails. After digging we found that the alerts that fired with emails were those that had the email server name specified in the alert configuration. The alerts that did not send emails were those that did not have an email server specified and therefore took the default value in the Alert Configuration under Options / Site, which had localhost as the email server, which usually resolves correctly (we are on AIX). Today it did not.
It turns out that localhost got defined in dns today (temporarily) with a real IP address and it is not a mail server. Email did not work.
We changed the Alert Configuration under Options / Site to specify the email server instead of localhost.
This still does not address our use of email in scripts – we will have to change those settings as well.
We could check for this condition by running a command line nslookup on localhost, which should resolve to 127.0.0.1 (today it resolved to something else).
Peter