Computing.Net > Forums > Linux > How to send a mail

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to send a mail

Reply to Message Icon

Name: judson_jebaraj8
Date: April 9, 2006 at 13:05:19 Pacific
OS: RedHat Linux 9
CPU/Ram: Intel
Product: 1 GB
Comment:

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




Sponsored Link
Ads by Google

Response Number 1
Name: 3Dave
Date: April 10, 2006 at 00:40:31 Pacific
Reply:

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


0

Response Number 2
Name: judson_jebaraj8
Date: April 10, 2006 at 12:42:52 Pacific
Reply:

Hi,

Can you let me know the exact syntax or steps.

Regards
Jebaraj


0

Response Number 3
Name: 3Dave
Date: April 11, 2006 at 02:44:05 Pacific
Reply:

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
.
EOT

Your mail should now have been sent.


0

Response Number 4
Name: judson_jebaraj8
Date: April 14, 2006 at 06:43:04 Pacific
Reply:

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


0

Response Number 5
Name: 3Dave
Date: April 16, 2006 at 14:33:20 Pacific
Reply:

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?


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: How to send a mail

How to send mail after Logrotation www.computing.net/answers/linux/how-to-send-mail-after-logrotation/28779.html

How to install a Zip Drive, Floppy Disk, CD-ROM and a CD-RW www.computing.net/answers/linux/how-to-install-a-zip-drive-floppy-disk-cdrom-and-a-cdrw/90.html

how to write a touch screen driver www.computing.net/answers/linux/how-to-write-a-touch-screen-driver/17696.html