Email forwarding to shell script is not working


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Email forwarding to shell script is not working
# 1  
Old 03-03-2013
Email forwarding to shell script is not working

Trying to redirect email received to shell script using the following command
in the .forward file
Code:
\vudum001, "| /home/vudum001/kk $1"


/home/vudum001 : Home directory
kk script file in home directory

kk file contents
Code:
echo $1 >>file1

gave 755 access to .forward as well as script (kk) file.

It is sending email to my inbox but shell script is not getting executed.

Any help would be appreciated.

---------- Post updated at 04:05 PM ---------- Previous update was at 03:36 PM ----------

Following is the error message form mail log file..
Code:
Mar  3 15:57:24 server sendmail[7255]: r23KvO6E007254: to="| /home/vudum001/kk", ctladdr=<from_email.com> (41455/20649), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=63784, dsn=5.0.0Following is the error message form mail log file..
 
Mar  3 15:57:24 server sendmail[7255]: r23KvO6E007254: to="| /home/vudum001/kk", ctladdr=<from_email.com> (41455/20649), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=63784, dsn=5.0.0, stat=Service unavailable
Mar  3 15:57:24 server sendmail[7255]: r23KvO6E007254: to=\\vudum001, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=63784, dsn=2.0.0, stat=Sent
Mar  3 15:57:24 server sendmail[7255]: r23KvO6E007254: r23KvO6E007255: DSN: Service unavailable
Mar  3 15:57:25 server sendmail[7255]: STARTTLS=client, relay=xxx.xxx.pvt., field=cn_issuer, status=failed to extract CN
Mar  3 15:57:25 server sendmail[7255]: STARTTLS=client, relay=xxx.xxx.pvt., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Mar  3 15:57:25 server sendmail[7255]: r23KvO6E007255: to=<from_email.com>, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=34808, relay=xxx.xxx.pvt. [153.6.60.118], dsn=5.0.0, stat=Service unavailable
 

Mar  3 15:57:25 server sendmail[7255]: r23KvO6E007255: r23KvO6F007255: return to sender: Service unavailable
Mar  3 15:57:25 server sendmail[7255]: r23KvO6F007255: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=35832, dsn=2.0.0, stat=Sent
, stat=Service unavailable
Mar  3 15:57:24 server sendmail[7255]: r23KvO6E007254: to=\\vudum001, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=63784, dsn=2.0.0, stat=Sent
Mar  3 15:57:24 server sendmail[7255]: r23KvO6E007254: r23KvO6E007255: DSN: Service unavailable
Mar  3 15:57:25 server sendmail[7255]: STARTTLS=client, relay=imr12c.disney.pvt., field=cn_issuer, status=failed to extract CN
Mar  3 15:57:25 server sendmail[7255]: STARTTLS=client, relay=xxx., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Mar  3 15:57:25 server sendmail[7255]: r23KvO6E007255: to=<from_email.com>, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=34808, relay=xxx. [153.6.60.118], dsn=5.0.0, stat=Service unavailable
 

Mar  3 15:57:25 server sendmail[7255]: r23KvO6E007255: r23KvO6F007255: return to sender: Service unavailable
Mar  3 15:57:25 server sendmail[7255]: r23KvO6F007255: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=35832, dsn=2.0.0, stat=Sent


Last edited by Franklin52; 03-04-2013 at 03:00 AM.. Reason: code tags
# 2  
Old 03-05-2013
That is not considered good security, so it may be turned off. You can just cron or sleep loop to poll test the mail, pull one message at a time to your processing script, and if you need more speed, spin off the processing of each message into the background.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Port Forwarding not working

Hello Gurus, I have configured port forwarding at router. But after configuration I am not able to connect the computer from outside/Over internet/Remote desktp from other computer. Could you please advice? Thanks- Pokhraj (2 Replies)
Discussion started by: pokhraj_d
2 Replies

2. Shell Programming and Scripting

Cp not working in shell script but running perfectly from shell

Dear All, I have script. Dest="" IFS=' ' for translation in $(echo $MY_MAP) do t1=$(echo $translation | cut -d"=" -f1) t2=$(echo $translation | cut -d"=" -f2| cut -d"," -f1) if then Dest=$UNX/$u_product_path/$u_study_path/$UNXTR/$t2 break; ... (4 Replies)
Discussion started by: yadavricky
4 Replies

3. Cybersecurity

Stop email forwarding

I want if I send a mail to somebody, he will not be able to forward it to anybody. How it is possible in MS outlook? (1 Reply)
Discussion started by: amisubha
1 Replies

4. UNIX for Dummies Questions & Answers

Email Script not working when added to cron[solved]

Hi I have written an email script in python which sends email to the given id. I have customized the script for generating space alert inside a shell script as shown below df -h /microfocus > /tmp/spacereport ## Filter the %usage to variable per per=$(awk '{if (NR==3){print $4}}'... (0 Replies)
Discussion started by: rakeshkumar
0 Replies

5. Cybersecurity

iptables forwarding not working?

Hello, i am trying to setup a iptables rule to forward port 49 traffic from a specific ip a.a.a.a to port 50, but it does not seem to work, can someone take a look at my rule and let me know why it is not working? thanks iptables -t nat -A PREROUTING -s a.a.a.a/32 -p tcp --dport 49 -j REDIRECT... (1 Reply)
Discussion started by: fedora
1 Replies

6. Web Development

Apache to Tomcat forwarding not working properly

Hi, I am facing some problem with Apache to Tomcat forwarding. I have Tomcat (6.0.18) behind Apache (2.2). I want to use ‘https' for receiving request from the client. This request, when forwarded by Apache to Tomcat, will use ‘http'. My application's name is ‘abc', which is deployed in... (1 Reply)
Discussion started by: Technext
1 Replies

7. Shell Programming and Scripting

Shell Script Email not working Properly

Hi GURU's, I'm using a Shell Script to send email's as an attachment. I'm Storing the email address in a table and catching in a variable. MAILLIST=`noarg sqlplus -s $OraUsr << EOF set heading off set feedback off set echo off SELECT email_ids FROM tpemail_table WHERE... (9 Replies)
Discussion started by: karthikraj
9 Replies

8. UNIX for Advanced & Expert Users

email forwarding

I 've a domain and a server say mydomain.org I need to forward all the mails i receive over here ie. admin@mydomain.org , hello@mydomain.org , anything@mydomin.org etc., to another address which is admin@anotherdomain.org , hello@anotherdomain.org , anything@anotherdomain.org. i'm using... (3 Replies)
Discussion started by: bbala
3 Replies

9. UNIX for Dummies Questions & Answers

X11 forwarding not working

Hi, I am using Putty, enabled SSH X11 forwarding and entered the X11 display location as "localhost:0". However I encountered the following error: ------------------------------------ # xclock & 2941 # X connection to localhost:10.0 broken (explicit kill or server shutdown). + Exit 1... (4 Replies)
Discussion started by: panggou
4 Replies

10. UNIX for Dummies Questions & Answers

Email forwarding ? Help !

Hi, I'd like to forward my Emails from my domain to my gmx and web.de accounts. For example: bla@blabla.de to bla@gmx.de blabla@blabla.de to bla@web.de How to do this ? I know that .forward forwards all emails to one account, but that's not what I want. (8 Replies)
Discussion started by: sai
8 Replies
Login or Register to Ask a Question