Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: shell script to send mail

Re: shell script to send mail

From: David A. Barbour <dbarbour_at_nucentrix.net>
Date: Wed, 11 Apr 2001 08:33:16 -0700
Message-ID: <F001.002E7123.20010411073520@fatcity.com>

Viraj,

As I remember, your initial query mentioned you were trying to send a message from an AIX box. First check to see if sendmail is running on your system. Execute the command ps -ef |grep sendmail . You should receive a response that includes a line like the following:

         root 3900 2084 0 Mar 24 - 0:01 sendmail: accepting connections

If you don't, then your system isn't going to send any mail, because it isn't configured. If it's running, check your /etc/sendmail.cf file. This may be the cause of your problem. Remember, if you make any changes to this file, you must recompile it and issue the refresh -s sendmail command before it becomes effective. Your problem may also lie in the /etc/aliases file. This also needs to be recompiled and the refresh command issued if changed. There is a little bit of work required in setting up sendmail on any UNIX system - not just AIX - but these are three good places to look for problems to begin with. I suggest you get a copy of O'Reilly's Sendmail if you're going to be using mail from UNIX boxes on a regular basis.

Assuming your sendmail is running, AIX uses the commands mail, Mail, and mailx interchangeably. I just use mail (cause I hate to type extra characters). Make sure you're executing the mail command from the directory containing the msg file, otherwise you'll need a fully qualified path.

Try using single quotes instead of double quotes around your subject. To see if your box is sending mail at all try:

        mail -s 'Test' myusername_at_myunixhostname<msg

If you don't get the mail, see your sys admin. If you do, then the problem most likely lies in one of the two files I mentioned earlier. You'll probably need to see your sys admin there as well.

Hope this helps.

David A. Barbour
Oracle DBA

Viraj Luthra wrote:
>
> Hello,
>
> This is the second time I am writing this message, dont know what happened where the
>last message went.
>
> Basically wanted to thank every one who ever responded, with this easy construct in
>the shell.
>
> But the problem, is that I sent like this,
>
> mailx -s "from the sco box" viraj999_at_lycos.com < msg
>
> where msg is a regular file and contains the string -
> this is a test only
>
> But I have waited for a long time and it did not appear in the above address.
>
> Any ideas why it did not reach. I have looked at the man for mailx, and I have
>already checked the various files, like dead.letter etc. but of no use, it simply
>does not exist.
>
> Please help.
>
> Regards,
>
> Raja
> --
>
> On Tue, 10 Apr 2001 09:15:40
> SHAIBAL TALUKDER wrote:
> >
> >Raja,
> >
> >If you have unix mail utility you can send mail form unix. At the system prompt
>type -
> >
> >mailx -s "Subject" mailaddress_at_xy.com < msg
> >
> >hope this helps.
> >
> >Shaibal
> >
> > Viraj Luthra <viraj999_at_lycos.com> wrote:
> >Paul,
> >
> >I dont need that software. I need the code to write in my software itself.
> >
> >rgds,
> >
> >raja
> >--
> >
> >On Mon, 09 Apr 2001 21:10:52
> >Paul Drake wrote:
> >>check out tripwire ... http://sourceforge.net/projects/tripwire/
> >>
> >>Viraj Luthra wrote:
> >>>
> >>> Hello all,
> >>>
> >>> I need help. I need to write a shell script (aix box), when ever some loads a
>piece of software.
> >>>
> >>> thanks
> >>>
> >>> raja
> >>--
> >>Please see the official ORACLE-L FAQ: http://www.orafaq.com
> >>--
> >>Author: Paul Drake
> >> INET: paled_at_home.com
> >>
> >>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> >>San Diego, California -- Public Internet access / Mailing Lists
> >>--------------------------------------------------------------------
> >
> >
> >
> >---------------------------------
> >Do You Yahoo!?
> >Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.
>
> Get 250 color business cards for FREE! at Lycos Mail
> http://mail.lycos.com/freemail/vistaprint_index.html
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Viraj Luthra
> INET: viraj999_at_lycos.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: David A. Barbour
  INET: dbarbour_at_nucentrix.net

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Apr 11 2001 - 10:33:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US