Email alerts with attachments - known solution not working
list Shawn Heisey
Barely relevant background info: I managed to wipe out my xymon server. I had a backup of my config information that's over six months old, so I haven't had to rebuild from scratch. I also upgraded from 4.3.10 to 4.3.12 when I rebuilt it. I had run into alerts coming through as attachments before, but now there seems to be an extra dimension to it. Before I was able to fix it with the following change in xymonserver.cfg: MAILC="/usr/bin/tr -d '\\015' | mail" Now that isn't working for all of my alerts. With some investigation, I have been able to determine that additional control characters are now being sent from clients. I've had to extend my MAILC variable to eliminate additional characters: MAILC="/usr/bin/tr -d '\\001\\004\\015' | mail" Does anyone know if there might be additional characters I'll need to eliminate before it gets sent to mail/mailx? Is there any way to have Xymon do this so that no special config is needed? Thanks, Shawn
list Henrik Størner
▸
Den 28-01-2014 21:57, Shawn Heisey skrev:
Barely relevant background info: I managed to wipe out my xymon server. I had a backup of my config information that's over six months old, so I haven't had to rebuild from scratch. I also upgraded from 4.3.10 to 4.3.12 when I rebuilt it. I had run into alerts coming through as attachments before, but now there seems to be an extra dimension to it. Before I was able to fix it with the following change in xymonserver.cfg: MAILC="/usr/bin/tr -d '\\015' | mail" Now that isn't working for all of my alerts. With some investigation, I have been able to determine that additional control characters are now being sent from clients. I've had to extend my MAILC variable to eliminate additional characters: MAILC="/usr/bin/tr -d '\\001\\004\\015' | mail" Does anyone know if there might be additional characters I'll need to eliminate before it gets sent to mail/mailx? Is there any way to have Xymon do this so that no special config is needed?
Have you tried using a different mail client? If you are on a Linux box, then installing a tool like "mutt" should be easy - I think it is included in all of the common distributions, and it knows how to handle non-ASCII content by setting the right MIME-type headers, encoding text as base-64 and so on. As far as Xymon is concerned, mutt uses the same commandline syntax. So you can just replace "mail" with "mutt" in the default MAILC setting in xymonserver.cfg. Regards, Henrik
list Ryan Novosielski
I'm pretty sure this is not the only solution that exists -- you might try the list archives as it gets asked regularly. If I'm not mistaken, mostly in conjunction with RHEL/CentOS 6. -- ____ *Note: UMDNJ is now Rutgers-Biomedical and Health Sciences* || \\UTGERS |---------------------*O*--------------------- ||_// Biomedical | Ryan Novosielski - Sr. Systems Programmer || \\ and Health | user-46c89e614701@xymon.invalid - 973/972.0922 (2x0922) || \\ Sciences | OIT/EI-Academic Svcs. - ADMC 450, Newark
▸
`'
From: Xymon [xymon-bounces at xymon.com] On Behalf Of Shawn Heisey [user-5d0d01dba542@xymon.invalid]
Sent: Tuesday, January 28, 2014 3:57 PM
To: xymon at xymon.com
Subject: [Xymon] Email alerts with attachments - known solution not working
Barely relevant background info: I managed to wipe out my xymon server.
I had a backup of my config information that's over six months old, so
I haven't had to rebuild from scratch. I also upgraded from 4.3.10 to
4.3.12 when I rebuilt it.
I had run into alerts coming through as attachments before, but now
there seems to be an extra dimension to it. Before I was able to fix it
with the following change in xymonserver.cfg:
MAILC="/usr/bin/tr -d '\\015' | mail"
Now that isn't working for all of my alerts. With some investigation, I
have been able to determine that additional control characters are now
being sent from clients. I've had to extend my MAILC variable to
eliminate additional characters:
MAILC="/usr/bin/tr -d '\\001\\004\\015' | mail"
Does anyone know if there might be additional characters I'll need to
eliminate before it gets sent to mail/mailx? Is there any way to have
Xymon do this so that no special config is needed?
Thanks,
Shawn
list Henrik Størner
▸
Den 29-01-2014 00:44, Shawn Heisey skrev:
On 1/28/2014 2:19 PM, Henrik Størner wrote:Have you tried using a different mail client? If you are on a Linux box, then installing a tool like "mutt" should be easy - I think it is included in all of the common distributions, and it knows how to handle non-ASCII content by setting the right MIME-type headers, encoding text as base-64 and so on. As far as Xymon is concerned, mutt uses the same commandline syntax. So you can just replace "mail" with "mutt" in the default MAILC setting in xymonserver.cfg.
I'm on CentOS 6. I installed mutt and changed MAILC to "mutt" ... but once I did that, I did not get any notifications at all. I'm trying "mutt -x" because the man page says that emulates mailx compose mode. Do I need to use something else?
Not "mutt -x", that requires someone sitting at a terminal. Just plain MAILX="mutt" works fine with my mutt+sendmail+CentOS 6.3 test setup. I am not sure if it solves your problem with the weird characters. My normal mail client (Thunderbird) displays UTF-8 and UTF-16 characters without a hitch, but it does depend on the program you use to read the alerts, and on how the text is generated. Neither of those are within Xymon control. Regards, Henrik