LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-17-2011, 01:34 PM   #1
bino25
Member
 
Registered: Dec 2010
Posts: 50

Rep: Reputation: 11
serious script help needed


I am in need of some serious help. I am a windows admin that was thrown the responsibility of our unix servers when our admin walked out on Tuesday (I was the only person that had ever used unix before).

Anyway, there is a script (attached txt file) our oracle users are calling (which I do not know unix scripting), and the email portion of it is failing. If they enter jsmith@company.com it will work, but if they enter the newly created exchange alias GROUPALIAS@company.com, it never sends the email (maybe the capital letters make a difference?)If anybody could help me with this, I would greatly appreciate it. The script is about 190 lines long (I changed line 24 to generic).

Thanks so much for whoever can help!!!
Attached Files
File Type: txt email_list.txt (9.1 KB, 29 views)
 
Old 02-17-2011, 01:46 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Technically case does not matter, so why would you capitalize it in the first place?
 
Old 02-17-2011, 01:52 PM   #3
bino25
Member
 
Registered: Dec 2010
Posts: 50

Original Poster
Rep: Reputation: 11
Because that's they way it was presented to me didn't know if that would matter for what the script is looking for
 
Old 02-17-2011, 02:21 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
What's the output of the script? It's hard to look for something
specific w/o the messages the script generates.


Cheers,
Tink
 
Old 02-17-2011, 07:57 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You can also add
Code:
set -xv
as a cmd just after the comments at the top. This will show you the before & after versions of each line of code as it interprets and runs them, along with any output. Great for debugging.
 
Old 02-17-2011, 07:59 PM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
Originally Posted by bino25 View Post
Because that's they way it was presented to me didn't know if that would matter for what the script is looking for
Oh ok, I was just wondering man. Output would be nice though, if you could try to get us some.
 
Old 02-18-2011, 07:33 AM   #7
bino25
Member
 
Registered: Dec 2010
Posts: 50

Original Poster
Rep: Reputation: 11
No errors get reported, the email just never gets sent (although the oracle says the run completed and I don't see any errors)
 
Old 02-18-2011, 09:19 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by bino25 View Post
No errors get reported, the email just never gets sent (although the oracle says the run completed and I don't see any errors)
I'd check the log files (usually in /var/log), for output when you run the script manually. Look in either /var/log/messages or /var/log/mail.XX (could be mail, mail.info, or mail.warn), and see if the email message is leaving your box, and heading outwards. You'll see something obvious, look for the recipient name. If you can send to ONE email address, then chances are the other address isn't configured correctly, or that the box it's on isn't set up to accept incoming connections.

You mention the 'new' exchange alias...are you migrating from another mail system?? If so, the firewall rules/etc may not be set up right to allow incoming relays from your system. Also, make sure that the exchange server has incoming POP3/SMTP enabled. Could be it's only doing exchange-to-exchange, and is ignoring your request. Again, the logs will point that out to you, and you could see the bounce-back message there. Might also want to check /var/spool/clientmqueue (or mqueue) for received messages for the root user, or whoever you have set up to be the postmaster on that box. The rejection may be in there, too..
 
Old 02-18-2011, 04:15 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by bino25 View Post
No errors get reported, the email just never gets sent (although the oracle says the run completed and I don't see any errors)
How is the script normally being run?

There's a lot of echo statements in there - if none show on
screen something is majorly failing all together.



Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mencoder script help needed mrgreaper Linux - Newbie 14 09-14-2009 12:13 PM
Script help needed! Atif_Khan Linux - Software 25 09-03-2007 12:51 AM
script help needed: patilvidya Linux - Software 2 08-29-2007 08:53 AM
Script needed ganeshinforum Programming 2 01-05-2007 07:29 AM
little script help needed abisko00 Programming 7 07-11-2005 08:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration