1819814 Members
3398 Online
109607 Solutions
New Discussion юеВ

mailx to to Dl

 
SOLVED
Go to solution
Sachin_29
Advisor

mailx to to Dl

mailx to to Dl
Is there any way that I can mailx to a distribution list without having a $HOME/.mailrc file?
We have a distribution list in Outlook for our group say group@something.com.
I am trting to do echo "Something"|mailx -s "Subject" group@something.com
it doesnt work
Any ideas?
Thanks
13 REPLIES 13
Dave La Mar
Honored Contributor

Re: mailx to to Dl

We do just that and more in our environment without issue.
What is the error?
What do your mail admins say about mail rejections (i.e. reverse lookup).

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
Sachin_29
Advisor

Re: mailx to to Dl

No error it just doesnt send an email
Dave La Mar
Honored Contributor

Re: mailx to to Dl

Does it get out of your mail queue?
Are there errors in any of your log files?
Is there no return mail message to the sender?
Again, insure your failure is not due to reverse lookup which is so common today with all the spam people receive.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
Michael Tully
Honored Contributor

Re: mailx to to Dl

What is in your mail queue?

# mailq

What is being logged to /var/adm/syslog/mail.log ?
Anyone for a Mutiny ?
Sachin_29
Advisor

Re: mailx to to Dl

mailq is empty
Sachin_29
Advisor

Re: mailx to to Dl

I am on AIX if that helps .
also if i type it through Command line it works it doesnt work thru the script?
Any reason???????
Dave La Mar
Honored Contributor

Re: mailx to to Dl

Guess we need to see that portion of your script as well as what you are entering on the command line.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
Sachin_29
Advisor

Re: mailx to to Dl

In the Script:
#/usr/bin/ksh
ls -la>a.txt
echo "Something"| mailx -s "Subject" group@something.com


On the command line it is
echo "Something"| mailx -s "Subject" group@something.com
Dave La Mar
Honored Contributor

Re: mailx to to Dl

Just a thought here ...
#/usr/bin/ksh -x
ls -la>a.txt
echo "Something"| mailx -s "Subject" group@something.com

Nohup the script as is and look for a message in the nohup.out.
If this does not reveal anything, use the -x as above and nohup to a clean nohup.out.
One of the two methods has to reveal something.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
Sachin_29
Advisor

Re: mailx to to Dl

I amrunning the script thru a scheduler!!
Patrick Wallek
Honored Contributor
Solution

Re: mailx to to Dl

Try fully qualifying the paths to mailx and echo.

/usr/bin/echo "Something" | /usr/bin/mailx -s "Something" someone@something.com
Dave La Mar
Honored Contributor

Re: mailx to to Dl

What Patrick mentions sets of the alarm coupled with your comment on running the script via a scheduler.
We have seen this same type of problem with an environment of the user starting a script via a scheduler.

1. Path to command not set.
2. Permissions of the user in the scheduler.

I put my money on Patrick's answer.
Thanks for adding the piece "scheduler" to you information.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
lawrenzo
Trusted Contributor

Re: mailx to to Dl

we have configured sendmial to use an exchange server in our organisation then use the /etc/mail/aliases file to add the web address.

see this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=610438

hello