How to configure mailx command??


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to configure mailx command??
# 8  
Old 03-29-2007
Quote:
Originally Posted by gopidesaboyina
now you've correct script. you need to check smtp for mail sending/receving from that box. you may just check mails simply by sending mail from prompt. if you recive then we can look @ script otherwise need to work in that area..
good luck & post if any errors.

Testing mail :

mailx -s "Difference of files" ss@cs.com < press enter >
Enter some text
^d
I did has you said but still i'm not getting any mails.As you said,i think some configuration has to be done with SMTP.Can you please give me more details on that...i'm working on SunOS.

Thanks
Kumar
# 9  
Old 03-29-2007
Do you have sendmail installed and running on that box?
Code:
ps -ef | grep sendmail

If so, are you using a smart host (i.e. relaying)?

grep '^DS' /path/to/sendmail.cf (probably /etc/mail/sendmail.cf)

If not, is DNS configured correctly on the box?

more /etc/resolv.conf

Does the domain you're sending to have correctly configured MX records?

dig mx targetdomain.com (or use nslookup if dig not available)

If so, can you telnet to port 25 on the destination mail server?

What appears in the logs when you attempt to send the mail?
Code:
tail -f /var/log/syslog

Cheers
ZB

Last edited by Yogesh Sawant; 03-03-2010 at 07:34 AM.. Reason: added code tags
# 10  
Old 03-29-2007
Quote:
Originally Posted by zazzybob
Do you have sendmail installed and running on that box?

ps -ef | grep sendmail

If so, are you using a smart host (i.e. relaying)?

grep '^DS' /path/to/sendmail.cf (probably /etc/mail/sendmail.cf)

If not, is DNS configured correctly on the box?

more /etc/resolv.conf

Does the domain you're sending to have correctly configured MX records?

dig mx targetdomain.com (or use nslookup if dig not available)

If so, can you telnet to port 25 on the destination mail server?

What appears in the logs when you attempt to send the mail?

tail -f /var/log/syslog


Cheers
ZB
> ps -ef | grep sendmail

exim 1046 1 0 Feb 22 ? 0:06 /usr/lib/sendmail -bd -q15m
ssaravan 4850 2187 0 05:10:26 pts/5 0:00 grep sendmail
> grep '^DS' /etc/mail/sendmail.cf
DS
> more /etc/resolv.conf
domain xxxyyy.com
nameserver 127.0.0.1
nameserver 65.210.102.67
nameserver 65.220.102.61
> dig mx www.infics.com
dig: Command not found.
> nslookup mx www.infics.com
nslookup: Command not found.
>

Code:
tail -f /var/log/syslog
Mar 29 04:17:25 net exim[4357]: [ID 197553 mail.info] 2007-03-29 04:17:25 1HWsdB-00018G-0d => ssaravana <ssaravana@net.xxxyyy.com> R=localuser T=local_delivery
Mar 29 04:17:25 net exim[4357]: [ID 197553 mail.info] 2007-03-29 04:17:25 1HWsdB-00018G-0d Completed
Mar 29 04:17:42 net exim[4365]: [ID 197553 mail.info] 2007-03-29 04:17:42 Start queue run: pid=4365
Mar 29 04:17:42 net exim[4365]: [ID 197553 mail.info] 2007-03-29 04:17:42 End queue run: pid=4365
Mar 29 04:32:42 net exim[4493]: [ID 197553 mail.info] 2007-03-29 04:32:42 Start queue run: pid=4493
Mar 29 04:32:42 net exim[4493]: [ID 197553 mail.info] 2007-03-29 04:32:42 End queue run: pid=4493
Mar 29 04:47:42 net exim[4627]: [ID 197553 mail.info] 2007-03-29 04:47:42 Start queue run: pid=4627
Mar 29 04:47:42 net exim[4627]: [ID 197553 mail.info] 2007-03-29 04:47:42 End queue run: pid=4627
Mar 29 05:02:42 net exim[4771]: [ID 197553 mail.info] 2007-03-29 05:02:42 Start queue run: pid=4771
Mar 29 05:02:42 net exim[4771]: [ID 197553 mail.info] 2007-03-29 05:02:42 End queue run: pid=4771

i think the email ID is masked with some domail name..instead of the email id being like aaa@xxyyy.com...it is registered as aaa@net.xxxyyy.com

Last edited by Yogesh Sawant; 03-03-2010 at 07:36 AM.. Reason: added code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Configure mailx in Solaris 10

Hello, We are using exchange server in our environment. I need to configure mailx to send email from Solaris box to one mail I'd which is on exchange server. I know ip of exchange server.. Let me know where should I configure that ip to do the needful? (2 Replies)
Discussion started by: sureshsun
2 Replies

2. Red Hat

Mailx command

Using RHEL 5.5 New to using 'mailx' Was trying to check if mailx is configured. mailx command gives a list of unread mails. Now I tried to send mail using this command to a local or on network machine using mailx -s "Test2" "root@<servername>" But did not receive any message. (6 Replies)
Discussion started by: ikn3
6 Replies

3. Shell Programming and Scripting

mailx command

( cat textfile.txt; ) | mailx -s "test mail " `cat mailids.lst` from :'server@example.com' to : for all contacts in text file mailids.lst above command is sending mails correctly for all contacts in text file mailids.lst, but 'from' address is showing as 'server@example.com' but i want... (5 Replies)
Discussion started by: only4satish
5 Replies

4. Shell Programming and Scripting

configure from address in mailx command

Hi, I need to configure customized from address in mailx command. Can you pls tell me the option for configuring from address. Thanks Latika (9 Replies)
Discussion started by: latika
9 Replies

5. Solaris

mailx command

Dear all, Every time if i use mailx it is asking for entering the From Address. I want to set it in some place, So that it will take it by default whenever we send mails. Pl help on this. Regards JeganR (2 Replies)
Discussion started by: jegaraman
2 Replies

6. Solaris

Mailx command

HI All, I have an unix server , where sendmail command works for sending mail. But if i use mailx command it is not working. Is there any specific settings needed for this. Kindly help. Thanks and Regards Rj (1 Reply)
Discussion started by: jegaraman
1 Replies

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

8. Solaris

Configure mailx or sendmail

hi, I would like to configure mailx or sendmail to send out some mails to some users. I tried searching online for the configuration but it was kinda confusing. I thought that posting here might get someone to work with me step by step I tried sending out mail but i did not receive in my... (4 Replies)
Discussion started by: cghcgh
4 Replies

9. Shell Programming and Scripting

Mailx command

Hi, This post is regarding sending mails from Unix. How can we include "bcc" in a "mailx" command. I searched google to find out the -b option; but my man pages doesnot show that option(it throws me an error: "-b not found"). It has a "~b" option but i am not sure how to use it. Could you people... (2 Replies)
Discussion started by: Thumban
2 Replies

10. Shell Programming and Scripting

mailx command

Hi friends, i have seen the following line in some unix shell script . can some one explain me what exactly the statement is meant for ? ========================================================= mailx -s " Master Data Transmission Report for $TODAY at $TIME " < /etc/tr/tmp/$tmplog... (5 Replies)
Discussion started by: sveera
5 Replies
Login or Register to Ask a Question