Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-12-2011, 10:36 PM   #1
LQ Newbie
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
mailx cmd - how to ignore the machine name getting appended to the receiver mailaddr

I am facing some problem with the mailx commmand. When i run the mailx command from the command line it sends it to the correct mail address which i mention.
#cat mailbody | mailx -s "Test"

But when i run the same command from a perl script, it appends the machine name ( to the mail address, and the mail address ( - which i entered) becomes invalid ( - found in the maillog), failing to reach the receiver.

I am running it from the csh shell.
Kindly let me know on how to avoid this addition.
Thanks in advance
Old 03-13-2011, 01:19 AM   #2
Senior Member
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
i think that perl gives special significance to the '@' character, which should therefore be escaped.
a google search shows that email addresses in perl scripts are stored like this:
$email = "someone\";
Old 03-14-2011, 02:14 AM   #3
LQ Newbie
Registered: Mar 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks a lot Berhanie!
This escape thing, didnt strike for me before...

Now i escaped the @ symbol and it worked.

Thank you!


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
What has h appended to new xorg.conf ? ashikaumanga Linux - General 1 04-02-2009 09:49 PM
restore a tape that has appended data on it blckspder Linux - Server 1 09-29-2008 05:11 PM
file accidentally appended to itself, how to separate? sqrt7744 Linux - General 5 04-29-2006 04:30 PM
Rename session_id with appended user name jilljack Programming 2 10-12-2005 01:30 PM
PATH appended with . ? kaon Slackware 1 04-19-2005 10:48 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:36 PM.

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