The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
man aliases Pipa UNIX for Dummies Questions & Answers 2 09-19-2007 07:55 AM
/etc/mail/aliases Kumarsharad Shell Programming and Scripting 1 07-16-2007 02:57 AM
sendmail aliases not being honored dangral UNIX for Advanced & Expert Users 13 01-11-2006 03:48 PM
aliases BG_JrAdmin UNIX for Dummies Questions & Answers 1 11-30-2005 11:53 PM
aliases mluey61 High Level Programming 1 04-19-2005 12:30 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-16-2001
ComTec ComTec is offline
Registered User
  
 

Join Date: Jan 2001
Location: Jax, Fl
Posts: 12
I'm trying to make a script that will automatically read incoming mail, parse the recipient, then send a file off to the recipient.
(Name of file = mail.pl)
#!/usr/bin/perl
$mailDir = "/var/spool/mail/"
$user = print `cat <STDIN> | grep To: | cut -b5-`;
print `elm -s Awaiting Mail $user < /tmp/alert";

And the entry in the aliases file goes:
test: "| /home/mail/mail.pl"
is that correct aswell?
  #2 (permalink)  
Old 03-17-2001
mib mib is offline
Registered User
  
 

Join Date: Jan 2001
Location: Calicut
Posts: 228
a standard way to filter incoming mail is to configure procmail. It's easy & really usefull. and with procmail you can handle the problem you face perfectly than a perl script.

for more info man procmail & man procmailex
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0