LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-16-2011, 10:13 AM   #1
lifeforce4
Member
 
Registered: May 2003
Location: 2:16:840
Distribution: Slackware, CentOS, RedHat, Xubuntu
Posts: 169
Blog Entries: 1

Rep: Reputation: 32
Question Exchange Server 2010 connection from Perl?


So I had a simple IMAP script that worked until the Exchange server upgraded to 2010. Now I've been having a hard time trying to just authenticate to the server again. I wanted to know if anyone has been able to access Exchange 2010 from linux using a perl script, or other languages?

Thanks,
LF4

Code:
print "\nLogging in as : $username\n\n" if ($debug);
my $imap = Mail::IMAPClient->new(
    Server   => $server,
    User     => $username,
    Password => $password,
    Port     => 993,
    Ssl      => 1,
    Debug    => 1
) or die "Cannot connect through IMAPClient: $@";
The following is the debug output.
Code:
Logging in as : ACCOUNT

Started at Wed Nov 16 09:05:50 2011
Using Mail::IMAPClient version 3.29 on perl 5.008008
Connecting via IO::Socket::SSL to mail.server.domain:993 Timeout 600
Connected to mail.server.domain
Read:   * OK The Microsoft Exchange IMAP4 service is ready - 'w1185'
Sending: 1 LOGIN "ACCOUNT" PASSWORD
Sent 35 bytes
Read:   1 NO LOGIN failed.
ERROR: 1 NO LOGIN failed. at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 1236
        Mail::IMAPClient::_get_response('Mail::IMAPClient=HASH(0x17d0e440)', 1, 'undef') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 1183
        Mail::IMAPClient::_imap_command_do('Mail::IMAPClient=HASH(0x17d0e440)', 'LOGIN "ACCOUNT" PASSWORD') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 1086
        Mail::IMAPClient::_imap_command('Mail::IMAPClient=HASH(0x17d0e440)', 'LOGIN "ACCOUNT" PASSWORD') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 459
        Mail::IMAPClient::login('Mail::IMAPClient=HASH(0x17d0e440)') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 395
        Mail::IMAPClient::Socket('Mail::IMAPClient=HASH(0x17d0e440)', 'IO::Socket::SSL=GLOB(0x1841f700)') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 351
        Mail::IMAPClient::connect('Mail::IMAPClient=HASH(0x17d0e440)') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 307
        Mail::IMAPClient::new('Mail::IMAPClient', 'Server', 'mail.server.domain', 'User', 'ACCOUNT', 'Password', 'PASSWORD', 'Port', 993, ...) called at ./status_page_msg.pl line 63
ERROR: 1 NO LOGIN failed. at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 1131
        Mail::IMAPClient::_imap_command('Mail::IMAPClient=HASH(0x17d0e440)', 'LOGIN "ACCOUNT" PASSWORD') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 459
        Mail::IMAPClient::login('Mail::IMAPClient=HASH(0x17d0e440)') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 395
        Mail::IMAPClient::Socket('Mail::IMAPClient=HASH(0x17d0e440)', 'IO::Socket::SSL=GLOB(0x1841f700)') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 351
        Mail::IMAPClient::connect('Mail::IMAPClient=HASH(0x17d0e440)') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 307
        Mail::IMAPClient::new('Mail::IMAPClient', 'Server', 'mail.server.domain', 'User', 'ACCOUNT', 'Password', 'PASSWORD', 'Port', 993, ...) called at ./status_page_msg.pl line 63
Cannot connect through IMAPClient: 1 NO LOGIN failed. at ./status_page_msg.pl line 63.
 
Old 11-16-2011, 10:28 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,405

Rep: Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529
Quote:
Originally Posted by lifeforce4 View Post
So I had a simple IMAP script that worked until the Exchange server upgraded to 2010. Now I've been having a hard time trying to just authenticate to the server again. I wanted to know if anyone has been able to access Exchange 2010 from linux using a perl script, or other languages?
Does the Exchange server have all the service packs/updates loaded?? Since it WAS working and it's not since the upgrade, chances are either Microsoft introduced a new 'feature' (usually disabling an industry-standard protocol, in favor of their own 'standard'), or it has bugs.

I'd first try to use a GUI based mail client on Linux, and 'scan' the Exchange server, to see what methods of authentication it's presenting as options. Plain-text SSL should be present at the very least.
 
  


Reply

Tags
exchange, imap, perl


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exchange 2010/Ubuntu 10.04/Evolution - mail floorripper Ubuntu 3 10-06-2011 08:42 PM
Iptables forwording to M$ Exchange 2010 yon4h Linux - Server 5 05-05-2011 06:37 AM
perl linux - send mail via Microsoft exchange server bobypt Programming 1 04-11-2008 07:54 AM
RedHat 8.0 mail connection to MS Exchange Server dkeva Linux - Networking 2 01-20-2003 12:12 PM


All times are GMT -5. The time now is 03:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration