Mail recieving problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mail recieving problem
# 1  
Old 08-09-2006
Mail recieving problem

Hi

I have been trying to resolve this issue refering to all your previous post..... but had a hard luck. Below is the code which is when run from command prompt sends the mail taking the mail related crediantials ( email id where to send the mail ) from a xml file whose path is mentioned in RUNTIME_OPTIONS as -Dconfig.file=$CONFIG_HOME/batch.xml.

Please see the code :
Code:
**********************************************************
#!/bin/ksh
#
#     This Script will Start Policy Verification 
###########################################
cd /opt/bea/wls61/config/dev05/batch_automation/batchPolicy 
JAVA_HOME=/opt/bea/jdk131
WL_HOME=/opt/bea/wls61
INSTANCE=dev05
FRAMEWORK_LIB=$WL_HOME/config/$INSTANCE/lib/com/fits
SERVICE_HOME=$WL_HOME/config/$INSTANCE/services
BATCH_HOME=$WL_HOME/config/$INSTANCE/batch_automation/lib
CONFIG_HOME=$WL_HOME/config/$INSTANCE/batch_automation/config

CLASSPATH=.:$BATCH_HOME/batch.jar:$BATCH_HOME/classes12.jar:$SERVICE_HOME/plus/lib/com/fits/plus.jar:$SERVICE_HOME/diary/lib/com/fits/diary.jar:$FRAMEWORK_LIB/FitsUtil.jar:$FRAMEWORK_LIB/FitsFramework.jar:$FRAMEWORK_LIB/jdom.jar:$BATCH_HOME/NetComponents.jar:$FRAMEWORK_LIB/xercesImpl.jar:$FRAMEWORK_LIB/customerService.jar:$SERVICE_HOME/numbering/lib/numberingService.jar:$SERVICE_HOME/question/lib/com/fits/QuestionEngine.jar:$WL_HOME/lib/weblogic.jar:$SERVICE_HOME/ios/lib/ios.jar:$BATCH_HOME/AccountService.jar:$BATCH_HOME/AddressService.jar:$BATCH_HOME/Producer.jar:$FRAMEWORK_LIB/FITSDBPool.jar

BATCH_LIB=$BATCH_HOME/lib

CLASSPATH=$BATCH_HOME/claims.jar:$BATCH_HOME/mail.jar:$BATCH_HOME/activation.jar:$CLASSPATH

RUNTIME_OPTIONS="-Dconfig.file=$CONFIG_HOME/batch.xml  -Duser.timezone=America/New_York -Djava.naming.factory.initial=weblogic.jndi.T3InitialContextFactory -Djava.naming.provider.url=t3://172.16.18.149:8005 -Djava.naming.security.principal=system -Djava.naming.security.credentials=mfxclaims"

mv ./logs/200* ./logs/bak
echo RUNTIME_OPTIONS=$RUNTIME_OPTIONS
echo CLASSPATH=$CLASSPATH

$JAVA_HOME/bin/java $RUNTIME_OPTIONS -cp $CLASSPATH com.fits.service.claimservice.batch.policyverification.BatchPolicyVerificationMain  $1 $2 $3 > logs/batchPolicy.log  2>&1
*********************************************************

Now above script when run as ./startBatchPolicy.sh sends the mail refering to batch.xml file ( looks for email id to which mail has to be sent ) .


Now what I did is, instead of declaring the variables in the same script , I made a common script & invoked this common script in other script.

Following is the common script ( batch_settings.sh that contais all common variable settings ):

Code:
*********************************************************
##########################################################
#! /bin/ksh
# This is setting file invoked by  each batch job. 
#
###########################################################

export JAVA_HOME=/opt/bea/jdk131
export BEA_HOME=/opt/bea
export WL_HOME=/opt/bea/wls61
export INSTANCE=dev05
export FRAMEWORK_LIB=$WL_HOME/config/$INSTANCE/lib/com/fits
export SERVICE_HOME=$WL_HOME/config/$INSTANCE/services
export CONFIG_HOME=$WL_HOME/config/$INSTANCE/batch_automation/config
export BATCH_HOME=$WL_HOME/config/$INSTANCE/batch_automation
export COMMON_LIB=$BATCH_HOME/lib
export WL_LIB=$WL_HOME/lib
export APP_HOME=$WL_HOME/config/$INSTANCE
export SECURITY=$APP_HOME/applications/securityframework
export INITIAL_CONTEXT_PROVIDER=t3://172.16.18.149:8005

export CLASSPATH=.:$WL_HOME/lib/weblogic.jar:$COMMON_LIB/mail.jar:$COMMON_LIB/activation.jar:$COMMON_LIB/batch.jar:$COMMON_LIB/claims.jar:$COMMON_LIB/wlicommon.jar:$COMMON_LIB/docucorp.jar:$COMMON_LIB/security.jar:$COMMON_LIB/AddressService.jar:$COMMON_LIB/ais.jar:$COMMON_LIB/Producer.jar:$COMMON_LIB/classes12.jar:$COMMON_LIB/AccountService.jar:$COMMON_LIB/NetComponents.jar:$COMMON_LIB/customerservice.jar:$COMMON_LIB/castor.jar:$COMMON_LIB/claims-container.jar:$COMMON_LIB/ids.jar:$COMMON_LIB/jdom.jar:$COMMON_LIB/numberingService.jar:$COMMON_LIB/plus.jar:$COMMON_LIB/diary.jar:$COMMON_LIB/ais.jar:$COMMON_LIB/DocucorpMsg.jar:$COMMON_LIB/MbpsBatch.jar:$COMMON_LIB/dom4j.jar:$COMMON_LIB/commons-logging.jar:$COMMON_LIB/cglib2.jar:$COMMON_LIB/commons-lang.jar:$COMMON_LIB/FitsFramework.jar:$COMMON_LIB/FitsUtil.jar:$COMMON_LIB/hibernate2.jar:$COMMON_LIB/jdbc2_0-stdext.jar:$COMMON_LIB/jta.jar:$COMMON_LIB/junit.jar:$COMMON_LIB/odmg.jar:$COMMON_LIB/QuestionEngine.jar:$COMMON_LIB/xerces.jar:$COMMON_LIB/jxl.jar:$COMMON_LIB/ibatis-sqlmap-2.jar:$COMMON_LIB/ibatis-common-2.jar:$COMMON_LIB/xercesImpl.jar:$COMMON_LIB/DocService.jar:$FRAMEWORK_LIB/FitsUtil.jar:$FRAMEWORK_LIB/customerservice.jar:$FRAMEWORK_LIB/jdom.jar:$FRAMEWORK_LIB/FitsFramework.jar:$FRAMEWORK_LIB/FITSDBPool.jar:$FRAMEWORK_LIB/xercesImpl.jar:$SERVICE_HOME/ios/lib/ios.jar:$SERVICE_HOME/numbering/lib/numberingService.jar:$SERVICE_HOME/plus/lib/com/fits/plus.jar:$SERVICE_HOME/diary/lib/com/fits/diary.jar:$SERVICE_HOME/account/lib/AccountService.jar:$SERVICE_HOME/account/lib/AddressService.jar:$SERVICE_HOME/question/lib/com/fits/QuestionEngine.jar:$CONFIG_HOME

export RUNTIME_OPTIONS="-Dconfig.file=$CONFIG_HOME/batch.xml -Duser.timezone=America/New_York -Djava.naming.factory.initial=weblogic.jndi.T3InitialContextFactory -Djava.naming.provider.url=$INITIAL_CONTEXT_PROVIDER -Djava.naming.security.principal=system -Dbea.home=$BEA_HOME -Dlog.dir=./logs -Djava.naming.security.credentials=mfxclaims"

*********************************************************

Below is the script that envokes the above script ie batch_settings.sh.

Code:
***************************************

#! /bin/ksh
#
#     This Script will Start Policy Verification 
###########################################
cd /opt/bea/wls61/config/dev05/batch_automation/batchPolicy 
.  /opt/bea/wls61/config/dev05/batch_automation/batch_settings.sh

mv ./logs/200* ./logs/bak
echo RUNTIME_OPTIONS=$RUNTIME_OPTIONS
echo CLASSPATH=$CLASSPATH


$JAVA_HOME/bin/java $RUNTIME_OPTIONS -cp $CLASSPATH com.fits.service.claimservice.batch.policyverification.BatchPolicyVerificationMain  $1 $2 $3 > logs/batchPolicy.log  2>&1 &

************************************************************

Now with this optimized code evrything is ok except that it is not sending mail as the uppermost code used to....... I am really confused....... Any help will be highly appreciated..........

