Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Sending Emails to a unix process Post 28116 by AlarIT.Def on Friday 13th of September 2002 07:11:50 AM
Old 09-13-2002
use procmail

You can use procmail for process incoming mail.

Main config /etc/procmail.rc


Basic syntax:
#
:0H
*(^To|^Cc).*username\@.*
|/usr/bin/yourscript.sh
#


This mean:
All mail for username@server.name
direct to script /usr/bin/yourscript.sh



Sincerely,
Andrew A.Romanchenko
Programmer of Rapid Internet Development Department
Alar Information Technologies, www.AlarIT.com

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sending Outgoing Emails from Unix Server

the server i have here is a Ubuntu server. it has nagios on it. after setting up nagios and having it work as it should, i realized at the very end of all my work that obviously nagios will also need to send out email alerts to a set of email addresses that it has in its database. my problem... (1 Reply)
Discussion started by: SkySmart
1 Replies

2. AIX

Need help on sending emails to Lotus Notes from Unix

Hi, I am new to UNIX and any help is greatly appreciated. Requirement: Need to check the directory and if the directory has some files then an email needs to be sent to the email ID on Lotus Notes. I need help on sending an email to email ID on Lotus Notes notifying that the files... (3 Replies)
Discussion started by: neetutg
3 Replies

3. Solaris

How to use text Fonts while sending emails from mailx?

Hi Team, I want to use "Courier New" fonts while sending emails using mailx command from solaris command prompt. Because my SQL output is not printing in correct format in the email. Please assist. Let me know for any details. Thanks, (1 Reply)
Discussion started by: Mukharam Khan
1 Replies

4. Shell Programming and Scripting

Counting lines and sending emails

What I am doing is running ps and search for any connection that is over a specified number, I set it to "1" for testing I want to send an email when any of them are over 50 I want them all in one email Below is the code what I want is to display the output of ps and grepping for "httpd" to a... (3 Replies)
Discussion started by: slufoot80
3 Replies

5. Shell Programming and Scripting

Hide from adress while sending emails

I have a shell script that sends email alerts to all the teams if there's any issue identified . This is the command that I use to send email alerts to others cat out.out | mail -s "Alerts on $date" $EMAILID Above code sends emails to all the users by default it sends emails to... (2 Replies)
Discussion started by: lazydev
2 Replies

6. Shell Programming and Scripting

Sending files to multiple emails

Hi All, I want to send each file to each email id as below. Instead of writing saparate 10 mail commands can we do it in a simple step. file1.csv to raghu.s@hps.com file2.csv to kiran.m@hps.com file3.csv to kenni.d@hps.com file4.csv to rani.d@hps.com file5.csv to sandya.s@hps.com... (2 Replies)
Discussion started by: ROCK_PLSQL
2 Replies

7. Debian

Logcheck sending emails everywhere

Hi, I just recently installed logcheck running it at defaults. I don't have a /home/logcheck, even though the logcheck.conf MAILTO variable says "logcheck". Now I have a .forward in my regular home /home/awayand which gets an hourly report from logcheck but I have no clue how to turn that off. I... (0 Replies)
Discussion started by: awayand
0 Replies

8. Shell Programming and Scripting

Issues sending emails using PostFix Mail Server

I'm unable to send email from my Linux server despite SMTP port 25 Active and Listening. # hostname TechX I checked the mail log ( /var/log/maillog ) and found the below error. I'm sharing all the ".cf" files seen in the error log. 1. # more /etc/postfix/main.cf # postfix... (0 Replies)
Discussion started by: mohtashims
0 Replies

9. Debian

Problem sending out emails

Hi, Our email relay server is a debian server. The application team in our company regularly receives email alerts from one hpux server (which is routed through the email relay server). Today we had problems whereby our company's email recipients are not receiving email alerts from the hpux... (2 Replies)
Discussion started by: anaigini45
2 Replies
ESMTPRC(5)							File Formats Manual							ESMTPRC(5)

