Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-11-2003, 12:50 AM   #1
LQ Newbie
Registered: Jun 2003
Location: Moscow, Russia
Posts: 4

Rep: Reputation: 0
procmailrc - substitute certain words to another.

i need substitute certain words in From: or To: or Body to another by .procmailrc
From: bla <>, joe <>, other <>
Just substitute "" by ""
Old 07-11-2003, 01:25 AM   #2
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
Basically you can feed it through a pipe with sed (or awk, but I am better with sed. The following recipe may not work for all of the cases you are interested in, but :

:0 fwh
* ^From.*some.*com
|sed s/

This will just pass the mail along for further operation, with (did you mean myfriend? :-) substituted for

If you want joe <> to go to (just a thought), try the following:

:0 fwh
* ^From.*joe.*
|sed -e s/\ \<fuzzy//g -e s/\>//g

You need the backslashes for spaces, redirects (<,>) and of course other special characters.

Good luck, Chris


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
.procmailrc jayakrishnan Linux - Networking 0 11-19-2005 03:13 AM
Procmailrc file how many do I Need ?? wylie1001 Linux - Software 2 09-07-2005 08:20 PM
procmailrc davidsrsb Slackware 3 06-15-2005 12:07 PM
procmailrc filter for alias skyfly Linux - Security 1 05-19-2005 05:48 AM
Search and Replace: Asian Words to English Words ieeestd802 Linux - Software 0 10-27-2004 08:48 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration