Linux sagir-us1.hostever.us 5.14.0-570.51.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 8 09:41:34 EDT 2025 x86_64
LiteSpeed
Server IP : 104.247.108.91 & Your IP : 216.73.216.105
Domains : 74 Domain
User : georgeto
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
perl-Mail-DKIM /
Delete
Unzip
Name
Size
Permission
Date
Action
doc
[ DIR ]
drwxr-xr-x
2025-02-25 04:07
Changes
63.22
KB
-rw-r--r--
2020-09-07 05:49
HACKING.DKIM
4.62
KB
-rw-r--r--
2020-09-07 05:49
README.md
2.15
KB
-rw-r--r--
2020-09-07 05:49
TODO
4.2
KB
-rw-r--r--
2020-09-07 05:49
arcsign.pl
3.32
KB
-rw-r--r--
2020-09-07 05:49
arcverify.pl
3.27
KB
-rw-r--r--
2022-02-16 11:02
dkimsign.pl
3.9
KB
-rw-r--r--
2020-09-07 05:49
dkimverify.pl
2.26
KB
-rw-r--r--
2020-09-07 05:49
sample_mime_lite.pl
1.71
KB
-rw-r--r--
2020-09-07 05:49
test_bare_rsa_sha1.pl
348
B
-rw-r--r--
2020-09-07 05:49
test_canonicalization.pl
1.45
KB
-rw-r--r--
2020-09-07 05:49
test_nowsp_rsa_sha1.pl
508
B
-rw-r--r--
2020-09-07 05:49
Save
Rename
#!/usr/bin/perl use strict; use warnings; use MIME::Lite; # MIME::Lite is a Perl module for constructing MIME messages, # as well as sending messages on their way. # # This sample script attempts to construct a message using # MIME::Lite, generate a DKIM signature for that message, then # insert the DKIM signature into the MIME::Lite message, and # use MIME::Lite to send the message. # # The result is a partial success. Some of the MIME::Lite headers # get moved above the DKIM-Signature header, which may be # problematic. I haven't tested it. # my $msg; ### Create the multipart "container": $msg = MIME::Lite->new( From =>'me@myhost.com', To =>'you@yourhost.com', Cc =>'some@other.com, some@more.com', Subject =>'A message with 2 parts...', Type =>'multipart/mixed' ); ### Add the text message part: ### (Note that "attach" has same arguments as "new"): $msg->attach( Type =>'TEXT', Data =>"Here's the GIF file you wanted" ); ### Add the image part: $msg->attach( Type =>'image/gif', Path =>'aaa000123.gif', Filename =>'logo.gif', Disposition => 'attachment' ); ### Add a DKIM signature use Mail::DKIM::Signer; my $dkim = Mail::DKIM::Signer->new( Algorithm => "rsa-sha1", Method => "relaxed", Domain => "myhost.com", Selector => "mx1", KeyFile => "./private.key", ); my $raw_data = $msg->as_string; $raw_data =~ s/\n/\015\012/gs; $dkim->PRINT($raw_data); $dkim->CLOSE; my $sig = $dkim->signature; my ($header_name, $header_content) = split /:\s*/, $sig->as_string, 2; unshift @{$msg->{Header}}, [ $header_name, $header_content ]; print $msg->as_string;