LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-15-2012, 09:33 AM   #1
countrydj
Member
 
Registered: Jun 2009
Location: Preston, England
Distribution: Centos 6
Posts: 127

Rep: Reputation: 1
Having problem with voting form double opt-in


Hi Guys...

I have written a script, in php and mysql, to record votes.
What the script does is to display a form, with about 20 fields, to vote for your choice in about 20 categories.
I have made only 3 fields compulsary; Name, Email and Country.
In order to avoid spam and duplication I have used a double opt-in system.
i.e. when the 'Vote Now' button is clicked the script sends an email to the voter and includes a link back to the script to register the vote. It also checks that the email has not previously voted.

I have a voter who says that she does not receive a verification email to return the vote. She also says that she has 3 friends who do not receive the verification email.

In order to check possible problems, I have sent an email direct from my computer which she received. I have also sent an email directly from the server command line which she received.
I thought a possibility was because of the long link so I sent an email direcly from the server and included the verification link. She received that also.

Her email address is: @hotmail.co.uk and a friend is: @hotmail.com.
I checked for hotmail email addresses in the database and other people have registered their votes with a hotmail email address. Therefore it is not hotmail that is blocking mail from a form.

I am now stumped as to why she cannot receive.

Can anybody think of any possible reason that I can check ???

Thanks,
 
Old 04-15-2012, 09:46 AM   #2
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
A common problem is insufficient headers (no From: field), or discrepancy between the From: header and the envelope sender.

Send a message to yourself using the server commandline, then vote using the same e-mail address. (You can send them to me, if you want me to take a look.) The two messages should have identical header fields. Most e-mail clients don't show the header details, so be sure to switch on the detailed header view. Better yet, save the e-mails as text files, obscure any identifying fields, and post them here, and we can take a look.
 
Old 04-15-2012, 10:44 AM   #3
countrydj
Member
 
Registered: Jun 2009
Location: Preston, England
Distribution: Centos 6
Posts: 127

Original Poster
Rep: Reputation: 1
Hi NA...
Thanks for your prompt reply>
here is the email from the command line:
Quote:
Subject:
Test
From:
ukzone@redvelvet.gvl99.co.uk
Date:
Sun, 15 Apr 2012 16:31:32 +0100
To:
na@in-uk.co.uk
X-Account-Key:
account1
X-UIDL:
000249a33c615554
X-Mozilla-Status:
0001
X-Mozilla-Status2:
00080000
Return-Path:
<ukzone@redvelvet.gvl99.co.uk>
Received:
from redvelvet.gvl99.co.uk (localhost [127.0.0.1]) by redvelvet.gvl99.co.uk (8.14.4/8.14.4) with ESMTP id q3FFVWgQ012225 for <na@in-uk.co.uk>; Sun, 15 Apr 2012 16:31:32 +0100
Received:
(from root@localhost) by redvelvet.gvl99.co.uk (8.14.4/8.14.4/Submit) id q3FFVWuR012224 for na@in-uk.co.uk; Sun, 15 Apr 2012 16:31:32 +0100
Message-ID:
<201204151531.q3FFVWuR012224@redvelvet.gvl99.co.uk>
User-Agent:
Heirloom mailx 12.4 7/29/08
MIME-Version:
1.0
Content-Type:
text/plain; charset=us-ascii
Content-Transfer-Encoding:
7bit

Please DO NOT reply to this email. It is an unattended mailbox.

To validate your email address, please click the following link:

http://bcmawards.co.uk/vote/voting-f...fb1141d21543b7

---------------------------------------------------------------------------------------------------


Here is the email from the form:
Quote:
Subject:
BCMAwards 2012 Validation Email
From:
noreply@bcmawards.co.uk
Date:
Sun, 15 Apr 2012 16:25:53 +0100
To:
na@in-uk.co.uk
X-Account-Key:
account1
X-UIDL:
000249a23c615554
X-Mozilla-Status:
0001
X-Mozilla-Status2:
00080000
Return-Path:
<apache@redvelvet.gvl99.co.uk>
Received:
from redvelvet.gvl99.co.uk (localhost [127.0.0.1]) by redvelvet.gvl99.co.uk (8.14.4/8.14.4) with ESMTP id q3FFPrtf011948 for <na@in-uk.co.uk>; Sun, 15 Apr 2012 16:25:54 +0100
Received:
(from apache@localhost) by redvelvet.gvl99.co.uk (8.14.4/8.14.4/Submit) id q3FFPrRO011947; Sun, 15 Apr 2012 16:25:53 +0100
Message-ID:
<201204151525.q3FFPrRO011947@redvelvet.gvl99.co.uk>
X-PHP-Originating-Script:
504:voting-form.php

Please DO NOT reply to this email. It is an unattended mailbox.

To validate your email address, please click the following link:

http://bcmawards.co.uk/vote/voting-f...fb1141d21543b7

The main difference that I can see, in the headers of the voting form is:
Quote:
X-PHP-Originating-Script:
504:voting-form.php
hth

John C
 
Old 04-15-2012, 01:54 PM   #4
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
The output is line-wrapped, so it'd be better if you could retry using the e-mail address I provided for you privately for this. It is OK if there are a couple of extra copies.

I suspect the problem is in the From: headers. Consider this in the e-mail sent by the form:
Code:
From: noreply@bcmawards.co.uk
Received: from redvelvet.gvl99.co.uk (localhost [127.0.0.1]) by redvelvet.gvl99.co.uk (8.14.4/8.14.4) with ESMTP id q3FFPrtf011948 for <recipient>; Sun, 15 Apr 2012 16:25:54 +0100
Received: (from apache@localhost) by redvelvet.gvl99.co.uk (8.14.4/8.14.4/Submit) id q3FFPrRO011947; Sun, 15 Apr 2012 16:25:53 +0100
In the command-line message, the From: header is
Code:
From: ukzone@redvelvet.gvl99.co.uk
If the From: header does not match the host (early) in the receive chain, most spam filters assume the message is spam. That is a common spoofing technique, after all. I suggest you check this by replacing the value your form supplies for the From: header to something@redvelvet.gvl99.co.uk .
 
  


Reply



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
[SOLVED] Having problem with double opt-in script countrydj Programming 1 02-03-2012 05:23 PM
LXer: Is E-Voting a solution? To which problem? LXer Syndicated Linux News 0 03-14-2011 11:31 PM
shell getopts: opt w/ optional parameter is taking next opt as its parameter! GrapefruiTgirl Programming 22 10-27-2010 06:00 AM
Regarding # /opt/CTEact/bin/act & /opt/SUNWexplo/bin/explorer not available for x86 rajaniyer123 Solaris / OpenSolaris 6 04-24-2008 09:09 AM
Problem booting that removes /opt to /lost+found samac Slackware 4 06-18-2005 05:35 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:31 PM.

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