Debian: Exim 4 for only sending mails

I understand that Exim 4 is the default MTA in Debian. I have a Nagios server installed on Debian, and a mailserver based on Postfix and Courier elsewhere in the network. I want to set up Exim to be able to send mails to that mailserver. The point in the end will be to set up Nagios to forward notifications via mail.

Right now, sendign mail over the network with mailx does not work from the Nagios server.
MX record is set, and mail server can receive mail normally.

Are there any simple how to's or guides to set this up correctly and easily?
LVL 2
itniflAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nociSoftware EngineerCommented:
http://wiki.exim.org/FAQ/Configuration_cookbook

(or the http://wiki.exim.org more in general...)

You probably want it setup to accept only mail from localhost (127.0.0.1)
so bind it to that address and allow relay from 1270.0.1
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nociSoftware EngineerCommented:
and of course specify a smarthost.
0
itniflAuthor Commented:
I want Exim on the Nagios server to send mail to only a the mailserver in the local network. Do I need a smarthost for that, or do i set that server as the smarthost?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

nociSoftware EngineerCommented:
The easiest to configure is to setup all outgoing mail to your existing server (as you said)
so you need to configuration of "smarthost" to do that (actualy smarthost is a configuration keyword in sendmail.cf).

Here is a document that might help:
http://newbiedoc.sourceforge.net/networking/exim.html

0
itniflAuthor Commented:
I did the configuration as suggested, but also the code below gave me help. I don't remember where I got the help I needed for that.


send_to_gateway:
  driver = manualroute
  domains = +relay_to_domains
  transport = remote_smtp
        # place the FQDN or IP address of where the
        # messages are being relayed too here
  route_list = * 192.168.10.100

#userforward:
# ...

#localuser:
# ...

######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################
# A transport is used only when referenced from a router that successfully
# handles an address.

begin transports


# This transport is used for delivering messages over SMTP connections.

remote_smtp:
  driver = smtp

Open in new window

0
itniflAuthor Commented:
Good leads, but not the exact info. Thanks for help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.