Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-25-2004, 07:45 AM   #1
Big Brad
Registered: Jul 2003
Location: Australia, Geelong
Distribution: Red Hat 8 & Fedora Core 3
Posts: 52

Rep: Reputation: 15
Autoresponders & CGI Forms & E-mail Headers

Hi All

Once again I hope all you smart people out there can give a helping hand.

This time I have done my research. I have searched google sevral times. I have searched this forum several Times as well but no luck has come my way.

So lets get to business. My problem is: I have a form which uses Matts Form Mail perl script.
To email the results of a particlur form to an email address on the same server
This account has an autoresponder setup on it. The script places the clients email address into the From: header. (Client being the person that fills in the form on the web site.) So the autoresponder should send an email back to the clients email address. Am I not correct. The problem is that the autoresponder does not it send it back instead it sends the autoreply back to . is in the Return Path header. The reason for this is I can only guess but I think because of the fact that the email that was sent by the form which is run by apache web server ,correct if I am wrong, to the recepiant being so the return path ends up being apaches user name. My autoresponder obviously uses the Return Path: header instead of the From: header.

Below is the procmail script for my autoresponder:

:0 h c
* !^X-Loop:
| (formail -r -I"Precedence: junk" \
-A"X-Loop:" ; \
echo "Hi there,"; \
echo "You have sent an e-mail to this address for more infomation on Brad Jones Computing."; \
echo "-- "; cat $HOME/.signature \
) | $SENDMAIL -oi -t

Also below are the header of the autoresponce emails that are getting sent to

Return-Path: <>
Received: from (localhost.localdomain [])
by (8.12.5/8.12.5) with ESMTP id i4NDcXFM005769
for <>; Sun, 23 May 2004 23:38:33 +1000
Received: (from user@localhost)
by (8.12.5/8.12.5/Submit) id i4NDcXZt005762;
Sun, 23 May 2004 23:38:33 +1000
Date: Sun, 23 May 2004 23:38:33 +1000
From: Infomation <>
Message-Id: <>
Subject: Re: Info Request

Also below are the email headers that are being sent by the form to the recipent.

Return-Path: <>
Received: from (localhost.localdomain [])
by (8.12.5/8.12.5) with ESMTP id i4NDcMFM005740
for <>; Sun, 23 May 2004 23:38:22 +1000
Received: (from apache@localhost)
by (8.12.5/8.12.5/Submit) id i4NDcMc9005738;
Sun, 23 May 2004 23:38:22 +1000
Date: Sun, 23 May 2004 23:38:22 +1000
Message-Id: <>
From: (clients name)
Subject: Info Request
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on
X-Spam-Level: **
X-Spam-Status: No, hits=2.6 required=5.0 tests=BUGGY_CGI autolearn=no
Status: O

So the obvious fix is to create an autoreponder that picks the From: address and not the Return Path: address. But I would not have any idea on how to do this & yes I have read the procmail man pages several times.

Thanks Brad


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
zsnes && logitech dual action gamepad && dpad woes John5788 Linux - Games 5 10-29-2008 10:56 PM
(FreeBSD && Fedora Core 4 && Slackware 10.0) Filesystem Support taylor_venable *BSD 1 07-14-2005 03:24 PM
Japanese canna won't work : Warning: &#12363;&#12394;&#28450;&#23383;&#22793;&am OrganicOrange84 Debian 3 06-30-2005 03:28 PM
Ph&#7909;c h&#7891;i d&#7919; li&#7879;u b&#7883; m&#7845;t???, c&#7913; pollsite General 1 06-27-2005 01:39 PM
sendmail: not possible to pipe mail to programs using ~/.forward && /etc/mail/aliases fhd Linux - Networking 1 01-09-2005 07:05 PM

All times are GMT -5. The time now is 07:04 PM.

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