Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Procmail Troubles

Procmail Troubles

Procmail Troubles

I've been trying to solve this for weeks...

My Goal is to search my inbox for the following messages:


Im using three files to do this for me. The first, a .forward file in my $HOME


"|IFS=' '&&exec usr/bin/procmail||exit 75 #username"

And these two are in my ~/.procmail directory


#end of .procmailrc

And lastly the rule file:general.rc


* ^From:.*sumone@sumaddy.com
* ^Subject:.*hello

Whats suppose to happen, is that all three of these files work together to copy and move mail that contain the hello pattern in its subject. And to be safe it will also look for a certain persons address. Then when those patterns are matched it will stick what it found and create the specified path; if it doesnt already exist.

But its not doing that.
After im done editiing these files in emacs, vi, .. and then save it, will it work automatically? Or do i need to compile it?

If i do, the .procmailrc might require ( if not all ) the 'Shell=/bin/sh'

Not that i didnt try that...


RE: Procmail Troubles

I guess my general.rc shouldnt have the path the to DEST folder, just the name...

Anyways to reiterate..

My .forward file is my $HOME
my .procmailrc is in my $HOME

my general.rc file is my ~/.procmail directory

I think thats about it..

My plan is to use that general.rc file to match the "From" and/or "Subject" lines in a Message thats incomming to my inbox, which happens to be /var/spool/mail/<user>

Why its not working i havent the faintest.

I want to eat turkey knowing that this is donnnne.

RE: Procmail Troubles

Is it intentional that you have a relative path to usr/bin/procmail?


RE: Procmail Troubles

Yes its intentional. That should be the first thing that is read when me the user receives mail... Then .forward talks to procmailrc gets the information and general.rc ( if properly coded ) wll mv files that match the pattersn to a folder in my mail directory...

And i know that im missing a "/" for usr/bin/procmail ..And i've known that for awhile now.


RE: Procmail Troubles

Usually i can try to test it by sending myself an email, and simply checking to see if a new folder has been created, in my ~/Mail directory.

What i can do to prove to myself that what i have for the general.rc file is to just make a file that has exactly what im having the general.rc file search for.. And it works..

Here are my current files:

The .procmailrc

#end of .procmailrc

The .forward

"|IFS=' '&&exec /usr/bin/procmail||exit 75 #<username>"

the rule file that i've changed countless times

* ^Subject:.hi

* ^FROM:.*firstname.lastname


Hey anni, since your the only one with a reply to this post, could u try these files, therby subsituting your paths for mine, and seeing if any mail is moved?



RE: Procmail Troubles

Unfortunately I'm a sendmail stalwart and have no systems with procmail installed, otherwise I'd have tried already.

I find the sytnax of your .forward a little strange... what's with the IFS setting?  As far as I can see it has no meaning, because by execing procmail that variable would be lost anyway.  If procmail does depend on IFS being set for some reason, try this syntax:


"| IFS=' ' /usr/bin/procmail || exit 75"


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close