Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Dr. Natas
Posts: 14 Joined: Tue Dec 11, 2012 6:39 pm
Post
by Dr. Natas » Tue Jun 28, 2016 6:29 pm
Hey everyone,
I'm having some difficulty finding where the mailexchange1 configurations is at. I'm trying to update it to mailexhange.2.example.com, but I don't know there the settings are located. Does anyone know where I can adjust the settings for the new server.
Output of /var/log/maillog
Code: Select all
Jun 28 15:00:01 nagios_localhost postfix/smtp[29778]: 0354F604D5: to=<some.one@example.com>, relay=mailexchange1.example.com [x.x.x.x]:25, delay=0.74, delays=0.24/0.02/0/0.47, dsn=2.6.0, status=sent (250 2.6.0 <20160628220001.0354F604D5@nagios_localdomain> [InternalId=1365128] Queued mail for delivery)
Dr. Natas
Posts: 14 Joined: Tue Dec 11, 2012 6:39 pm
Post
by Dr. Natas » Wed Jun 29, 2016 11:19 am
Sorry for the late reply, but I'm running CentOS 6 x86_64. Here is sample output of my /etc/mail.rc I'm still trying to find my way around nagios, but still no luck.
Code: Select all
[root@nagios tmp]# cat main.cf | grep -v -e '#' -e '^$'
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
Sample output of /etc/postfix/main.rc
Code: Select all
[root@nagios postfix]# cat main.cf |grep -v -e '#' -e '^$'
ueue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
tgriep
Madmin
Posts: 9179 Joined: Thu Oct 30, 2014 9:02 am
Post
by tgriep » Wed Jun 29, 2016 2:42 pm
If you want to change the relay host that postfix forwards it's email to, you would edit the main.cf file and un-comment one og the relayhost options and put your new server in it like the example below.
Code: Select all
relayhost = mailexhange.2.example.com
This would work for you is the new server doesn't require any sort of authentication.
Be sure to check out our
Knowledgebase for helpful articles and solutions!
Dr. Natas
Posts: 14 Joined: Tue Dec 11, 2012 6:39 pm
Post
by Dr. Natas » Wed Jun 29, 2016 6:51 pm
Thank you,
I worked perfectly. I turned out my windows admin didn't update out mail exchange servers so I they were still using the old ones.
mcapra
Posts: 3739 Joined: Thu May 05, 2016 3:54 pm
Post
by mcapra » Thu Jun 30, 2016 9:16 am
Is it alright if we lock this thread and mark the issue as resolved?