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
using procmail to filter content new2ss UNIX for Advanced & Expert Users 1 06-11-2007 03:24 AM
procmail code help Hexabah UNIX for Dummies Questions & Answers 0 08-30-2006 07:05 PM
Procmail Tutorial luiz_fer10 UNIX for Dummies Questions & Answers 1 05-24-2002 08:39 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-12-2002
Registered User
 

Join Date: May 2002
Location: Campinas, Brazil
Posts: 20
Stumble this Post!
Procmail filter

Hello,

I want to make a filter with procmail, using the day of the week ant the hour to filter the message.

If the day is Tuesday, the message is redirected to one address. On the other days, the message goes to another address. The messages will be redirected at 8 am to 17 pm.

I tried something like:

:0
* ^From (0[89]|1[0-6]|):[0-5][0-9]: (Tue)
! email

:0
* ^From (0[89]|1[0-6]|):[0-5][0-9]: (Sun|Mon||Wed|Thu|Fri|Sat)
! email2

But this don't work how I want to.

Anybody knows the right syntax?

Thanks
Forum Sponsor
  #2 (permalink)  
Old 06-14-2002
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
Stumble this Post!
The date and time dont appear in the From line, so the above won't work. Why not create two separate procmail recipes and use cron to copy the correct one into place at the proper time. If you use qmail you should do a "chmod +t $HOME" first and a "chmod -t $HOME" afterwards to make sure no mail is delivered while the file is being written. If you use sendmail, you have to just take your chances...
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:44 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0