Captive Portal e-mail capture
-
Hello fellow sensers - We have a client with a simple request, well they think it is a simple request. The wish to give out 'free' wifi access across the site utilising seven access points.
They wish to use a captive portal with a generic username and password for everyone but they would like 'capture' the users e-mail address if they are a new user.
The idea I had was on the portal login page there is an e-mail address stating that if you wanted the user name & password you e-mail this 'g-mail' address.
You then set up an out-of-office reply on this account with a message stating the user name & password + stating any T&C's. Then once a month you could log into the mailbox and harvest all the mail addresses.The problem is an obvious one - if you don't have internet access yet you cant send the mail requesting the username and password? or can you? Is there some addition that I can add to the captive portal page in addition to the User Name & password form that will capture email addresses?
Many Thanks - I did search the forum and found a post requesting the same but no answer.
Ideas welcome
-
I haven't looked into the details to see if this is included in pfSense PHP but I believe PHP generally includes code to connect to a SMTP server to send an email.
It would be possible to tweak the captive portal authorisation to work just as you suggested and send the email (the email is coming from the pfSense system itself, not the captive portal).
The challenge would be in enabling access so the user can read the reply. If all the users have mailboxes on one (or possibly a small number of) mailservers (e.g. an office mail server) then the mail server IP address can be entered as a captive portal bypass address. However if you want to accommodate users on hotmail, gmail, yahoo, etc etc etc and allow pop3 mailboxes, imap mailboxes and web mail you have a challenge :-)
-
The email could be sent with a bit of custom PHP on the portal page. The user being able to receive that response is the problem, with so many various mail providers you'd have to let them out to the entire Internet to reliably receive that response.