Script para pruebas de recepcion de correo, normalmente lo uso para pruebas de stress
=====================================================================================
#!/usr/bin/perl
use MIME::Lite;
$to = $ARGV[0];
$msg = new MIME::Lite
From =>'midir@dominioorigen',
To =>$to,
Subject =>'Mail para prueba de stress',
Type =>'multipart/mixed';
attach $msg
Type =>'TEXT',
Data =>"
Aqui cualquier mensaje
";
$msg->send;
Script para probar que esta detectando correctamente correo spam
================================================================
#!/usr/bin/perl
use MIME::Lite;
$to = $ARGV[0];
$msg = new MIME::Lite
From =>'direccion@dominioorigen',
To =>$to,
Subject =>'Prueba para spam',
Type =>'multipart/mixed';
attach $msg
Type =>'TEXT',
Data =>"
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
";
$msg->send;
Script para probar que esta detectando correctamente correo con un adjunto con virus (clamav)
=============================================================================================
!/usr/bin/perl
use MIME::Lite;
$to = $ARGV[0];
### Adjust subject and body message
my $subject = 'A message with 2 parts ...';
my $message_body = "Here's the attachment file(s) you wanted";
### Adjust the filenames
my $my_file = '/home/marce/clam.cab';
### Create the multipart container
$msg = MIME::Lite->new (
From => 'midir@dominoorigen',
To => $to,
Subject => $subject,
Type =>'multipart/mixed'
) or die "Error creating multipart container: $!\n";
### Add the text message part
$msg->attach (
Type => 'TEXT',
Data => $message_body
) or die "Error adding the text message part: $!\n";
### Add the file
$msg->attach (
Type => 'image/gif',
Path => $my_file,
# Filename => $your_file_gif,
Disposition => 'attachment'
) or die "Error adding $file_gif: $!\n";
### Send the Message
MIME::Lite->send('smtp', $mail_host, Timeout=>60);
$msg->send;
NOTA:
En todos estos script se envia por argumento la direccion a quien sera enviado el mail.
Extraído de http://unlugarsinfin.blogspot.es
=====================================================================================
#!/usr/bin/perl
use MIME::Lite;
$to = $ARGV[0];
$msg = new MIME::Lite
From =>'midir@dominioorigen',
To =>$to,
Subject =>'Mail para prueba de stress',
Type =>'multipart/mixed';
attach $msg
Type =>'TEXT',
Data =>"
Aqui cualquier mensaje
";
$msg->send;
Script para probar que esta detectando correctamente correo spam
================================================================
#!/usr/bin/perl
use MIME::Lite;
$to = $ARGV[0];
$msg = new MIME::Lite
From =>'direccion@dominioorigen',
To =>$to,
Subject =>'Prueba para spam',
Type =>'multipart/mixed';
attach $msg
Type =>'TEXT',
Data =>"
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
";
$msg->send;
Script para probar que esta detectando correctamente correo con un adjunto con virus (clamav)
=============================================================================================
!/usr/bin/perl
use MIME::Lite;
$to = $ARGV[0];
### Adjust subject and body message
my $subject = 'A message with 2 parts ...';
my $message_body = "Here's the attachment file(s) you wanted";
### Adjust the filenames
my $my_file = '/home/marce/clam.cab';
### Create the multipart container
$msg = MIME::Lite->new (
From => 'midir@dominoorigen',
To => $to,
Subject => $subject,
Type =>'multipart/mixed'
) or die "Error creating multipart container: $!\n";
### Add the text message part
$msg->attach (
Type => 'TEXT',
Data => $message_body
) or die "Error adding the text message part: $!\n";
### Add the file
$msg->attach (
Type => 'image/gif',
Path => $my_file,
# Filename => $your_file_gif,
Disposition => 'attachment'
) or die "Error adding $file_gif: $!\n";
### Send the Message
MIME::Lite->send('smtp', $mail_host, Timeout=>60);
$msg->send;
NOTA:
En todos estos script se envia por argumento la direccion a quien sera enviado el mail.
Extraído de http://unlugarsinfin.blogspot.es
Comentarios
Publicar un comentario