Nagios + Postfix

Martyn martyn at chetnet.co.uk
Thu Feb 19 22:47:22 CET 2009


With this setting myhostname = chetnet.co.uk I can send mails to an external
mail box at proweb.co.uk, so it goes from an account at chetnet.co.uk to an
account at proweb.co.uk

But if I send a mail to alert at chetnet.co.uk I get to following

This is the mail system at host chetnet.co.uk.

#############################################################
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system
unknown user: "alert"
##############################################################

Why is this, does postfix believe that this user should be on the same box?
If so I can I force mails to chetnet be sent out to chetnet, this is
confusing me now.

Thanks


-----Original Message-----
From: Martyn [mailto:martyn at chetnet.co.uk] 
Sent: 19 February 2009 20:13
To: 'Marc Powell'; 'Nagios Users'
Subject: RE: [Nagios-users] Nagios + Postfix

I have tried for the last few hours buy I can not resolve it, where have I
gone wrong, below is my config

############################################################################
#################################
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first # line of
that file to be used as the name.  The Debian default # is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for #
information on enabling SSL in the smtp client.

myhostname = chetnet.co.uk
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mailbox_size_limit = 0
recipient_delimiter = +
smtpd_recipient_restrictions = permit_mynetworks permit_inet_interfaces

Thanks

############################################################################
############### 

-----Original Message-----
From: Marc Powell [mailto:marc at ena.com]
Sent: 19 February 2009 16:41
To: Nagios Users
Subject: Re: [Nagios-users] Nagios + Postfix


On Feb 19, 2009, at 10:11 AM, Martyn wrote:

> Proweb is not under my control
>
> I'm not to sure what you mean with regards to the rest of you reply, I 
> have not set up postfix to masquerade anything, would not know how to 
> do that

Google does though. Search for 'postfix domain change'. You're probably
going to be most interested in mydomain, myhostname and perhaps myorigin.

> I'm sending the mail from the Nagios Server from address 
> nagios at cna.localhost to notify at proweb.co.uk

Yup, I'd reject that too. cna.localhost isn't a valid hostname or domain.

> I have not configured postfix in anyway, the install guide just 
> implied that I did the following and it would work out of the box so 
> to speak

Yes, the install guide has to assume that the MTA packages and configuration
for whatever system you are using are sane. It's your responsibility to make
sure they are. Doing that is beyond the scope of nagios.

--
Marc


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list