• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 944
  • Last Modified:

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?
0
itnifl
Asked:
itnifl
  • 3
  • 3
2 Solutions
 
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
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now