Sponsored Content
Top Forums Shell Programming and Scripting Use sendmail without mentioning From: Post 302996761 by mohtashims on Tuesday 2nd of May 2017 04:19:54 AM
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..
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
SMRSH(8)						      System Manager's Manual							  SMRSH(8)

NAME
smrsh - restricted shell for sendmail SYNOPSIS
smrsh -c command DESCRIPTION
The smrsh program is intended as a replacement for sh for use in the ``prog'' mailer in sendmail(8) configuration files. It sharply limits the commands that can be run using the ``|program'' syntax of sendmail in order to improve the over all security of your system. Briefly, even if a ``bad guy'' can get sendmail to run a program without going through an alias or forward file, smrsh limits the set of programs that he or she can execute. Briefly, smrsh limits programs to be in a single directory, by default /etc/smrsh, allowing the system administrator to choose the set of acceptable commands, and to the shell builtin commands ``exec'', ``exit'', and ``echo''. It also rejects any commands with the characters ``', `<', `>', `;', `$', `(', `)', ` ' (carriage return), or ` ' (newline) on the command line to prevent ``end run'' attacks. It allows ``||'' and ``&&'' to enable commands like: ``"|exec /usr/local/bin/filter || exit 75"'' Initial pathnames on programs are stripped, so forwarding to ``/usr/ucb/vacation'', ``/usr/bin/vacation'', ``/home/server/mydir/bin/vaca- tion'', and ``vacation'' all actually forward to ``/etc/smrsh/vacation''. System administrators should be conservative about populating the /etc/smrsh directory. For example, a reasonable additions is vaca- tion(1), and the like. No matter how brow-beaten you may be, never include any shell or shell-like program (such as perl(1)) in the /etc/smrsh directory. Note that this does not restrict the use of shell or perl scripts in the sm.bin directory (using the ``#!'' syntax); it simply disallows execution of arbitrary programs. Also, including mail filtering programs such as procmail(1) is a very bad idea. procmail(1) allows users to run arbitrary programs in their procmailrc(5). FILES
/etc/smrsh - directory for restricted programs SEE ALSO
sendmail(8) $Date: 2004/08/06 03:55:35 $ SMRSH(8)
All times are GMT -4. The time now is 09:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy