Xymon Mailing List Archive search

How do I change the "mail from" for email alerts?

16 messages in this thread

list Harold J. Ballinger · Thu, 4 Jun 2009 12:33:45 -0400 ·
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 · Thu, 4 Jun 2009 13:20:39 -0500 ·
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 <
quoted from 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
quoted from Harold J. Ballinger
/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 · Thu, 4 Jun 2009 15:07:44 -0400 ·
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/>;
quoted from Larry Barber


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
quoted from Larry Barber

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 · Thu, 04 Jun 2009 12:15:52 -0700 ·
quoted from Harold J. Ballinger
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
quoted from Harold J. Ballinger

 
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 · Thu, 4 Jun 2009 15:33:18 -0400 ·
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 :-)
quoted from Joe Sloan


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 · Thu, 04 Jun 2009 12:42:53 -0700 ·
quoted from Harold J. Ballinger
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
quoted from Harold J. Ballinger
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 · Thu, 4 Jun 2009 16:27:04 -0400 ·
quoted from Harold J. Ballinger
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 · Thu, 4 Jun 2009 14:39:22 -0600 ·
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
quoted from Rob McBroom


-----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 · Thu, 4 Jun 2009 20:30:52 -0400 ·
quoted from Harold J. Ballinger
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 · Fri, 5 Jun 2009 08:58:00 -0400 ·
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. 
quoted from Xymon User in Richmond


-----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 · Fri, 5 Jun 2009 13:07:00 -0400 ·
quoted from Harold J. Ballinger
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.
quoted from Xymon User in Richmond
-----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 · Fri, 05 Jun 2009 10:29:53 -0700 ·
quoted from Harold J. Ballinger
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 · Fri, 5 Jun 2009 16:52:54 -0400 ·
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.
quoted from Xymon User in Richmond

-----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 · Mon, 08 Jun 2009 10:44:33 -0700 ·
quoted from Harold J. Ballinger
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 · Mon, 8 Jun 2009 14:15:01 -0400 ·
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 :-)
quoted from Harold J. Ballinger


 
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 
quoted from Joe Sloan


-----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 · Mon, 8 Jun 2009 16:49:29 -0400 ·
quoted from Harold J. Ballinger
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.