LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 10-27-2005, 06:18 AM   #1
stephen_davies
LQ Newbie
 
Registered: Aug 2005
Posts: 14

Rep: Reputation: 0
simple linux script gone wrong


Hello all,

Thank you for taking the time to read this.

my problem is I have a simple mail script which email an echo mail account which should send it back you a mailing group. I am using Suse 8.2 and my login account name is different from the account I am trying to get to recieve the email bounce back.

this is the script if you can call it one:

date '+This is an external email test on the: %D at: %H:%M'| mail -s 'test email' -r internal-support@*?!?!"?.com echo@uk.psi.com

the linux box is set to use an Exchange 2003 standard server as a relay and the email does leave the exchange box it just never comes back.

I think my problem lays when testing the script to my email account to see the response I get, the email comes in marked in as stephend@linux.local; on behalf of internal-support@*?!?!"?.com.

I would like to be able to get rid of this stephend.@linux.local;; on behalf... is there any sugestions ?

Thank you again for reading this thread
 
Old 10-27-2005, 07:00 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,541
Blog Entries: 54

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Maybe try this:
Code:
#!/bin/sh
subj="Test email"
body=$(date '+This is an external email test on the: %D at: %H:%M')
echo -en "Subject: ${subj}\n\n${body}\n" | /usr/sbin/sendmail -F internal-support@my.com -f internal-support@my.com echo@uk.psi.com
Since you're not root it'll have an X-Authentication-Warning header tacked on but that will only be shown if you select to show all headers which MUA's prolly don't do by default.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 05:19 AM
A simple Linux script question I'm sure Tap-Out Programming 4 07-23-2005 03:11 PM
Simple script for adding groups to Linux kenji1903 Programming 20 06-03-2004 11:14 PM
what's wrong with rh 9.0 - i only have a simple pc spyghost Linux - Software 3 10-20-2003 10:18 AM
Simple C Shell script is not so simple elconde Programming 2 09-17-2001 12:53 AM


All times are GMT -5. The time now is 04:50 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration