The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
aliasing question in UNIX Katkota UNIX for Dummies Questions & Answers 1 12-05-2007 03:32 PM
mails from unix server are not being received vkandati UNIX for Dummies Questions & Answers 4 03-09-2005 10:42 AM
Unix to MicroSoft Outlook Mails Deepali Potnis UNIX for Dummies Questions & Answers 3 12-05-2000 11:03 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-26-2008
Registered User
 

Join Date: Jul 2007
Posts: 122
aliasing the TO name in Unix mails

HI All,

I have a small question/clarification/doubt . Does anyone know how to provide alias in the mails that come from Unix servers.

Like i have a Unix server that generates status mails every hour for a scheduled job , it sends me mails with status with the ID in from field as "root@xyzsym.com" ( my server name) .

Some times when i add a new user to this then the new user finds the mails in Junk mail box as this is not a valid mail and this in not in his outlook contacts). Can there be aliasing provided in the mailx command to chnage the to field of the server from 'root@xyzsym.com' to 'alert-status@sym.com' ?

Please let me know


Thanks,
Sandeep
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-26-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
mailx has a somewhat cryptic -r option but if you have control over the script, use something else than mailx if it doesn't suit your needs. mailx doesn't really have any significant intelligence of its own, it just passes stuff to sendmail AFAIK, so you might as well invoke sendmail directly -- though then you have to be more careful to make sure the mail message is valid and has all the necessary headers. That would be To:, From:, and Subject:, basically.

Code:
 sendmail -oi -t <<HERE
From: alert-status@sym.com
To: sandy@xyz.com
Subject: it's this simple

really
HERE
Reply With Quote
  #3 (permalink)  
Old 03-26-2008
Registered User
 

Join Date: Jul 2007
Posts: 122
does help but i thought it would be easier with mailx as lots of scripts i use this for alert mails and also sending maisl as attachment.
Reply With Quote
  #4 (permalink)  
Old 03-26-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Welp, from reading the documentation a bit, it seems that the mailx -r option should indeed work, or if you can put a .mailrc file for root, you can set it there.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Bookmarks

Tags
mailx, mailx attachment

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 12:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66