NAME
esmtprc - esmtp configuration file. DESCRIPTION
A esmtp configuration file consists of several options. The options format is: keyword=value The equal sign is optional and can be replaced by whitespace. The value may be enclosed in simple or double quotes, in which case special characters can be escaped as in normal C strings. Comments are delimited by the '#' character up to the newline character. OPTIONS
hostname Set SMTP host and service (port). The format is: host.example.org[:service] With no whitespace surrounding the colon if service is specified. service may be a name from /etc/services or a decimal port number. If not specified the port defaults to 587. Note (from libESMTP documentation): the default port number is set to 587 since this is the port that should be used for mail sub- mission, see RFC 2476. By choosing this default now, the API does not change behavior unexpectedly in the future as use of the new standard becomes commonplace. The host-port notation simplifies things for the application, the user can type "localhost:smtp" or "localhost:25" where the application expects a host name. username Set the username for authentication with the SMTP server. Do NOT set the username and password in the system configuration file unless you are the only user of this machine. Esmtp is not run with suid privileges therefore the system configuration file must be readable by everyone. If your SMTP server requires authen- tication and you are not the only user then specify your personal SMTP account details in the user configuration file. password Set the password for authentication with the SMTP server. starttls Whether to use the StartTLS extension. It can be one of enabled, disabled or required. It defaults to disabled. certificate_passphrase Set the certificate passphrase for the StartTLS extension. helo Set the hostname to identify as when sending HELO or EHLO commands. (This is a per identity option, as it should be the name you are seen as from the connected host, which may vary with host to host due to NAT or different naming schemes). qualifydomain Make all local addresses to remote ones by adding @ and this name. force sender Set a "Sender:" header and ignore those in the message. "%u" will be replaced with the username. "%%" by "%". force reverse_path Set the envelope from address. The address given to -f will only be used as "From:" when the message contains none. "%u" will be replaced with the username. "%%" by "%". message_id Whether to set the Message-ID field of the message before sending. Normally the receiving MTA sets the Message-ID if missing, so you can turn this off if your sending host does not have a fully qualified domain name. Allowed values are either enabled or disabled. It defaults to enabled preconnect Shell command to execute prior to opening an SMTP connection. This may be useful in conjunction with application-level transports (e.g. ssh with its port-forwarding functionality) to secure the SMTP connection. Esmtp will wait for the command to exit before proceeding. If the command returns a non-zero status, delivery will be aborted. identity Define an identity. An identity is a set of options associated with a given address. For example: identity = myself@somewhere.com hostname = smtp.somewhere.com:25 username = "myself" password = "secret" Identities are be selected by the address specified in the -f flag. You can have as many you like. The options in the global section (up to the first identity option) constitute the default identity. If no options in the global section are given then the first defined identity is taken as the default one. Note that the default identity settings are not shared by the other identities. Everything (username, password, etc.) must be spec- ified for every identity even if they don't differ from the default identity. mda Set the Mail Delivery Agent (MDA). Esmtp relies upon a MDA for local mail delivery, i.e., addresses without a '@' character. A non-zero error status tells esmtp that delivery failed. The local delivery addresses will be inserted into the MDA command wherever you place a %T. The mail message's From address will be inserted where you place an %F. Some common MDAs are "/usr/bin/procmail -d %T", "/usr/bin/deliver" and "/usr/lib/mail.local %T". force_mda Force mail to be delivered by the MDA. When set, any mail from anywhere to anywhere will instead be delivered to the value of force_mda. It will also only be delivered locally, via the mda. This will let you have a very minimal mail set-up, which can ONLY handle local mail. For example: mda = "procmail -d %T" force_mda = "someuser" SEE ALSO
esmtp(1) AUTHOR
Jose Fonseca ESMTPRC(5)
All times are GMT -4. The time now is 08:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy