Linux forum

General discussion

Qmail=>How to change in message body using procmail recipes

by mosiurkhan / June 15, 2008 11:25 PM PDT

Hi guys,

I have installed qmail on linux redhat 9.
I am able to send email using .qmail file.

I created a .qmail file: .qmail-softb having following content:

|preline /usr/bin/procmail procmail-test || exit 111

Then I created procmail-test file containg following code:

Shocked c
! test@localhost.localdomain

I used the following command in command line:

#mail softb
Subject: test sub
test msg body

As a result the mail was send to bounce@localhost.localdomain email as well as forwarded to test@localhost.localdomain.

But when I try to change the content in subject and message body, the content is not changing.

My sample requirement as followiing below:

.qmail file content:
| preline /usr/bin/procmail /var/qmail/test/procmail-test

Sample mail[/u:
From: Mosiur
Subject: Hi #firstName#
This is a test message for #firstName#
Username: #userName#
Password: #password#

Admin test

And I want to send this message as

From: Mosiur
Subject: Hi James
This is a test message for James
Username: james123
Password: flowers

Admin test

How to do it. Kindly help me.

Discussion is locked
You are posting a reply to: Qmail=>How to change in message body using procmail recipes
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Qmail=>How to change in message body using procmail recipes
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


Your favorite shows are back!

Don’t miss your dramas, sitcoms and reality shows. Find out when and where they’re airing!