cannot send any mails using mailx


 
Thread Tools Search this Thread
Operating Systems Linux Debian cannot send any mails using mailx
# 1  
Old 09-13-2006
howto configure mailx ?

hi

howto configure mailx ?

kind regards
ccc

Last edited by ccc; 09-13-2006 at 09:56 PM..
# 2  
Old 09-13-2006
mailx is already configured once it's installed. What seems to be the problem?

Carl
# 3  
Old 09-13-2006
I cannot send any mails to the root user;
Code:
ext:/var/mail#  echo "Message" | mailx -s "this is a test mail" root@localhost
ext:/var/mail# mail
No mail for root

other user get mails without problems.
I have debian sarge stable with postfix installed.
Code:
ext:/# newaliases

ext:/# postmap /etc/aliases
postmap: warning: /etc/aliases, line 2: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 3: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 4: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 5: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 6: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 7: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 8: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 9: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 10: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 11: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 12: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 14: record is in "key: value" format; is this an alias file?

ext:/# postalias /etc/aliases

ext:/# cat /etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root

ext:/# postconf alias_maps
alias_maps = hash:/etc/aliases

ext:/# /etc/init.d/postfix restart
Stopping mail transport agent: Postfix.
Starting mail transport agent: Postfix.

greetings
cc

Last edited by ccc; 09-13-2006 at 11:51 PM..
# 4  
Old 09-13-2006
Quote:
Originally Posted by ccc
I cannot send any mails to the root user;
Code:
ext:/var/mail#  echo "Message" | mailx -s "this is a test mail" root@localhost
ext:/var/mail# mail
No mail for root

other user get mails without problems.
I have debian sarge stable with postfix installed.
Do a:

Code:
grep root /etc/mail/aliases

I suspect root's mail is going somewhere else.

Carl
# 5  
Old 09-13-2006
Code:
ext:/# grep root /etc/mail/aliases
grep: /etc/mail/aliases: No such file or directory

maybe:
Code:
ext:/# grep root /etc/aliases
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
ext:/#

# 6  
Old 09-13-2006
It might be in /etc/aliases as well depending on how it's installed on debian. I have Mandrake and that's where mine is.

Carl
# 7  
Old 09-13-2006
I tried to add:
Code:
root: root

in /etc/aliases, but it doesn't help.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Mailx command running successfully but no mails received.

Hi, I am working on a HP-UX box. Mailx command running successfully but no mails received. Here is what I am doing rocfm@comhp73 - mailx -s "subject" abc@gmail.com < abc.txt Null message body; hope that's ok rocfm@comhp73 - echo $? 0 rocfm@comhp73 - echo "something" | mailx -v -s... (1 Reply)
Discussion started by: Sunayna
1 Replies

2. IP Networking

Set default return address for all mails sent from mailx

Hi, I have a question about mailx in Red Hat: If I use 'mail userid@mydomain.com -- -f root@mydomain.com', the return mail address will be root@mydomain.com. How can I make all mails sent from this system use root@mydomain.com as return address by default? Thank you in advance! nz (1 Reply)
Discussion started by: aixlover
1 Replies

3. Shell Programming and Scripting

2 mails from mailx command

hi, While using mailx command i am receiving 2 mails with the same content in both the mails.I am attaching a file to the mailx command. In one mail file is coming as attachement and in other attachment is not there. I am using mailx command in this way. echo "Some content" |mailx... (0 Replies)
Discussion started by: arijitsaha
0 Replies

4. Shell Programming and Scripting

mailx- how to delete least of mails

Hi, when i run the mailx command it gives me the least of mails . suppose there are 1- 150 mails and i want to delete 30 to 145 mails . then what command i have to use here? Thanks (6 Replies)
Discussion started by: aish11
6 Replies

5. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

6. AIX

Not able to send mails

Hi, I am not able to send mails to the recipents. I am using AIX 5.3 Version and using the below command. cat test.log|mail -s "TestMail" user1@mail.com Can you please tell me is there any configurations to be done or is the above command wrong? Thanks & Regards Sheshadri (3 Replies)
Discussion started by: arsheshadri
3 Replies

7. Shell Programming and Scripting

mailx is not working outside e-mails

HI i wrote schell script to send e-mail automatically. it works only e-mail for our company.say for example, company name is : abc, example: joe@abc.com every body is receiving with xxx@abc.com (abc.com) if any body from outside of our company like joe@xyz.com.(xyz.com) are not... (3 Replies)
Discussion started by: raosurya
3 Replies

8. Shell Programming and Scripting

Delete all mails using mailx or mail

Hi , ?im a newbie using shell scripts. Is there any way to write a script that will delete all mails from my mailbox using mail or mailx command Thanks for your time E. Festas (2 Replies)
Discussion started by: ninjanesto
2 Replies

9. UNIX for Dummies Questions & Answers

Does Mailx store the mails sent

Hi, I use mailx in a shell script to mail a message to the users. i wanted to know if mailx stores the mail that it sends? for eg in microsoft outlook all mails sent get stored in the outbox. is there such a facility with mailx? if not how i can do this so that for every mail sent, a backup... (6 Replies)
Discussion started by: munira_johar
6 Replies

10. Solaris

how to send mails to users on exchange server from sendmail/solaris(mailx)

Hi, Can anyone pls. tell me how to access Active directory from solaris. I am looking at solution by which I can send mail notification from the logs generated by scripts, to the users on Exchange server. I am trying for a Perl-LDAP module , but don't realy know how to go for it (5 Replies)
Discussion started by: ganeshh
5 Replies
Login or Register to Ask a Question