Use sendmail without mentioning From:


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Use sendmail without mentioning From:
# 1  
Old 05-02-2017
Hammer & Screwdriver Use sendmail without mentioning From:

Hi,

Here is my sendmail script.

Code:
#!/bin/ksh
{
#        print "From: user1@`hostname`" 
        print "To: me@mycomp.com"
} | /usr/sbin/sendmail -t

I wish to use sendmail without having to specify # print "From: user1@`hostname`" so that it picks or formulates the default value of From: which is in most cases the
Quote:
username@hostname
Can you help tweak the script to default the From: aspect ?

Operating System: SunOS.

Last edited by mohtashims; 05-02-2017 at 06:21 AM..
# 2  
Old 05-03-2017
Unlike To: it is not mandatory to specify From:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Getting file without mentioning the path

If I am in C:\WINDOWS\Resources\Themes and I have a file in an other directory called to which I want to go but I do not know the path to it . Using a Linux command , is there a way to go directly to it without knowing its. (4 Replies)
Discussion started by: steve120
4 Replies

2. Solaris

Clarifying sendmail configuration - sendmail-client offline

Hi all, I have read about sendmail running as 2 separate process. 1 as a MSP, and the other as the real daemon or MTA. In my current configuration, the sendmail-client is disabled. Both submit.cf and sendmail.cf are left as default untouch I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies

3. UNIX and Linux Applications

Sendmail

Hi All, What is Sendmail.cf? What is it's significance? (2 Replies)
Discussion started by: rafa_fed2
2 Replies

4. HP-UX

Sendmail on HP-UX?

Hello, our email server is HP-UX 11.31 and is running Sendmail and Cyrus-IMAP. We need to implement mail routing based on domain, for only a specific small group of domains. It sounds like /etc/mail/mailertable is the file where we put the routing information for each domain. I found this nice... (2 Replies)
Discussion started by: lupin..the..3rd
2 Replies

5. UNIX for Advanced & Expert Users

Sendmail questions, SCO 5.0.6 sendmail 8.11.0

I am running SCO 5.0.6 and using sendmail 8.11.0 and having issues with smtp authentication. When trying to send mail the following message will kick back. (reason: 530 5.7.1 Authentication required) 530 5.7.1 Authentication required Not sure what needs to be tweeked in sendmail.cf but I... (1 Reply)
Discussion started by: ziggy6
1 Replies

6. UNIX for Advanced & Expert Users

sendmail

Hi, Someone hacked into my computer a while back and turned me into a spambot.. I stopped the mailque and cleared it out and everything appeared to be fine, but now I am noticing that if I try to run sendmail, it just hangs.. and I am wondering, does anyone have any knowledge on sendmail and... (2 Replies)
Discussion started by: patrick99e99
2 Replies

7. UNIX for Dummies Questions & Answers

sendmail

hi there, not sure if this has been discussed but can't seem to find any thread relating to my question. :confused: i have a AIX server and i'm writing some scripts. inside my script i'm using sendmail/ mailx to send out my output. but it seems i'm having some difficulties sending out. ... (9 Replies)
Discussion started by: lweegp
9 Replies

8. Programming

sendmail

hi, i am using sendmail function to send the mail for mail client. when i am sending mime content with attaching with body for the images. the image is not displaying in the mail box. all the mime content stuff is displaying. all the headers are proper. hope the reply for this (0 Replies)
Discussion started by: nagineni
0 Replies

9. UNIX for Dummies Questions & Answers

Sendmail

Am runnning sendmail on a Linux box that has connection to 2 ISP. I use on ISP to send external email. How do i restrict sendmail to using the link to my email isp even when i have set my default gateway to my nonemail isp on the linux box? (0 Replies)
Discussion started by: skykay
0 Replies

10. UNIX for Dummies Questions & Answers

Using sendmail

I have AIX5.1 I was asked to set up a cron script to send a email containing a CSV file regularly to to a user from the AIX box .I have set up cron scripts for sure but I am not sure of using sendmail. I am not sure how to do this Or even how to send a email from it using sendmail which I believe... (4 Replies)
Discussion started by: rocker40
4 Replies
Login or Register to Ask a Question