Sponsored Content
Full Discussion: Email to a process
Top Forums UNIX for Dummies Questions & Answers Email to a process Post 27990 by Neo on Tuesday 10th of September 2002 06:36:44 PM
Old 09-10-2002
Many people simply pipe mail received by either an MTA or MUA to a process. An MTA, such as sendmail, can receive mail and pipe it to a process. Often, mail is received by an MTA and sent to a user mailbox via a local MUA, and the MUA forwards the mail, via a pipe, to the standard-in.

Often, in a .forward file in a user directory has something like,

"|/home/user/bin/myprocess".


Or, in a file like the sendmail aliases file:

joe.user: "|/home/user/bin/myprocess"


There are many reasons to do this, a person can simply send mail to a host and in the message have embedded tokens that could be used for anything imaginable... for example, you could send a message to a user aliase and have an embedded command (with embedded security) telling your home computer to turn off the lights in your house (if you had a interface to your home lighting)....

You can literally do anything you can imagine by sending mail to a process.... your imagination is the limit.... you could send mail to our home computer and with an embedded token that could be used by a process to activate a video camera, another example.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies

2. UNIX for Dummies Questions & Answers

Send email where # is in the email address - Using Unix

Hi All, How do I send an email using malix where email address contains a #. I have a email address like this : #test@test.com I want to send email like malix -s "TEST" #test@test.com < SOMEFILE I tried \# but doesn't work. Please let me know how we can achieve this? I am in... (1 Reply)
Discussion started by: jingi1234
1 Replies

3. Shell Programming and Scripting

sending email as background process

Hi All, Solaris Bash v3x I have a script that accepts an error code, and if the error code is not 0 then an email is sent using mailx to details the error. I want to be able to implement the functiuonlity whereby i can send the email in a background process so the script can continue with... (3 Replies)
Discussion started by: satnamx
3 Replies

4. Solaris

Send an email from Solaris using Linux email server

Hello everyone I have a problem and I need your help: I have a Solaris 10 and Solaris 8 UNIX Servers, and Linux Centos4 as email server. I need send an email from Solaris servers preferably using Centos4 email server. I have no mail service configured in my Solaris computers (1 Reply)
Discussion started by: aflores
1 Replies

5. UNIX for Dummies Questions & Answers

new to ldap, send email to a ou or group, and see a list from email client

hi, i'm running openldap on ubuntu 10.04, creating new items with apache directory studio (windows version). i use the ldap just as an address book to our small office (email clients are windows live mail 2009, 2011, microsoft outlook 2007 and 2010). a. i cant see a list of the contacts,... (0 Replies)
Discussion started by: V4705
0 Replies

6. Shell Programming and Scripting

Script to Send Email to a user when an admin kills process

Can anyone create or give me a script that I can use to email a user automatically when I kill one of their processes? Or Can you give me a script to allow me to email a user (entering email manually) when a process is killed? Like showing what the PID was and a reason the admin killed it? Is... (2 Replies)
Discussion started by: JoeGazz84
2 Replies

7. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

8. Shell Programming and Scripting

Getting email output in single line with out space in email

I have tried below email method and i am getting every thing in single line . i have put echo to provide space, but it is not helping my code ( echo "From: $FROM" echo "To: $MAILTO" echo "CC: $CC" echo "Subject: $SUBJECT" echo "MIME-Version: 1.0" echo 'Content-Type: multipart/mixed;... (6 Replies)
Discussion started by: mirwasim
6 Replies

9. Shell Programming and Scripting

Script to send email if Java process was done

Hi Team, I need script to send notification if java process was down. Can you please help on this. Thanks in adance. Regards, Nagesh (1 Reply)
Discussion started by: Nageswara Reddy
1 Replies
vacation(1)						      General Commands Manual						       vacation(1)

NAME
vacation - Informs senders of mail that recipient is absent SYNOPSIS
vacation -I The vacation command returns a message to the sender of a mail message, saying that the recipient is on vacation or otherwise absent. OPTIONS
Initializes the $HOME/.vacation.pag and $HOME/.vacation.dir files. Execute this option before you modify your $HOME/.forward file. DESCRIPTION
The vacation command accepts standard input and attempts to send a vacation message to the user specified in that input, which should be a mail message. The vacation command is usually invoked in your $HOME/.forward file, which is used to forward your mail to another username. When you want vacation messages to be sent to users who send you mail, enter the following in your $HOME/.forward file: user, "|vacation user" Replace user by your username. This allows mail sent to you to be both received by you and piped to the vacation command; vacation reads the mail message, determines the sender, and sends a reply. The sender receives a vacation message, and the original mail is waiting in your mailbox when you return. When vacation is invoked without the -I option, as in the file, it reads the first line from the standard input for a From line to deter- mine the sender. If this is not present, an error message is produced. (All properly formatted incoming mail should include a From line.) No vacation message is sent if the From header line indicates that the message is from Postmaster; from MAILER-DAEMON; if the initial From line includes the string -REQUEST@; or if a Precedence: bulk or Precedence: junk line is included in the header. You must initialize vacation for your username by issuing the command vacation -I before you can use the vacation command. The vacation command expects a $HOME/.vacation.msg file containing a message to be sent back to each sender. The file should be an entire message, including any desired headers, such as From or Subject. This message will be sent only once a week to each unique message sender. (If this file does not exist, vacation uses /usr/share/lib/vacation.def, a system-wide default vacation message, if it exists.) The names of people who have sent you messages are kept in the files $HOME/.vacation.pag and $HOME/.vacation.dir. These files are created when you initialize vacation for your username with vacation -I. EXAMPLES
If your username is myra and you want to send a message once a week to each person who has sent you mail, initialize vacation by entering: vacation -I Next, add the following line to your $HOME/.forward file (create this file if it does not exist): myra, "|vacation myra" If you want to send a vacation message other than the system default message in /usr/share/lib/vacation.def, create the file in your home directory and enter the message in it. For example: From: myra@k.table (Myra Louise Minter) Subject: I am on vacation. Delivered-By-the-Graces-Of: the Vacation program I am on vacation until October 1. If you have something urgent, please telephone Lucy or Sue. -- Myra FILES
System-wide default vacation message. Contains address to which mail is forwarded. Contains the names of people who have sent you mail while the vacation command was being used. Contains the names of people who have sent you mail while the vacation command was being used. Contains your personal vacation message. SEE ALSO
Commands: mail(1), mailx(1), sendmail(8) vacation(1)
All times are GMT -4. The time now is 02:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy