elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Únete al Grupo Steam elhacker.NET


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web (Moderador: #!drvy)
| | |-+  Lista Negra por enviar emails desconocidos
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Lista Negra por enviar emails desconocidos  (Leído 2,685 veces)
dapiep

Desconectado Desconectado

Mensajes: 2


Ver Perfil
Lista Negra por enviar emails desconocidos
« en: 6 Marzo 2013, 21:00 pm »

Tengo un website que acepta registrarse. Mando una email al nuevo usuario con un codigo de activacion con php y pear. Todo trabaja bien si el email es valido y existe pero si el email es no valido tengo problemas porque al intentar enviar el codigo de activacion a un email inexistente repetidamente mi cuenta es considerado como un spammer. he tratado de uzar pearl para verificar si el email existe antes de enviarlo para no ser considerado un spammer pero no trabaja al 100 por ciento y ultimamente hay un cracker que se registra repetidamente con emails inexistentes.


En línea

Ori-chan

Desconectado Desconectado

Mensajes: 257


El rey de los novatos en persona.


Ver Perfil
Re: Lista Negra por enviar emails desconocidos
« Respuesta #1 en: 7 Marzo 2013, 07:31 am »

Y tu petición es...?


En línea


dapiep

Desconectado Desconectado

Mensajes: 2


Ver Perfil
Re: Lista Negra por enviar emails desconocidos
« Respuesta #2 en: 7 Marzo 2013, 18:47 pm »

Y tu petición es...?
Como puedo verificar si el email del nuevo usuario existe antes de enviar el codigo de activacion para no ser considerado un spammer. Tambien aqui va la segunda pregunta relacionada a esta. Una vez que registras usuarios despues de un tiempo algunos emails ya no existen entonces trato de averiguar mandandoles un email a cada uno de ellos y algunos rebotan porque ya no existen y otra vez eres considerado un spammer por tratar de enviar emails a cuentas que ya no existen.
En línea

Ori-chan

Desconectado Desconectado

Mensajes: 257


El rey de los novatos en persona.


Ver Perfil
Re: Lista Negra por enviar emails desconocidos
« Respuesta #3 en: 7 Marzo 2013, 21:50 pm »

A la primera pregunta: Haz una lista en un array y cuando se registre un usuario añades su mail a la lista.


A lo otro: Tu manda el mail, si existe solo tiene que ir a la dirección que contiene el mail que tu mandas y que confirmara el registro. Si no responde en dos días, borras los datos y te olvidas.

Tambien puedes confirmar si el mail es verdadero verificando:
Que la dirección por lo menos contenga 5 caracteres (Suma de u@d.c),
Que los caracteres antes y después de la arroba (@), sean letras, números y caracteres permitidos (".""_""-", etc).
Que incluya la arroba @
Que incluya por lo menos 1 punto (usuario@dominio"."com





También te dejo este código para confirmar (No he tenido tiempo de mirarmelo, asi que no se si funciona):

Código
  1. <?php
  2.  
  3. if (!$HTTP_POST_VARS){
  4. echo "<html><body>
  5. <form action=p2.php method=POST>
  6. <input type=text name=mail>
  7. <input type=submit name=boton value=Aceptar>
  8. </form>
  9. </html>";
  10. }
  11.  
  12. else {
  13. ValidateMail($mail);
  14.  
  15. // Step 1 -- Initialize the script
  16. // The first step in any script, of course, is to initialize any variables you'll be using. In this case, declare any global variables you'll be using:
  17.  
  18.        function ValidateMail($Email) {
  19.            global $HTTP_HOST;
  20.    $result = array();
  21.  
  22. // Step 2 -- Check the e-mail address format
  23.  
  24. // Next, you'll use our regular expression to determine if the e-mail address is properly formatted. If the e-mail address is not valid, return in error:
  25. if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email)) {
  26.  
  27.  $result[0]=false;
  28.        $result[1]="$Email is not properly formatted";
  29.        return $result;
  30.    }
  31.  
  32. // Step 3 -- Find the address of the mail server
  33.  
  34. // Now, split apart the e-mail address and use the domain name to search for a mail server you can use to further check the e-mail address. If no mail server is found, you'll just use the domain address as a mail server address:
  35.  
  36. // Note: In the event that the optional step 4 is not followed, the else portion of this step must return in error in order for the script to function properly.
  37.  
  38.   list ( $Username, $Domain ) = split ("@",$Email);
  39.  
  40.   if (getmxrr($Domain, $MXHost))  {
  41.  
  42.        $ConnectAddress = $MXHost[0];
  43.    } else {
  44.  
  45.        $ConnectAddress = $Domain;
  46.  
  47.    }
  48.  
  49. // Step 4 -- Connect to mail server and check e-mail address (OPTIONAL)
  50.  
  51. // Finally, once you have the best guess at a mail server, it's time to open a connection and talk to the server. As I stated earlier, this step is optional. After every command you send, you'll need to read a kilobyte (1024 bytes) of data from the server. It should be more than enough to receive the complete response from the server for that command.
  52.  
  53. // Note that you'll store the output from the server in three separate variables: $To, $From and $Out. This is done so you can check the responses after you close the connection, to see if you actually have a real e-mail address or not.
  54.  
  55. // If the script cannot connect at all, or the e-mail address wasn't valid, set the $result array to the proper values:
  56.  
  57.        $Connect = fsockopen ( $ConnectAddress, 25 );
  58.  
  59.    if ($Connect) {
  60.  
  61.        if (ereg("^220", $Out = fgets($Connect, 1024))) {
  62.  
  63.           fputs ($Connect, "HELO $HTTP_HOST\r\n");
  64.           $Out = fgets ( $Connect, 1024 );
  65.           fputs ($Connect, "MAIL FROM: <{$Email}>\r\n");
  66.           $From = fgets ( $Connect, 1024 );
  67.           fputs ($Connect, "RCPT TO: <{$Email}>\r\n");
  68.           $To = fgets ($Connect, 1024);
  69.           fputs ($Connect, "QUIT\r\n");
  70.           fclose($Connect);
  71.            if (!ereg ("^250", $From) ||
  72. !ereg ( "^250", $To )) {
  73.               $result[0]=false;
  74.               $result[1]="Server rejected address";
  75.               return $result;
  76.  
  77.            }
  78.        } else {
  79.  
  80.            $result[0] = false;
  81.            $result[1] = "No response from server";
  82.            return $result;
  83.          }
  84.  
  85.    }  else {
  86.  
  87.        $result[0]=false;
  88.        $result[1]="Can not connect E-Mail server.";
  89.        return $result;
  90.    }
  91.  
  92. // Step 5 -- Return the results
  93.  
  94. // Finally, our last and easiest step is to return the results and finish:
  95.    $result[0]=true;
  96.    $result[1]="$Email appears to be valid.";
  97.    return $result;
  98. } // end of function
  99. }
  100. ?>




Un saludo!!   ;D
En línea


Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines