Mail not sent through terminal


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Mail not sent through terminal
# 1  
Old 09-18-2014
Mail not sent through terminal

The Mail not sent through terminal by using following command,
Code:
mail -s " check " upload.xxx@example.com> msg.txt

By listing the location of following ouputs,Please check this
Code:
 [root@edms032 ~]# ls -ld / /etc/ /etc/mail
  drwxr-xr-x  30 root root  4096 Sep 18 17:56 /
  drwxr-xr-x  89 root root 12288 Sep 18 17:58 /etc/
  drwxr-xr-x   3 root root  4096 Sep 13 15:43 /etc/mail
   

  [root@edms032 ~]# ls -l /etc/mail
  total 348
  -rw-r--r--  1 root root   331 Jun  9  2006 access
  -rw-r-----  1 root root 12288 Feb 24  2009 access.db
  -rw-r--r--  1 root root     0 Jun  9  2006 domaintable
  -rw-r-----  1 root root 12288 Feb 24  2009 domaintable.db
  -rw-r--r--  1 root root  5588 Jun  9  2006 helpfile
  -rw-r--r--  1 root root    64 Jun  9  2006 local-host-names
  -rw-r--r--  1 root root     0 Jun  9  2006 mailertable
  -rw-r-----  1 root root 12288 Feb 24  2009 mailertable.db
  -rw-r--r--  1 root root  1035 Jun  9  2006 Makefile
  -rw-r--r--  1 root root 57999 Sep 13 13:24 sendmail.cf
  -rw-r--r--  1 root root 58078 Feb 24  2009 sendmail.cf.bak
  -rw-r--r--  1 root root  6744 Jan 24  2011 sendmail.mc
  drwxr-xr-x  2 root root  4096 Feb 24  2009 spamassassin
  -rw-r--r--  1 root root 40271 Sep 13 14:14 submit.cf
  -r--r--r--  1 root root 41347 Jun  9  2006 submit.cf.bak
  -rw-r--r--  1 root root   952 Jun  9  2006 submit.mc
  -rw-r--r--  1 root root   128 Sep 12 19:44 trusted-users
  -rw-r--r--  1 root root     0 Jun  9  2006 virtusertable
  -rw-r-----  1 root root 12288 Feb 24  2009 virtusertable.db
   
[root@edms032 ~]# ls -al /etc/mail
  total 372
  drwxr-xr-x   3 root root  4096 Sep 13 15:43 .
  drwxr-xr-x  89 root root 12288 Sep 18 17:58 ..
  -rw-r--r--   1 root root   331 Jun  9  2006 access
  -rw-r-----   1 root root 12288 Feb 24  2009 access.db
  -rw-r--r--   1 root root     0 Jun  9  2006 domaintable
  -rw-r-----   1 root root 12288 Feb 24  2009 domaintable.db
  -rw-r--r--   1 root root  5588 Jun  9  2006 helpfile
  -rw-r--r--   1 root root    64 Jun  9  2006 local-host-names
  -rw-r--r--   1 root root     0 Jun  9  2006 mailertable
  -rw-r-----   1 root root 12288 Feb 24  2009 mailertable.db
  -rw-r--r--   1 root root  1035 Jun  9  2006 Makefile
  -rw-r--r--   1 root root 57999 Sep 13 13:24 sendmail.cf
  -rw-r--r--   1 root root 58078 Feb 24  2009 sendmail.cf.bak
  -rw-r--r--   1 root root  6744 Jan 24  2011 sendmail.mc
  drwxr-xr-x   2 root root  4096 Feb 24  2009 spamassassin
  -rw-r--r--   1 root root 40271 Sep 13 14:14 submit.cf
  -r--r--r--   1 root root 41347 Jun  9  2006 submit.cf.bak
  -rw-r--r--   1 root root   952 Jun  9  2006 submit.mc
  -rw-r--r--   1 root root   128 Sep 12 19:44 trusted-users
  -rw-r--r--   1 root root     0 Jun  9  2006 virtusertable
  -rw-r-----   1 root root 12288 Feb 24  2009 virtusertable.db


Last edited by vbe; 09-18-2014 at 09:41 AM.. Reason: code tags... & rm email tag
# 2  
Old 09-18-2014
Posted by kannansoft1985:
Quote:
The Mail not sent through terminal by using following command,
mail -s " check " upload.xxx@example.com > msg.txt
Hello kannansoft1985,

I think there is no need of using > operator here. Not sure are you trying to put the output to file? This can't be done. But if you want to see the logs for same you can navigate to /var/log and refer the maillog file(In Bash). But by default I guess only root has the read permissions for same.

If you simply want to send mail then.

Code:
mail -s " check " upload.xxx@example.com < msg.txt

Thanks,
R. Singh
# 3  
Old 09-18-2014
Sorry Ravinder typing mistake while I am posting,

I am also using only like this ,
Code:
mail -s " check " upload.xxx@example.com < msg.txt

Actually I am trying to send a mail through terminal ,But I can't send it .If it is possible please help me out of this problem.

Last edited by vbe; 09-18-2014 at 10:24 AM.. Reason: rm email tag + code tags
# 4  
Old 09-18-2014
Posted by kannansoft1985:
Quote:
Sorry Ravinder typing mistake while I am posting,

I am also using only like this ,

mail -s " check " upload.xxx@example.com < msg.txt

Actually I am trying to send a mail through terminal ,But I can't send it .If it is possible please help me out of this problem.
Hello kannansoft1985,
As a part of basic trouble shooting you can do the following.

1- You can check either server got recently rebooted recently or not by uptime.
2- You can then check the mail service by using ps -ef | grep mail command.
3- If above 2 optoins are fine then you can check the logs for mail in path /var/log/maillog : Mail server logs for same.

Kindly do these steps as a part of first step and let us know if this helps and you have any further queries.

Thanks,
R. Singh
# 5  
Old 09-18-2014
Output :
Code:
[root@edms032 ~]# uptime  
18:38:11 up 42 min,  2 users,  load average: 0.09, 0.09, 0.06
   
  [root@edms032 ~]# ps -ef | grep mail 
root      6678     1  0 18:37 pts/1    00:00:00 send-mail -i upload.tirunelveli@licindia.com
root      6691  6642  0 18:38 pts/1    00:00:00 grep mail
   
  [root@edms032 ~]# tail -5 /var/log/maillog 
Sep 18 12:50:57 edms032 sendmail[8504]: My unqualified host name (edms032) unknown; sleeping for retry
 Sep 18 12:52:17 edms032 sendmail[8504]: unable to qualify my own domain name (edms032) -- using short name
 Sep 18 12:53:37 edms032 sendmail[8504]: s8I7MHtb008504: from=root, size=126, class=0, nrcpts=1, msgid=<201409180722.s8I7MHtb008504@edms032>, relay=root@localhost
 Sep 18 12:53:37 edms032 sendmail[8504]: s8I7MHtb008504: to=upload.tirunelveli@licindia.com, delay=00:01:20, mailer=esmtp, pri=30126, dsn=4.4.3, stat=queued
 Sep 18 18:37:52 edms032 sendmail[6678]: My unqualified host name (edms032) unknown; sleeping for retry

# 6  
Old 09-18-2014
Posted by kannansoft1985:
Quote:
Output :
Code:
[root@edms032 ~]# uptime 18:38:11 up 42 min, 2 users, load average: 0.09, 0.09, 0.06 [root@edms032 ~]# ps -ef | grep mail root 6678 1 0 18:37 pts/1 00:00:00 send-mail -i upload.tirunelveli@licindia.comroot 6691 6642 0 18:38 pts/1 00:00:00 grep mail [root@edms032 ~]# tail -5 /var/log/maillog Sep 18 12:50:57 edms032 sendmail[8504]: My unqualified host name (edms032) unknown; sleeping for retry Sep 18 12:52:17 edms032 sendmail[8504]: unable to qualify my own domain name (edms032) -- using short name Sep 18 12:53:37 edms032 sendmail[8504]: s8I7MHtb008504: from=root, size=126, class=0, nrcpts=1, msgid=<201409180722.s8I7MHtb008504@edms032>, relay=root@localhost Sep 18 12:53:37 edms032 sendmail[8504]: s8I7MHtb008504: to=upload.tirunelveli@licindia.com, delay=00:01:20, mailer=esmtp, pri=30126, dsn=4.4.3, stat=queued Sep 18 18:37:52 edms032 sendmail[6678]: My unqualified host name (edms032) unknown; sleeping for retry
Hello kannansoft1985,

I am pretty much sure like you need to check your /etc/hosts file(Bash) and make sure it has all the correct entries like example as follows. ip.add.re.ss oracle oracle.mydomainname.com Hope this helps.

Thanks,
R. Singh
# 7  
Old 09-18-2014
Please check this host file and find out what the problem is,
Code:
cat /etc/hosts
#My Host File
# Do not remove the following line, or various programs
# that requires network functionality will fail
10.66.62.28        edms032   032
127.0.0.1  localhost.localdomain  localhost

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies

3. Shell Programming and Scripting

Cannot get terminal application to launch with a graphical launcher when successful in terminal

I have been having an extremely annoying problem. For the record, I am relatively new at this. I've only been working with unix-based OS's for roughly two years, mostly Xubuntu and some Kali. I am pretty familiar with the BASH language, as that's the default shell for debian. Now, I've made this... (16 Replies)
Discussion started by: Huitzilopochtli
16 Replies

4. UNIX for Dummies Questions & Answers

Sending Mail in OS X Terminal

Hi All! I would like your assistance with an issue that I have been having with OS X (Snow Leopard 10.6.8) and sending mail through the Terminal. I had been trying to send mail from Terminal to my GMail account from my home, where I have a Verizon DSL Internet connection routed through a... (0 Replies)
Discussion started by: danielsutton
0 Replies

5. OS X (Apple)

Read and manage mail under Terminal

When opening Terminal window under Mac OS Lion, I have a message saying I've got mail . It seems to be somewhere close to ~/Library/Server/Mail/Data/spool/ but I ignore what command to be typed in order to read it and suppress it later once read. (1 Reply)
Discussion started by: shub22
1 Replies

6. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

7. UNIX for Dummies Questions & Answers

Gnuplot wxt terminal vs x11 terminal

Hi, I installed ubuntu recently on my pc. And I installed gnuplot as well. When I first started working with gnuplot it was working . I did a plot and when I wanted to fit my data something happened and not the default terminal of gnuplot is xwt! I changed it to: set terminal x11, but it... (0 Replies)
Discussion started by: cosmologist
0 Replies

8. UNIX for Advanced & Expert Users

Pseudo-terminal will not be allocated because stdin is not a terminal.

I am trying to automate a SSH login using Keys using the following command ssh -i id_rsa usernamw@ipaddr. I am successful in doing this and i am getting the Warning Screen and I logon successfully. but when I am executing the command tail -1cf put.dat | ssh -i id_rsa username@ipaddr > get.dat ... (1 Reply)
Discussion started by: Shivdatta
1 Replies

9. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

10. UNIX for Advanced & Expert Users

connecting to unix through hyper terminal - as a dumb terminal

I just changed from windows NT to XP and I am no longer able to connect to my unix system. I used to use hyper terminal -- which acts as dumb terminal to my main frame unix system. I think one of the options used to be "direct to comX". This option isn't listed now. I use a serial port and the... (2 Replies)
Discussion started by: michelle
2 Replies
Login or Register to Ask a Question