LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-14-2011, 11:53 AM   #1
rockoboyt
LQ Newbie
 
Registered: Oct 2011
Posts: 4

Rep: Reputation: Disabled
Sending Mail in UBUNTU


I've just installed UBUNTU and Nagios on an extra box i had. I got nagios up and running and the notifications are going to the mail log but they aren't getting emailed out.

Here's my postfix/main.cf

myhostname = monitor1.company.local
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail01.company.local, monitor1.company.local, localhost.company.local, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
#inet_interfaces = all
inet_interfaces = localhost
relay_domains = monitor1.company.local


When it attempts to send out the mail log is writting this:

Oct 14 11:09:07 monitor1 postfix/pickup[13619]: 0F2072169F: uid=1001 from=<nagios>
Oct 14 11:09:07 monitor1 postfix/cleanup[13965]: 0F2072169F: message-id=<20111014150907.0F2072169F@monitor1.company.local>
Oct 14 11:09:07 monitor1 postfix/qmgr[13620]: 0F2072169F: from=<nagios@mail.company.net>, size=670, nrcpt=1 (queue active)
Oct 14 11:09:09 monitor1 postfix/smtp[13967]: 0F2072169F: to=<chinch@company.net>, relay=company.net[67.227.180.188]:25, delay=2.5, delays=0.03/0.01/2.3/0.13, dsn=5.0.0, status=bounced (host company.net[XX.XXX.XXX.XXX] said: 550-mail.company.net (monitor1.company.local) [XXX.XXX.XXX.XXX]:55912 is 550-currently not permitted to relay through this server. Perhaps you have not 550-logged into the pop/imap server in the last 30 minutes or do not have SMTP 550 Authentication turned on in your email client. (in reply to RCPT TO command))
Oct 14 11:09:09 monitor1 postfix/cleanup[13965]: 8DFDF23BF4: message-id=<20111014150909.8DFDF23BF4@monitor1.company.local>
Oct 14 11:09:09 monitor1 postfix/bounce[13968]: 0F2072169F: sender non-delivery notification: 8DFDF23BF4
Oct 14 11:09:09 monitor1 postfix/qmgr[13620]: 8DFDF23BF4: from=<>, size=3117, nrcpt=1 (queue active)
Oct 14 11:09:09 monitor1 postfix/qmgr[13620]: 0F2072169F: removed
Oct 14 11:09:14 monitor1 postfix/smtp[13967]: 8DFDF23BF4: to=<nagios@mail.company.net>, relay=mail.company.net[XXX.XXX.XXX.XXX]:25, delay=5, delays=0/0/0/5, dsn=5.7.1, status=bounced (host mail.company.net[XXX.XXX.XXX.XXX] said: 550 5.7.1 Unable to relay (in reply to RCPT TO command))
Oct 14 11:09:24 monitor1 postfix/qmgr[13620]: 8DFDF23BF4: removed



Any help would be greatly appreciated.
 
Old 10-15-2011, 08:28 AM   #2
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
are you sending to a remote domain?
Code:
said: 550 5.7.1 Unable to relay (in reply to RCPT TO command))
it's not your postfix not sending, it's the remote server not accepting
 
Old 10-17-2011, 08:28 AM   #3
rockoboyt
LQ Newbie
 
Registered: Oct 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
if i review the logs i get what i posted earlier. When i tried to telnet to the mail server over port 25 it was successful. I set the receiver connection (this morning) for verbose logging to try to track it down further. i do see where the connection is trying but it's giving some messages that i'm not aware of what they are yet (researching the numbers now).

+,,
*,SMTPSubmit SMTPAcceptAnySender SMTPAcceptAuthoritativeDomainSender AcceptRoutingHeaders,Set Session Permissions
"220 Exh01.company.local Microsoft ESMTP MAIL Service ready at Fri, 14 Oct 2011 17:30:42 -0400",
EHLO monitor1.company.local,
250-Exh01.company.local Hello [192.168.0.152],
250-SIZE,
250-PIPELINING,
250-DSN,
250-ENHANCEDSTATUSCODES,
250-X-ANONYMOUSTLS,
250-AUTH NTLM LOGIN,
250-X-EXPS GSSAPI NTLM,
250-8BITMIME,
250-BINARYMIME,
250-CHUNKING,
250-XEXCH50,
250 XRDST,
<,MAIL FROM:<> SIZE=2803,
*,08CE58CB509C11D8;2011-10-14T21:30:43.095Z;1,receiving message
>,250 2.1.0 Sender OK,
<,RCPT TO:<root@mail.company.net> ORCPT=rfc822;root@mail.company.net,
550 5.7.1 Unable to relay,
<,DATA,
503 5.5.2 Need rcpt command,
<,RSET,
 
Old 10-17-2011, 01:10 PM   #4
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
does sending to that email address using: "sendmail mail@domain.com < /dev/null" work?

can you post the mail sending command you use with nagios?
 
Old 10-17-2011, 01:47 PM   #5
rockoboyt
LQ Newbie
 
Registered: Oct 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
i still get nothing when i use that command. nagios is configured to send it when the monitors are tripped, however the one i've been testing with is
echo "mail test" | mailx =s "testing" user@mydomain.net
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail server not sending mail to location defined in MX record modulaaron Linux - Software 3 12-19-2010 08:57 PM
Sending mail with mail() and postfix when using namecheap's DNS and Email Hosting iLinx Linux - Server 2 07-19-2010 06:53 PM
Sendmail (mailserver) -- sending mail with the mail command -- doesn't work :-( carolinevdh Linux - Server 1 08-13-2009 10:43 PM
Mailserver sending but not sending mail from outside. simango Linux - Newbie 1 10-28-2008 09:51 AM
Postfix mail transfer agent not sending mail locally or to other servers sketelsen Linux - Software 3 02-09-2006 12:16 PM


All times are GMT -5. The time now is 03:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration