LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sending Mail in UBUNTU (https://www.linuxquestions.org/questions/linux-newbie-8/sending-mail-in-ubuntu-908188/)

rockoboyt 10-14-2011 10:53 AM

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.

vasile002 10-15-2011 07:28 AM

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

rockoboyt 10-17-2011 07:28 AM

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,

vasile002 10-17-2011 12:10 PM

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?

rockoboyt 10-17-2011 12:47 PM

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


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