I'm trying to set up a web presence for a client, and just tried setting up
an HTML form using post to subscribe people to a Smartlist mailing list.
(I didn't see it mentioned as working, but I thought I'd try. It does get
emailed.) It almost worked perfectly: it uses the address posted in the
form, but the form puts a '=' in front of the address. Can anyone point me
to a good way to strip that out? (Sorry, don't know shell code yet.)
Daniel T. Staal
p.s. Here's a copy of what gets sent to Smartlist, in case you need it:
Return-Path: <countrynews-request(a)strictly-country.com>
Delivered-To: daniel(a)gandolf.magehandbook.net
Received: by gandolf.magehandbook.net (Postfix, from userid 1004)
id DDEC616D; Wed, 31 Jul 2002 14:26:24 -0500 (CDT)
X-From_:DStaal@usa.net Wed Jul 31 14:26:18 2002
Delivered-To: countrynews-request(a)gandolf.magehandbook.net
Received: from [192.168.1.10] (mac.magehandbook.net [192.168.1.10])
by gandolf.magehandbook.net (Postfix) with ESMTP id AAFFD161
for <countrynews-request(a)strictly-country.com>; Wed, 31 Jul 2002 14:26:10
-0500 (CDT)
To: countrynews-request(a)strictly-country.com
subject:subscribe
X-Mailer: Mozilla/4.0 (compatible; MSIE 5.15; Mac_PowerPC)
MIME-Version: 1.0
Content-type: text/plain
Message-Id: <20020731192611.AAFFD161(a)gandolf.magehandbook.net>
Old-Date: Wed, 31 Jul 2002 14:26:11 -0500 (CDT)
From: DStaal(a)usa.net
X-Diagnostic: Sent confirmation instructions
X-Envelope-To: countrynews-request
Date: Wed, 31 Jul 2002 14:26:24 -0500 (CDT)
E-mail Address:=DStaal@usa.net
> > ~$ tr -d "=" <dist>dist.fixed; mv dist dist.old; mv dist.fixed dist
This works on the whole file. On the other hand,
if you just want to use a filter on a line *before*
writing it to the dist file, use
... | sed 's/=/' | ...
For instance, if the address sits in a variable, say, $email,
and you want to append it to the dist file,
echo $email | sed 's/=//' >> dist
Exactly where you want to put it, should be pretty clear,
I guess.
- M
--On Thursday, August 1, 2002 13:39 -0400 Joyce Miletic
<jmiletic(a)alabanza.com> wrote:
> ~$ tr -d "=" <dist>dist.fixed; mv dist dist.old; mv dist.fixed dist
>
> above is all one line; '~$' is unix prompt.
>
> -Joyce
Well, that would work if I wasn't using the confirm package... (The
address doesn't make it to the dist file.) Hmm, if I can just figure out
where to put that in the procmail scripts it should still work. (With
appropriate io redirection.) Now if I just have the time...
Thanks.
Daniel T. Staal
------------------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you are
expressly allowed to retransmit, quote, or otherwise use the contents
for non-commercial purposes. This copyright will expire 5 years after
the author's death, or in 30 years, whichever is longer, unless such a
period is in excess of local copyright law.
------------------------------------------------------------------------
>>I've wondered, if the addresses are properly formatted with RFC822
>>comments, will they be handled correctly at distribution time?
>>Seems like a reasonable assumption, and it would be very nice
>>indeed to have those real names handy. But it's never gotten to
>>the top of my priorities to poke through the code, or try a
>>test case on my list.
In response to this, I wrote:
>I don't remember if I ever tried
>
> real name <user(a)domain.com>
>
>but, knowing how choplist works, I think this format would work fine as
>well.
Sorry, I was wrong. I just went back and checked the Manual, and it says
that the email address must be the first thing on the line. The other
form I mentioned, though --
user(a)domain.com (real name)
-- is explicitly permitted.
Sorry for the misinformation. (I should've checked before speaking!)
-cary