The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to forward mail in /var/mail/username to external mail unitipon SUN Solaris 2 05-26-2008 09:20 PM
how can we spoof ethernet by ARP cache poisoning on unix through a program ud4u IP Networking 1 02-11-2008 05:06 AM
I am not able to send mail form unix to other mail accounts. chinnigd UNIX for Dummies Questions & Answers 1 04-06-2006 05:31 AM
e-mail client supporting HTTP mail servers babayeve UNIX for Dummies Questions & Answers 0 05-21-2005 12:10 AM
can not send mail from unix server to company/yahoo mail b5fnpct UNIX for Dummies Questions & Answers 5 11-22-2002 05:24 PM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-06-2002
Registered User
 

Join Date: Jul 2002
Posts: 12
Question spoof mail id

I am running Solaris 8 on a SUN 450 and need to have e-mails sent out each month for several systems to remind users to take certain actions. I can successufully add a job to the cron, but each time the mailx sends an e-mail it has my user ID along with telephone number as the sender. I would like to have each system be the sender, like system1@mailserv.com
system2@mailserv.com. is there a way to do this using my ID without seting up a UNIX id for each system?
Forum Sponsor
  #2 (permalink)  
Old 12-06-2002
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 905
This is not ideal, but you could do something like:


( echo "From: someone@somewhere"; \
echo "To: someone@somwhereelse"; \
echo "Subject: some subject"; \
echo ""; \
echo "Body of email"; \
) | sendmail -t


A better solution would be to use perl and the Mail::Mailer module.
  #3 (permalink)  
Old 12-06-2002
Registered User
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
also i think you could create a new user with whatever name you want, ie "system1" and then create the cronjob with that user
  #4 (permalink)  
Old 12-06-2002
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,191
As PxT replies, the sendmail -t option is very useful for these situations. From the sendmail manpage:

Code:
   
-t     Read message for recipients.  To:,  Cc:,  and  Bcc:
        lines will be scanned for recipient addresses.  The
        Bcc: line will be deleted before transmission.
My suggestion would be to create a file with the appropriate header fields and concatonate with the body (and send) via cron.
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0