How do I change the "mail from" for email alerts?
list Harold J. Ballinger
My /var/spool/exim4/msglog is filling up with messages similar to the following: 2009-06-04 12:26:17 Received from hobbit@ U=hobbit P=local S=929 2009-06-04 12:26:33 user-d5cf6b2f7d35@xymon.invalid <user-d5cf6b2f7d35@xymon.invalid> R=dnslookup T=remote_smtp: SMTP error from remote mailer after MAIL FROM:<hobbit@> SIZE=1973: host exchange.mydomain [10.10.10.21]: 501 5.5.4 Invalid Address Process failed (1) when writing error message to hobbit@ (frozen) I have reconfigured Exim4 to allow remote mail, but I can't find a way to make the email alerts from hobbit/xymon use a different "MAIL FROM" than "hobbit@", which our Exchange server knows is not a valid address. I have tried making sure that the hostname is defined in the bbserver config and that the domain is configured in resolv.conf. I also tried creating an entry for "hobbit: user-5c8ec6c92842@xymon.invalid<mailto:user-5c8ec6c92842@xymon.invalid>" in /etc/email-addresses I'm not a *nix guru by any means, and I'm sure this is something simple that I'm missing?
list Larry Barber
You need to configure sendmail so that it will use an account that Exchange recognizes. See the sendmail man pages. Thanks, Larry Barber On Thu, Jun 4, 2009 at 11:33 AM, Harold J. Ballinger <
▸
user-fc4f93976dc8@xymon.invalid> wrote:
My /var/spool/exim4/msglog is filling up with messages similar to the following: 2009-06-04 12:26:17 Received from hobbit@ U=hobbit P=local S=929 2009-06-04 12:26:33 user-d5cf6b2f7d35@xymon.invalid <user-d5cf6b2f7d35@xymon.invalid> R=dnslookup T=remote_smtp: SMTP error from remote mailer after MAIL FROM:<hobbit@> SIZE=1973: host exchange.mydomain [10.10.10.21]: 501 5.5.4 Invalid Address Process failed (1) when writing error message to hobbit@ (frozen) I have reconfigured Exim4 to allow remote mail, but I can’t find a way to make the email alerts from hobbit/xymon use a different “MAIL FROM” than “hobbit@”, which our Exchange server knows is not a valid address. I have tried making sure that the hostname is defined in the bbserver config and that the domain is configured in resolv.conf. I also tried
creating an entry for “hobbit: user-5c8ec6c92842@xymon.invalid” in
▸
/etc/email-addresses
I’m not a *nix guru by any means, and I’m sure this is something simple
that I’m missing?
list Harold J. Ballinger
I am using Exim4 (not sendmail) and I've gone through all of the man pages. I was hoping that it might be something where hobbit was the one passing/forcing the from address. The only discussion close to something like this was about setting /etc/email-addresses which I mentioned in my post and I have tried. I just wanted to be sure that this was an Exim4 issue and not a hobbit configuration issue before I pushed it over completely into that arena. Harold J. Ballinger, MCSE, MCNE IT Coordinator Heritage Healthcare, Inc. XXX Old Howell Rd, Greenville SC XXXXX (XXX) XXX-XXXX | helpdesk (XXX) XXX-XXXX | office (XXX) XXX-XXXX | fax [cid:image001.jpg at 01C9E526.36CF8F20] Visit our website: www.heritage-healthcare.com<http://www.heritage-healthcare.com/>;
▸
From: Larry Barber [mailto:user-6ef9c2864140@xymon.invalid]
Sent: Thursday, June 04, 2009 2:21 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] How do I change the "mail from" for email alerts?
You need to configure sendmail so that it will use an account that Exchange recognizes. See the sendmail man pages.
Thanks,
Larry Barber
On Thu, Jun 4, 2009 at 11:33 AM, Harold J. Ballinger <user-fc4f93976dc8@xymon.invalid<mailto:user-fc4f93976dc8@xymon.invalid>> wrote:
My /var/spool/exim4/msglog is filling up with messages similar to the following:
2009-06-04 12:26:17 Received from hobbit@ U=hobbit P=local S=929
2009-06-04 12:26:33 user-d5cf6b2f7d35@xymon.invalid<mailto:user-d5cf6b2f7d35@xymon.invalid> <user-d5cf6b2f7d35@xymon.invalid<mailto:user-d5cf6b2f7d35@xymon.invalid>> R=dnslookup T=remote_smtp: SMTP error from remote mailer after MAIL FROM:<hobbit@> SIZE=1973: host exchange.mydomain [10.10.10.21]: 501 5.5.4 Invalid Address
▸
Process failed (1) when writing error message to hobbit@ (frozen)
I have reconfigured Exim4 to allow remote mail, but I can't find a way to make the email alerts from hobbit/xymon use a different "MAIL FROM" than "hobbit@", which our Exchange server knows is not a valid address.
I have tried making sure that the hostname is defined in the bbserver config and that the domain is configured in resolv.conf. I also tried creating an entry for "hobbit: user-5c8ec6c92842@xymon.invalid<mailto:user-5c8ec6c92842@xymon.invalid>" in /etc/email-addresses
I'm not a *nix guru by any means, and I'm sure this is something simple that I'm missing?
list Joe Sloan
▸
Harold J. Ballinger wrote:
My /var/spool/exim4/msglog is filling up with messages similar to the following: 2009-06-04 12:26:17 Received from hobbit@ U=hobbit P=local S=929 2009-06-04 12:26:33 user-d5cf6b2f7d35@xymon.invalid <user-d5cf6b2f7d35@xymon.invalid> R=dnslookup T=remote_smtp: SMTP error from remote mailer after MAIL FROM:<hobbit@> SIZE=1973: host exchange.mydomain [10.10.10.21]: 501 5.5.4 Invalid Address Process failed (1) when writing error message to hobbit@ (frozen) I have reconfigured Exim4 to allow remote mail, but I can’t find a way to make the email alerts from hobbit/xymon use a different “MAIL FROM” than “hobbit@”, which our Exchange server knows is not a valid address. I have tried making sure that the hostname is defined in the bbserver config and that the domain is configured in resolv.conf. I also tried creating an entry for “hobbit: user-5c8ec6c92842@xymon.invalid
<mailto:user-5c8ec6c92842@xymon.invalid>” in /etc/email-addresses
▸
I’m not a *nix guru by any means, and I’m sure this is something
simple that I’m missing?
Did you adjust the relevant section of ~/server/etc/hobbitserver.cfg to suit your needs? # For the hobbitd_alert module MAILC="mail -r user-cfef8cc339f2@xymon.invalid" # Command to send an e-mail with no subject MAIL="$MAILC -r user-5b6031c6dfca@xymon.invalid -s" # Command to send an e-mail with a subject Joe
list Harold J. Ballinger
My mail command does not support the –r option. I cannot see a way to force the from address, so I guess it is running it as the hobbit user. I have configured the hobbit user in /etc/email-addresses as “hobbit: user-89c6ab9913ee@xymon.invalid<mailto:user-89c6ab9913ee@xymon.invalid>” but Exim4 doesn’t seem to be using this. It definitely looks like it is something I will have to take up with the Exim4 group since now I can see the command that hobbit is using and that it isn’t the one forcing “hobbit@” as the wrong address.
Results from “mail -r”:
hhcgvl-moni03:~# mail -r
mail: invalid option -- r
usage: mail [-eIinv] [-a header] [-b bcc-addr] [-c cc-addr] [-s subject]
to-addr [...] [-- sendmail-options [...]]
mail [-eIiNnv] -f [name]
mail [-eIiNnv] [-u user]
hhcgvl-moni03:~#
Thanks for the help guys, I’ll take this over to the Exim4 mailing list now :-)
▸
From: J Sloan [mailto:user-b1d2c84d244b@xymon.invalid]
Sent: Thursday, June 04, 2009 3:16 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] How do I change the "mail from" for email alerts?
Harold J. Ballinger wrote:
My /var/spool/exim4/msglog is filling up with messages similar to the following:
2009-06-04 12:26:17 Received from hobbit@ U=hobbit P=local S=929
2009-06-04 12:26:33 user-d5cf6b2f7d35@xymon.invalid<mailto:user-d5cf6b2f7d35@xymon.invalid> <user-d5cf6b2f7d35@xymon.invalid><mailto:user-d5cf6b2f7d35@xymon.invalid> R=dnslookup T=remote_smtp: SMTP error from remote mailer after MAIL FROM:<hobbit@> SIZE=1973: host exchange.mydomain [10.10.10.21]: 501 5.5.4 Invalid Address
Process failed (1) when writing error message to hobbit@ (frozen)
I have reconfigured Exim4 to allow remote mail, but I can’t find a way to make the email alerts from hobbit/xymon use a different “MAIL FROM” than “hobbit@”, which our Exchange server knows is not a valid address.
I have tried making sure that the hostname is defined in the bbserver config and that the domain is configured in resolv.conf. I also tried creating an entry for “hobbit: user-5c8ec6c92842@xymon.invalid<mailto:user-5c8ec6c92842@xymon.invalid>” in /etc/email-addresses
I’m not a *nix guru by any means, and I’m sure this is something simple that I’m missing?
Did you adjust the relevant section of ~/server/etc/hobbitserver.cfg to suit your needs?
# For the hobbitd_alert module
MAILC="mail -r user-cfef8cc339f2@xymon.invalid<mailto:user-cfef8cc339f2@xymon.invalid>" # Command to send an e-mail with no subject
MAIL="$MAILC -r user-5b6031c6dfca@xymon.invalid<mailto:user-5b6031c6dfca@xymon.invalid> -s" # Command to send an e-mail with a subject
Joe
list Joe Sloan
▸
Harold J. Ballinger wrote:
My mail command does not support the –r option. I cannot see a way to force the from address, so I guess it is running it as the hobbit user. I have configured the hobbit user in /etc/email-addresses as
“hobbit: user-89c6ab9913ee@xymon.invalid <mailto:user-89c6ab9913ee@xymon.invalid>” but Exim4
▸
doesn’t seem to be using this. It definitely looks like it is
something I will have to take up with the Exim4 group since now I can
see the command that hobbit is using and that it isn’t the one forcing
“hobbit@” as the wrong address.
This should be simple to fix - perhaps on your system the proper command is called "mailx" instead of "mail" - I gather it's some sort of unix OS but exactly what flavor and version are you running there? Joe
list Rob McBroom
▸
On 2009-Jun-4, at 3:07 PM, Harold J. Ballinger wrote:
I just wanted to be sure that this was an Exim4 issue and not a hobbit configuration issue before I pushed it over completely into that arena.
I can't tell you how to fix it, but it is definitely up to exim4 and not Hobbit/Xymon to control this. I'm using Postfix, which is configured to pull addresses from a user's entry in LDAP and if that address changes, the from address on our alerts changes. -- Rob McBroom <http://www.skurfer.com/>; Because it screws up the order in which people normally read text. Original message:
Why is it bad to top-post your reply?
list Jim Smith
I'm using AIX and the standard email included with it. I have never had an issue like this, and I didn't have to do any special configuration to email when I installed Hobbit. Jim Smith SVHS Little Rock
▸
-----Original Message-----
From: Rob McBroom [mailto:user-371ba9bb5b75@xymon.invalid] Sent: Thursday, June 04, 2009 3:27 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] How do I change the "mail from" for email alerts?
On 2009-Jun-4, at 3:07 PM, Harold J. Ballinger wrote:
I just wanted to be sure that this was an Exim4 issue and not a hobbit configuration issue before I pushed it over completely into that arena.
I can't tell you how to fix it, but it is definitely up to exim4 and not Hobbit/Xymon to control this. I'm using Postfix, which is configured to pull addresses from a user's entry in LDAP and if that address changes, the from address on our alerts changes. -- Rob McBroom <http://www.skurfer.com/>; Because it screws up the order in which people normally read text. Original message:
Why is it bad to top-post your reply?
list Xymon User in Richmond
▸
On Thu, June 4, 2009 12:33, Harold J. Ballinger wrote:
My /var/spool/exim4/msglog is filling up with messages similar to the following: 2009-06-04 12:26:17 Received from hobbit@ U=hobbit P=local S=929 2009-06-04 12:26:33 user-d5cf6b2f7d35@xymon.invalid <user-d5cf6b2f7d35@xymon.invalid> R=dnslookup T=remote_smtp: SMTP error from remote mailer after MAIL FROM:<hobbit@> SIZE=1973: host exchange.mydomain [10.10.10.21]: 501 5.5.4 Invalid Address Process failed (1) when writing error message to hobbit@ (frozen) I have reconfigured Exim4 to allow remote mail, but I can't find a way to make the email alerts from hobbit/xymon use a different "MAIL FROM" than "hobbit@", which our Exchange server knows is not a valid address. I have tried making sure that the hostname is defined in the bbserver config and that the domain is configured in resolv.conf. I also tried creating an entry for "hobbit: user-5c8ec6c92842@xymon.invalid<mailto:user-5c8ec6c92842@xymon.invalid>" in /etc/email-addresses I'm not a *nix guru by any means, and I'm sure this is something simple that I'm missing?
By default, user at hostname will be used by Exim. Is hostname set on the system? IE, does the hostname command return anything? Alternatively, I think you can set primary_hostname in /etc/mail/exim.conf. As another pointed out, if you tell us what OS we'll be better able to help.
list Harold J. Ballinger
Hostname command returns "hhcgvl-moni03" as I would expect. I am running Debian 2.4.27 - this is a machine that started out from the hobbit virtual appliance that was widely available for download.
▸
-----Original Message-----
From: Xymon User in Richmond [mailto:user-24d6f8323faa@xymon.invalid]
Sent: Thursday, June 04, 2009 8:31 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] How do I change the "mail from" for email alerts?
On Thu, June 4, 2009 12:33, Harold J. Ballinger wrote:
By default, user at hostname will be used by Exim. Is hostname set on the
system? IE, does the hostname command return anything? Alternatively, I
think you can set primary_hostname in /etc/mail/exim.conf. As another
pointed out, if you tell us what OS we'll be better able to help.
list Xymon User in Richmond
▸
On Fri, June 5, 2009 08:58, Harold J. Ballinger wrote:
Hostname command returns "hhcgvl-moni03" as I would expect. I am running Debian 2.4.27 - this is a machine that started out from the hobbit virtual appliance that was widely available for download.
Ah. Then there's no telling what may be pre-customized from defaults. A
default Exim install should be returning hobbit at hhcgvl-moni03, which might
not be accepted by your Exchange server, either, but wouldn't be as
mysterious. I'd guess that either primary_hostname is set to a null
string ("") or there's a rewrite rule that doesn't know its domain.
You're probably getting better help than that over on the Exim lists.
▸
-----Original Message----- From: Xymon User in Richmond [mailto:user-24d6f8323faa@xymon.invalid] Sent: Thursday, June 04, 2009 8:31 PM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] How do I change the "mail from" for email alerts? On Thu, June 4, 2009 12:33, Harold J. Ballinger wrote: By default, user at hostname will be used by Exim. Is hostname set on the system? IE, does the hostname command return anything? Alternatively, I think you can set primary_hostname in /etc/mail/exim.conf. As another pointed out, if you tell us what OS we'll be better able to help.
list Joe Sloan
▸
Harold J. Ballinger wrote:
Hostname command returns "hhcgvl-moni03" as I would expect. I am running Debian 2.4.27 - this is a machine that started out from the hobbit virtual appliance that was widely available for download.
OK sounds like you're running lenny - you definitely have access to a mail client that will support the -r command. Just run "apt-get install heirloom-mailx" as root, and you should be good to go. As for the MTA side of things, I can't advise in any great detail on exim, other than to say that the one time I tried to get exim working, I struggled briefly with it, then threw in the towel, installed postfix and moved on. Joe
list Harold J. Ballinger
The exim list introduced me to a "qualify_domain" setting and I was able to force it that way. Thanks so much for your help.
▸
-----Original Message-----
From: Xymon User in Richmond [mailto:user-24d6f8323faa@xymon.invalid]
Sent: Friday, June 05, 2009 1:07 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] How do I change the "mail from" for email alerts?
On Fri, June 5, 2009 08:58, Harold J. Ballinger wrote:Hostname command returns "hhcgvl-moni03" as I would expect. I am running Debian 2.4.27 - this is a machine that started out from the hobbit virtual appliance that was widely available for download.
Ah. Then there's no telling what may be pre-customized from defaults. A
default Exim install should be returning hobbit at hhcgvl-moni03, which might
not be accepted by your Exchange server, either, but wouldn't be as
mysterious. I'd guess that either primary_hostname is set to a null
string ("") or there's a rewrite rule that doesn't know its domain.
You're probably getting better help than that over on the Exim lists.
-----Original Message----- From: Xymon User in Richmond [mailto:user-24d6f8323faa@xymon.invalid] Sent: Thursday, June 04, 2009 8:31 PM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] How do I change the "mail from" for email alerts? On Thu, June 4, 2009 12:33, Harold J. Ballinger wrote: By default, user at hostname will be used by Exim. Is hostname set on the system? IE, does the hostname command return anything? Alternatively, I think you can set primary_hostname in /etc/mail/exim.conf. As another pointed out, if you tell us what OS we'll be better able to help.
list Joe Sloan
▸
Harold J. Ballinger wrote:
The exim list introduced me to a "qualify_domain" setting and I was able to force it that way. Thanks so much for your help.
It's great that you finally got it working - but in retrospect, setting the from address is really the job of the mail application (MUA) which the MTA should simply pass along if it's sane. For future reference, mailx and postfix work "out of the box" for this sort of thing - no special hacks, MTA tweaks or secret settings required. Joe
list Harold J. Ballinger
I'm used to using postfix, but the appliance came pre-configured with exim4, so it seemed easier to just find the config setting than to rebuild and install postfix instead - it isn't as much being lazy as it is trying to stay on top of all of the other projects that are driven by other departments while squeezing in some of our IT projects/fixes :-)
▸
Harold J. Ballinger, MCSE, MCNE
IT Coordinator
Heritage Healthcare, Inc.
XXX Old Howell Rd, Greenville SC XXXXX
(XXX) XXX-XXXX | helpdesk
(XXX) XXX-XXXX | office
(XXX) XXX-XXXX | fax
Visit our website: www.heritage-healthcare.com
▸
-----Original Message-----
From: J Sloan [mailto:user-b1d2c84d244b@xymon.invalid]
Sent: Monday, June 08, 2009 1:45 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] How do I change the "mail from" for email alerts?
Harold J. Ballinger wrote:The exim list introduced me to a "qualify_domain" setting and I was able to force it that way. Thanks so much for your help.
It's great that you finally got it working - but in retrospect, setting the from address is really the job of the mail application (MUA) which the MTA should simply pass along if it's sane. For future reference, mailx and postfix work "out of the box" for this sort of thing - no special hacks, MTA tweaks or secret settings required. Joe
list Rob McBroom
▸
On 2009-Jun-8, at 2:15 PM, Harold J. Ballinger wrote:
I'm used to using postfix, but the appliance came pre-configured with exim4, so it seemed easier to just find the config setting than to rebuild and install postfix instead
It should be as simple as `aptitude install postfix`. That should even remove exim for you. I'm not saying you should use one or the other, but installation complications shouldn't be something you worry about. -- Rob McBroom <http://www.skurfer.com/>; Don't try to tell me a thing is important to you if the whole of your "support" entails forcing other to spend time and money on it.