mobile email

Anti-Telus filter

A Perl script which removes the tag added by Telus in mobile e-mail, so that various services can work properly when using mobile e-mail from a Telus phone.

  1. #!/usr/bin/perl
  2.  
  3. $user = 'REDIR@EXAMPLE.ADDRESS';
  4. $pass = 'PASSWORD';
  5. $host = 'POP3.SERVER.ADDRESS';
  6.  
  7. %redir = (
  8.     'sender@example.address' => 'reciever@example.address'
  9. );
  10.  
  11. $sendmail = '/usr/sbin/sendmail -t';
  12. #DEBUG $sendmail = 'cat >>test2.txt';
  13.  
  14. use Mail::POP3Client;
  15.  
  16. # connection
  17. $pop = new Mail::POP3Client(HOST => $host);
  18. $pop->User($user);
  19. $pop->Pass($pass);
  20.  
  21. $pop->Connect() >= 0 || die $pop->Message();
  22.  
  23. # loop through messages
  24. for ($i = 1; $i <= $pop->Count(); $i++) {
  25.     %head = ();
  26.  
  27.     foreach ($pop->Head($i)) {
  28.         /^(From|Subject|Content-type):\s+(
Syndicate content