question regarding mailx


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers question regarding mailx
# 1  
Old 02-05-2009
question regarding mailx

I have some scripts that send out email alerts using mailx. the email looks like it is coming from the unix ID and server that is sending the email. I am wondering if there is a way through mailx to have the mail still look like it is coming from the unix id and server sending the message, however if the email is replied to have the reply go to a different email. I tried using the -r switch with in mailx for example
mailx -s"subject" -r email@address.com some@address.com
but that showed the email as comming from email@address.com and that is not what I want. I have looked a man pages for mailx and don't see anything, so I am not sure this can even be done. anyone have any advice for me. thanks in advance.
# 2  
Old 02-05-2009
something like this below?
Code:
De:    production [prod@ant.cet*.ch]
A:      vbe,...
Cc:
Objet:  gesco copied today to 200902...
total 492
-rw-rw-r--   1 prod       gesco        22113 Feb  2 06:30 hp_adr
-rw-rw-r--   1 prod       gesco        75034 Feb  2 06:30 hp_dossier
-rw-rw-r--   1 prod       gesco        29970 Feb  2 06:30 hp_parcell
-rw-rw-r--   1 prod       gesco          216 Feb  2 06:30 stat.log

ant is my favorite HP box ( for my tests although production server...)
What you see here is what I get in outlook...
# 3  
Old 02-05-2009
I think I get where you are going with this, however how would I get the De: in the command?
# 4  
Old 02-05-2009
As I said, it is how I see the mail in outlook... (french...)
This is what is in the script run by cron:
Code:
ll $GESCOPJ/$NEWDIR | \ux2dos |\mailx -s \
" gesco copied today to $NEWDIR..." \
vbe@.....

for this, I had to configure /etc/mail/sendmail.cf:
Code:
# "Smart" relay host (may be null)
#DS
DSsmtp.et.....ch

You follow DS with the name of your exchange server
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Another mailx question

Hi I am trying to send an html file as an attachment from AIX server and recieve it using Outlook 2007 client. I tried every possible command, such as: uuencode file file | mailx -s "subject" me@mydomain.com uuencode -m file file | mailx -s "subject" me@mydomain.com All of them give me: ... (6 Replies)
Discussion started by: nimo
6 Replies

2. Shell Programming and Scripting

mailx Question

I am using mailx command. It works fine. And the receiver gets 'From' information as MySelf@Sent_server. This 'Sent_server' is picked up from /etc/hosts - third alias for loghost (dev.abc.ltd). The entry is as under 11.22.33.44 dev_sys dev_system dev.abc.ltd loghost The issue is that is there... (4 Replies)
Discussion started by: Soham
4 Replies

3. Shell Programming and Scripting

Another mailx question

I have a script that runs every night that is supposed to send a log file to a list of email addresses. When I run this command from the command prompt, it works successfully: mailx -s "Filename to send" "`cat email.address`" < $outfile The email.address file contains the list of email... (4 Replies)
Discussion started by: Drenhead
4 Replies

4. UNIX for Dummies Questions & Answers

Unix mailx question.

HI, Whenever I tried to send mail using mailx in unix (Solaris 5.9), from field is missing from email messages. In short, sender's email address is missing from message. Anybody has any idea why this is happening? Thanks, NS. (5 Replies)
Discussion started by: nshah
5 Replies

5. Shell Programming and Scripting

mailx question

hello in the middle of my sh script, I am using mailx like this: mailx -s "Sybase Installation on $i" x@abc.com < /net/share/shared/install.output.$i "i" stands for the remote server such as SIROE I am expecting to receive an email with subject "Sybase Installation on SIROE" and... (2 Replies)
Discussion started by: melanie_pfefer
2 Replies

6. Shell Programming and Scripting

MAILX question

Hello, I am using the following mailx command wich works well. I want to also include output from a log file in the mail body. How can this be done? echo `date +"%m/%d/%Y %T"` "$P: The Purge Routine Has Started." | mailx -s "The Purge RoutineHas Started: `date`" $EMAIL This script is... (3 Replies)
Discussion started by: dkranes
3 Replies

7. UNIX for Dummies Questions & Answers

Question on mailx

Hello there: I want to send an e-mail from AIX using mailx. I'm executing the following script (-> witch doesn't work's): ----------------------------------------------- #!/bin/sh echo "<html><body><a href="http://www.myhomepage.com">Link</a></body></html>" >> LOG sleep 5 !... (3 Replies)
Discussion started by: Felix2511
3 Replies

8. Shell Programming and Scripting

mailx and uuencode question

I have this code below that works well. I also want to attach a logfile to the email. The first part of this code is the body of the email. echo "The size of $dirname/$f1 size = $f1size, and $dirname/$f2 = $f2size'" | mailx -s "Error with file sizes on $HOST Server" xyz@company.com ... (1 Reply)
Discussion started by: ssmiths001
1 Replies

9. UNIX for Dummies Questions & Answers

mailx question

Hi-- My question is why won't this line of code work in the UNIX script that I'm running.... echo "A MESSAGE ON $todaysdate." | ${SYSBIN}/mailx -s "TEST EMAIL" email address (1 Reply)
Discussion started by: greenguy5
1 Replies

10. UNIX for Advanced & Expert Users

Mailx question

Hy all One application has a script with this line : /usr/bin/mailx -f..... - etc etc .... is there any option to set the charset to various value while using mailx ?? thanks in advance Olivier (3 Replies)
Discussion started by: Olivier
3 Replies
Login or Register to Ask a Question