Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi
I need to send a mail to mail Corporate mail ID, My scenario is as follows...
I'm doing some log rotation, after log rotation I need to send mail to my corporate mail ID. This particular linux system in Internal network.
Can any one suggest me what are the packages I need to install and what are the configuration file I need to change.
Regards
Jebaraj

You can configure logrotate to send emails, are you able to send a mail by hand from the command line with /bin/mail?

To send mail from the command line:
$ mail foo@bar.org
Subject: My Subject
Blah blah blah...
This is the body of my email
End the message with Ctrl&D or
with a full stop by itself like
.
EOTYour mail should now have been sent.

Following error messages i'm getting:
[root@hyduplssf01 mail]# mail -s test1 judson.durairaj@xxxxxxxx.com -v
test2
.
Cc:
judson.durairaj@xxxxxxxx.com... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.12.8/8.12.8; Fri, 14 Apr 2006 11:04:17 +0530
[root@hyduplssf01 mail]# mail -s test3 judson.durairaj@xxxxxxxx.com -v
test3
.
Cc:
judson.durairaj@xxxxxxxx.com... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.12.8/8.12.8; Fri, 14 Apr 2006 11:04:48 +0530
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello hyduplssf01 [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<root@localhost.localdomain> SIZE=54
250 2.1.0 <root@localhost.localdomain>... Sender ok
>>> RCPT To:<judson.durairaj@xxxxxxxx.com>
>>> DATA
250 2.1.5 <judson.durairaj@xxxxxxxx.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 k3E5YmAl021780 Message accepted for delivery
judson.durairaj@xxxxxxxx.com... Sent (k3E5YmAl021780 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 localhost.localdomain closing connection
[root@hyduplssf01 mail]#[root@hyduplssf01 mail]# tail -f /var/log/maillog
Apr 14 11:00:42 hyduplssf01 sendmail[21749]: k3E5UgkD021749: from=root, size=54, class=0, nrcpts=1, msgid=<200604140530.k3E5UgkD021749@localhost.localdomain>, relay=root@localhost
Apr 14 11:00:42 hyduplssf01 sendmail[21751]: k3E5UgAl021751: from=<root@localhost.localdomain>, size=361, class=0, nrcpts=1, msgid=<200604140530.k3E5UgkD021749@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=hyduplssf01 [127.0.0.1]
Apr 14 11:00:42 hyduplssf01 sendmail[21749]: k3E5UgkD021749: to=judson.durairaj@xxxxxxxx.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30048, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k3E5UgAl021751 Message accepted for delivery)
Apr 14 11:02:42 hyduplssf01 sendmail[21753]: k3E5UgAl021751: to=<judson.durairaj@xxxxxxxx.com>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:02:00, xdelay=00:02:00, mailer=relay, pri=30355, relay=int-ch1gw.online-age.net. [3.159.232.200], dsn=4.0.0, stat=Deferred: Connection timed out with int-ch1gw.online-age.net.
Apr 14 11:04:17 hyduplssf01 sendmail[21772]: k3E5YHcS021772: from=root, size=54, class=0, nrcpts=1, msgid=<200604140534.k3E5YHcS021772@localhost.localdomain>, relay=root@localhost
Apr 14 11:04:17 hyduplssf01 sendmail[21774]: k3E5YHAl021774: from=<root@localhost.localdomain>, size=361, class=0, nrcpts=1, msgid=<200604140534.k3E5YHcS021772@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=hyduplssf01 [127.0.0.1]
Apr 14 11:04:17 hyduplssf01 sendmail[21772]: k3E5YHcS021772: to=judson.durairaj@xxxxxxxx.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30048, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k3E5YHAl021774 Message accepted for delivery)
Apr 14 11:04:48 hyduplssf01 sendmail[21778]: k3E5YmfK021778: from=root, size=54, class=0, nrcpts=1, msgid=<200604140534.k3E5YmfK021778@localhost.localdomain>, relay=root@localhost
Apr 14 11:04:48 hyduplssf01 sendmail[21780]: k3E5YmAl021780: from=<root@localhost.localdomain>, size=361, class=0, nrcpts=1, msgid=<200604140534.k3E5YmfK021778@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=hyduplssf01 [127.0.0.1]
Apr 14 11:04:48 hyduplssf01 sendmail[21778]: k3E5YmfK021778: to=judson.durairaj@xxxxxxxx.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30048, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k3E5YmAl021780 Message accepted for delivery)
Can you suggest me what mistake i made.Bye ...
Jebaraj

It all looks as thought it should work OK, the only error was int-ch1gw.online-age.net not being found, is this your ISPs mail server? Are you able to send a mail to root@localhost? Perhps your MTA (sendmail, postfix etc) is not configured correctly to send external mail?

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |