mirror of
https://github.com/imapsync/imapsync.git
synced 2025-08-04 16:01:29 +02:00
1.977
This commit is contained in:
parent
93b917b12b
commit
1d08afaba6
139 changed files with 27179 additions and 6213 deletions
7
W/learn/bibmail_1GB
Normal file
7
W/learn/bibmail_1GB
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
# A big file 714MB
|
||||
dd if=/dev/zero of=pate714M bs=1M count=714
|
||||
# post it to big1 user
|
||||
echo Aie aie aie | mutt -s '1 GB dans ta face !' -a pate714M -- big1
|
||||
|
||||
# ok ?
|
27
W/learn/imap_Encode_IMAPUTF7_decode
Executable file
27
W/learn/imap_Encode_IMAPUTF7_decode
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
use Encode::IMAPUTF7 ;
|
||||
|
||||
sub imap_utf7_decode_new
|
||||
{
|
||||
use utf8 ;
|
||||
my ( $s ) = shift ;
|
||||
return( Encode::IMAPUTF7::decode("IMAP-UTF-7", $s ) ) ;
|
||||
}
|
||||
|
||||
sub imap_utf7_encode_new
|
||||
{
|
||||
use utf8 ;
|
||||
my ( $s ) = shift ;
|
||||
return( Encode::IMAPUTF7::encode("IMAP-UTF-7", $s ) ) ;
|
||||
}
|
||||
|
||||
#use utf8 ;
|
||||
while ( <> )
|
||||
{
|
||||
chomp ;
|
||||
#print( Encode::IMAPUTF7::encode('IMAP-UTF-7', $_ ), "\n" ) ;
|
||||
print( Encode::IMAPUTF7::decode('IMAP-UTF-7', $_ ), "\n" ) ;
|
||||
}
|
30
W/learn/imap_Encode_IMAPUTF7_encode
Executable file
30
W/learn/imap_Encode_IMAPUTF7_encode
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
use Encode::IMAPUTF7 ;
|
||||
|
||||
sub imap_utf7_decode_new
|
||||
{
|
||||
use utf8 ;
|
||||
my ( $s ) = shift ;
|
||||
return( Encode::IMAPUTF7::decode("IMAP-UTF-7", $s ) ) ;
|
||||
}
|
||||
|
||||
sub imap_utf7_encode_new
|
||||
{
|
||||
use utf8 ;
|
||||
my ( $s ) = shift ;
|
||||
return( Encode::IMAPUTF7::encode("IMAP-UTF-7", $s ) ) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#use utf8 ;
|
||||
no utf8 ;
|
||||
while ( <> )
|
||||
{
|
||||
chomp ;
|
||||
print( Encode::IMAPUTF7::encode('IMAP-UTF-7', $_ ), "\n" ) ;
|
||||
#print( Encode::IMAPUTF7::decode('IMAP-UTF-7', $_ ), "\n" ) ;
|
||||
}
|
24
W/learn/imap_utf7_tests_Encode_IMAPUTF7
Executable file
24
W/learn/imap_utf7_tests_Encode_IMAPUTF7
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
use Encode::IMAPUTF7 ;
|
||||
|
||||
sub imap_utf7_decode_new
|
||||
{
|
||||
use utf8 ;
|
||||
my ( $s ) = shift ;
|
||||
return( Encode::IMAPUTF7::decode("IMAP-UTF-7", $s ) ) ;
|
||||
}
|
||||
|
||||
sub imap_utf7_encode_new
|
||||
{
|
||||
use utf8 ;
|
||||
my ( $s ) = shift ;
|
||||
return( Encode::IMAPUTF7::encode("IMAP-UTF-7", $s ) ) ;
|
||||
}
|
||||
|
||||
use utf8 ;
|
||||
#no utf8 ;
|
||||
print( Encode::IMAPUTF7::encode('IMAP-UTF-7', 'Répertoire' ), "\n" );
|
||||
print( Encode::IMAPUTF7::decode('IMAP-UTF-7', 'R&AOk-pertoire' ), "\n" );
|
32
W/learn/xoauth2_gmail
Executable file
32
W/learn/xoauth2_gmail
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict ;
|
||||
use warnings ;
|
||||
|
||||
|
||||
use LWP::Authen::OAuth2;
|
||||
|
||||
my $dbh ;
|
||||
my $token_string ;
|
||||
|
||||
# Constructor
|
||||
my $oauth2 = LWP::Authen::OAuth2->new(
|
||||
client_id => "108687549524-86sjq07f3ch8otl9fnr56mjnniltdrvn.apps.googleusercontent.com",
|
||||
client_secret => "zAJO4PLxzeJ4yOaiJRk6f69k",
|
||||
service_provider => "Google",
|
||||
redirect_uri => "https://imapsync.lamiral.info/",
|
||||
|
||||
# Optional hook, but recommended.
|
||||
#save_tokens => \&save_tokens,
|
||||
#save_tokens_args => [ $dbh ],
|
||||
|
||||
# This is for when you have tokens from last time.
|
||||
token_string => $token_string,
|
||||
scope => 'https://mail.google.com/',
|
||||
login_hint => 'gilles.lamiral@gmail.com',
|
||||
);
|
||||
|
||||
# URL for user to go to to start the process.
|
||||
my $url = $oauth2->authorization_url();
|
||||
|
||||
print "url: $url\ntoken_string: $token_string\n" ;
|
Loading…
Add table
Add a link
Reference in a new issue