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
MAILWRAPPER(8)						    BSD System Manager's Manual 					    MAILWRAPPER(8)

NAME
mailwrapper -- invoke appropriate MTA software based on configuration file SYNOPSIS
Special. See below. DESCRIPTION
At one time, the only Mail Transfer Agent (MTA) software easily available was sendmail(8). As a result of this, most Mail User Agents (MUAs) such as mail(1) had the path and calling conventions expected by sendmail(8) compiled in. Times have changed, however. On a modern UNIX system, the administrator may wish to use one of several available MTAs. It would be difficult to modify all MUA software typically available on a system, so most of the authors of alternative MTAs have written their front end message submission programs so that they use the same calling conventions as sendmail(8) and may be put into place instead of sendmail(8) in /usr/sbin/sendmail. sendmail(8) also typically has aliases named mailq(1) and newaliases(1) linked to it. The program knows to behave differently when its argv[0] is ``mailq'' or ``newaliases'' and behaves appropriately. Typically, replacement MTAs provide similar functionality, either through a program that also switches behavior based on calling name, or through a set of programs that provide similar functionality. Although having drop-in replacements for sendmail(8) helps in installing alternative MTAs, it essentially makes the configuration of the sys- tem depend on hand installing new programs in /usr. This leads to configuration problems for many administrators, since they may wish to install a new MTA without altering the system provided /usr. (This may be, for example, to avoid having upgrade problems when a new version of the system is installed over the old.) They may also have a shared /usr among several machines, and may wish to avoid placing implicit configuration information in a read-only /usr. The mailwrapper utility is designed to replace /usr/sbin/sendmail and to invoke an appropriate MTA instead of sendmail(8) based on configura- tion information placed in ${LOCALBASE}/etc/mail/mailer.conf falling back on /etc/mail/mailer.conf. This permits the administrator to con- figure which MTA is to be invoked on the system at run time. Other configuration files may need to be altered when replacing sendmail(8). For example, if the replacement MTA does not support the -A option with mailq(1), daily_status_include_submit_mailq should be turned off in /etc/periodic.conf. FILES
Configuration for mailwrapper is kept in ${LOCALBASE}/etc/mail/mailer.conf or /etc/mail/mailer.conf. /usr/sbin/sendmail is typically set up as a symbolic link to mailwrapper which is not usually invoked on its own. EXIT STATUS
The mailwrapper utility exits 0 on success, and >0 if an error occurs. DIAGNOSTICS
The mailwrapper will print a diagnostic if its configuration file is missing or malformed, or does not contain a mapping for the name under which it was invoked. SEE ALSO
mail(1), mailq(1), newaliases(1), mailer.conf(5), periodic.conf(5), sendmail(8) HISTORY
The mailwrapper utility first appeared in NetBSD 1.4 and then FreeBSD 4.0. AUTHORS
Perry E. Metzger <perry@piermont.com> BUGS
The entire reason this program exists is a crock. Instead, a command for how to submit mail should be standardized, and all the "behave dif- ferently if invoked with a different name" behavior of things like mailq(1) should go away. BSD
August 27, 2014 BSD
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy