HPUX mailx CC list


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting HPUX mailx CC list
# 8  
Old 07-19-2010
Further to my post #4.

The file cc_list can also contain a list of recipients prefixed by "~t".
The default behaviour is quite clever in that it compares the addressee on the mailx command line with both "~c" and "~t" lists to work out whether to show the addressee in the To list or the CC list.

Code:
~c tom@abc.com
~c dick@abc.com
~c harry@abc.com
~t jack@abc.com
~t jill@abc.com
~t hill@abc.com

If you accidentally specify the same email address as both "~c" and "~t" that address will only ever appear in the To list.

Don't forget to run one "mailx" command per different addressee. (I am assuming default sendmail behaviour).
# 9  
Old 07-19-2010
Thanks Methyl,

However how can I specify the sender address.
# 10  
Old 07-19-2010
The sender is the sender account in unix. Try sending yourself a mail.

Reading between the lines, sorry I will not publish how to forge the sender address.
# 11  
Old 07-19-2010
I have some confusion "sender address" is the mailid or the unix os user....
if I will send mail from command line mailx then the sender addres is the server host name, however i need to send mail having a particular group mail id configured in the system.

Is there something like I have to login with a particular mail id /password and then if I will send mail then my particular login id will be used as sender address.
# 12  
Old 07-20-2010
This has gone far beyond the syntax error in post #1 and your requirement is changing.

I do not understand your most recent post.

If you are trying to spoof the source address or supply an email display name I don't know how to do this with "mailx". When sending from "mailx" the exact sender email address which will be seen in the mail reader depends on how your "sendmail" is configured, the unix account name of the sender and whether that account name is "Trusted" in the sendmail configuration. There are inbuilt safegurds to prevent forged mail.

Other correspondants may know?

---------- Post updated at 13:26 ---------- Previous update was at 13:16 ----------

At you now seem to have switched to using "sendmail" direct this is a whole new ballgame. I was disturbed that you posted the same sort of erroneous "mailx" commands that started this thread.

https://www.unix.com/unix-advanced-ex...l-problem.html

Might be a good time to sit down and document your requirement?
# 13  
Old 07-21-2010
yes I started with mailx...my requirement was to send mail with to,cc,subject,body,attachment and sender's address....it is working absolutely fine except the sender's address part...so for the time being i am using the solution with sendmail option ....
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

How to list file size on HPUX?

I used to use ls -l cut to detrmine file size, and google searches didn't come up with anything else but 'stat' which doesn't appear on HPUX. I discovered the humble 'wc -c' which does this job very neatly, and thought I would share it. (7 Replies)
Discussion started by: tbochan
7 Replies

2. HP-UX

pwage-hpux-T for Trusted HPUX servers

I'm sharing this in case anybody needs it. Modified from the original solaris pwage script. This modified hpux script will check /etc/password file on hpux trusted systems search /tcb and grep the required u_succhg field. Calculate days to expiry and notify users via email. original solaris... (2 Replies)
Discussion started by: sparcguy
2 Replies

3. Shell Programming and Scripting

unable to put cc list in mailx

Hi, I am using mailx command to send mail. But unable to use -c option to send mails by cc list. eg. ..mailx -s "subject" -c "CCLIST" "TOLIST" Its showing " illegal option -- c" I am using HP UX. Can anybody help me out. Thanks in advance..! (3 Replies)
Discussion started by: Kattoor
3 Replies

4. Shell Programming and Scripting

Need Script to Use CPUs on a HPUX server to simulate Workload Manager on HPUX.

I am running HPUX and using WLM (workload manager). I want to write a script to fork CPUs to basically take CPUs from other servers to show that the communication is working and CPU licensing is working. Basically, I want to build a script that will use up CPU on a server. Any ideas? (2 Replies)
Discussion started by: cpolikowsky
2 Replies

5. UNIX Desktop Questions & Answers

Using Mailx to send to list of email addresses

Im trying to use a shell script to send to a list of email addresses in a txt file. Here is what i have tried but it keeps sending to dead.letter... Success.ksh contains... mailx -s"Night Batch Success" 'cat /Scripts/email_addresses.txt' < /Scripts/email_body_message.txt The email body... (1 Reply)
Discussion started by: aguad3
1 Replies

6. Solaris

distribution list won't expand in mailx message

Hi, I have a distribution list called /nisserver/sysadmin/user-alias-files/all_users. The contents of the file have the userid/usernames of the techs in my company. These userid/usernames in the file do not have the @abc.com appended to them. After I type the newaliases command the results... (4 Replies)
Discussion started by: antalexi
4 Replies

7. UNIX for Dummies Questions & Answers

mailx error message : mailx: NUL changed to @

If I use the "Mail" link instead of the "mail" link to ../mailx I get this error. Mail so-n-so @whatever.com mailx: NUL changed to @ Unknown command: "postmaster" The email still goes through but i get the error. If I use "mail" it goes thru without the error. Any ideas?? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

8. HP-UX

HPUX list files with access time more than 5 min

Hi, does anyone know how to find files who have the last access time bigger than 5 min ago, in linux i use: find ./ -amin +5 -type f -maxdepth 1 -name "*.*" but in hp-ux the find command doesn't have the -amin option.... (2 Replies)
Discussion started by: mvrk
2 Replies

9. HP-UX

creating a mailng list for mailx

I'm trying recall how to set up a script to have mailx read a mailing list of people to recieve a message. I had set up the script to have every name inside but the list could grow and/or change. can any one help? I'm using HPUX 11 on a rp7410. (6 Replies)
Discussion started by: rfmurphy_6
6 Replies

10. UNIX for Dummies Questions & Answers

mailx and mail list help - newbie qustion

I have a basic question - how do I create and then use a mail list to be able to send a mailx email to multiple recipients. I assume I create a test file using vi, containing the email addresses - but what is the format - are the addresses separated by ";", or by spaces, ....??? Is there a... (1 Reply)
Discussion started by: HikerLT
1 Replies
Login or Register to Ask a Question