Thanks

Pankaj

Last edited by vino; 08-09-2006 at 02:32 AM.. Reason: Always put your code within the code tags.
# 2  
Old 08-09-2006
Do all the three scripts appear just like the above in the actual script ?

Because, the shebang #! /bin/ksh should ALWAYS be the first line of the script.
# 3  
Old 08-09-2006
Hi

Yeah All the script starts with

#!/bin/ksh.

Regards
Pankaj
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Problem recieving files from net2ftp

I have a very strange problem occurring with a Net2FTP site. I've setted up a VSFTPD with SSL/TLS enabled and it works just fine for almos all archives, however, if someone put a .msg file (Outlook messages), if I download via Net2FTP, the file arrives different (different MD5) and it doesn't... (3 Replies)
Discussion started by: Zarnick
3 Replies

2. Shell Programming and Scripting

awk recieving script variables.

Hi, I have a script which recieves 3 variables. #!/bin/bash Directory=$1 Archive=$2 Log_File_Path=$3 ... ... ... gzip -l *.xml.gz |awk '{print $1"^"$2"^"$4}'|sed '$d' In awk instead of $1 which should be Compressed size its recieving Directory name. How should this be... (1 Reply)
Discussion started by: chetan.c
1 Replies

3. Programming

scripting for recieving a prompt

I have to run a script provided by a vendor. Its an executable so I can't change it. basically after I call it it prompts me for a password. The script does not provide a way for me to pass a password with the command that calls the script. I would like to automate running this script from... (5 Replies)
Discussion started by: guessingo
5 Replies

4. Red Hat

Mail Problem. Maybe, it is a DNS Problem!

Hi, i've a redhat linux 9 upadated by redhat from 7 version to 9 version. A couple of days ago i was a problem with my mail, in other words i'm not able to get any email nor to send any email. I've a proxy configuration and i tried to set iptables in order to verify the port. The 110,255 and 995... (1 Reply)
Discussion started by: pintalgi
1 Replies

5. Cybersecurity

recieving undeliverable reciepts of spam mails that seem to be coming from my domain

Hi I am getting undeliverable reciepts for what look like spam emails coming from my domain. Here is an example: Your message did not reach some or all of the intended recipients. Subject:Attack your baby, she wants Sent:02/12/2008 01:45 The following recipient(s) cannot be reached:... (4 Replies)
Discussion started by: edzillion
4 Replies

6. UNIX for Advanced & Expert Users

postfix sending but not recieving

Hi all, I just setup postfix on my server thats running Centos 5.x with webmin. Now I can send email out of the server but I cant receive email. Server side I can telnet into the 110 and 25 port but coming from the outside of the box I can only telnet into the 110 port but not port 25. The... (1 Reply)
Discussion started by: mcraul
1 Replies

7. Forum Support Area for Unregistered Users & Account Problems

new account, not recieving email to confirm

Hello, I registered an account several hours ago, and never recieved the email registration link in my email account. Read the instructions posted here, and requested to resend registration link, and this one also has not shown up in my email acccount. yes, I've checked the bulk folder as... (1 Reply)
Discussion started by: denn
1 Replies

8. Post Here to Contact Site Administrators and Moderators

Why am I not recieving email notification?

I have been a member for almost a year now. I have always recieved email notifications when I select "subcribe to this thread" at the bottom of posts that I reply to. However, over the last month or so, I have not been recieving email notification of replys to posts I respond to. I have... (6 Replies)
Discussion started by: Kelam_Magnus
6 Replies

9. UNIX for Dummies Questions & Answers

Problem with mail

Hello! I have to servers with Solaris 2.7. I mail from first to second ( mailx user@dev < letter ). But mail not arrive to second. It return by daemon with explanation: .... --- Transcript of session follows --- 550 5.1.2 user@dev... Host unknown (Name server: mailhost.serv.dom: host not... (2 Replies)
Discussion started by: Colf
2 Replies

10. UNIX for Dummies Questions & Answers

mail problem (NOT Mail or Mail.app)

When I try to use the CLI mail, I get the following error. What's wrong? Welcome to Darwin! % mail root Subject: test test . EOT % /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory Do I just need to change the... (1 Reply)
Discussion started by: chenly
1 Replies
Login or Register to Ask a Question