Question
Hi!
I am trying to get
MailInContrib working with our Exchange 2003 Server.
So far I had no luck.
When I start mailincron I get the following Output:
Process Maildir folder imap://username@server.de:password@exchangeserver/INBOX/
Scanning imap://username@server.de:password@exchangeserver/INBOX/
imap://username@server.de:password@exchangeserver/INBOX/ does not exist at /usr/local/lib/perl5/site_perl/5.8.7/Email/Folder.pm line 81
at /data/htdocs/twiki/lib/TWiki/Contrib/MailInContrib.pm line 46
TWiki::Contrib::MailInContrib::__ANON__('imap://username@server.de:password@exchangeserver/INBOX/ does n...') called at /usr/local/lib/perl5/5.8.7/Carp.pm line 269
Carp::croak('imap://username@server.de:password@exchangeserver/INBOX/ does n...') called at /usr/local/lib/perl5/site_perl/5.8.7/Email/Folder/Maildir.pm line 29
Email::Folder::Maildir::_what_is_there('Email::Folder::Maildir=HASH(0x1198428)') called at /usr/local/lib/perl5/site_perl/5.8.7/Email/Folder/Maildir.pm line 50
Email::Folder::Maildir::next_message('Email::Folder::Maildir=HASH(0x1198428)') called at /usr/local/lib/perl5/site_perl/5.8.7/Email/Folder.pm line 81
Email::Folder::next_message('MIMEFolder=HASH(0x9698a4)') called at /data/htdocs/twiki/lib/TWiki/Contrib/MailInContrib.pm line 138
TWiki::Contrib::MailInContrib::processInbox('TWiki::Contrib::MailInContrib=HASH(0xa77a38)', 'HASH(0x2515d0)') called at ../tools/mailincron line 57
It's the same with POP3.
CrawfordCurrie suggested that it's a problem with the name of the folder. But I think it's worse.
When I tried to replace "exchangeserver" with a fake entry like "noexchangeserver" I still got the same output. So I think the connection itself is not working.
Any suggestions? Please help.
Environment
--
MichaelGrimm - 25 Jul 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
I had to edit LocalSite.cfg by hand, because the installer did not ask for any configuration. Here is what I added:
$TWiki::cfg{MailInContrib} = [
{
defaultWeb => 'Sandbox',
folder => 'imap://username:password@exchangeserver/INBOX/',
onError => 'reply',
onNoTopic => 'spam',
onSuccess => 'reply',
spambox => 'Sandbox.DummyTopic',
topicPath => 'subject',
user => 'Username',
},
];
The name of the Inbox-folder seems to be correct. Fetchmail and Thunderbird told me so.
Still the same.
I tried to use an IMAP-Server of my email provider at home.
The same output
--
MichaelGrimm - 26 Jul 2007
Could someone please post a working config?
I'm still unsure if my config has the right syntax.
Thx
--
MichaelGrimm - 08 Aug 2007
Unfortunately IMAP is very sensitive to the exact pathname of the inbox. Try with and without trailing slash. And make sure your username/password pair really does log you in!
--
CrawfordCurrie - 22 Sep 2007
Closing this after more than 30 days of inactivity. Please feel free to re-open if needed.
--
PeterThoeny - 01 Nov 2007
Could someone please post a working POP config? We've been trying to get this to work for some time. My hypothesis is that the folder value is wrong but I'm running out of variations. Here's what we currently have with important bits fuzzed out:
$TWiki::cfg{MailInContrib} = [
{
folder => 'pop://****@*****.com:*****@mail.*****.****',
onError => 'log delete',
onNoTopic => 'error',
onSuccess => 'log delete',
topicPath => 'to subject',
},
];
1;
Some more info:
When I type
http://twiki/cgi-bin/twiki/mailincron?debug=on
in the address window of my browser I get a blank window.
The current crontab:
*/1 * * * * cd /usr/lib/cgi-bin/twiki && ./mailincron 2&>1 >> /var/lib/twiki/log/mailincron.log
What I get when I do this from the command line:
root@twiki:~# cd /usr/lib/cgi-bin/twiki && ./mailincron
Can't call method "getWorkArea" on an undefined value at /usr/share/perl5/TWiki/Func.pm line 1950.
Some output from running the same in the debugger:
DB<1>
main::(mailincron:54): $folders = $TWiki::cfg{MailInContrib};
DB<1>
main::(mailincron:55): my $processor = new TWiki::Contrib::MailInContrib($twiki, $debug);
DB<1> p $folders
Use of uninitialized value in print at (eval 119)[/usr/share/perl/5.8/perl5db.pl:628] line 2.
at (eval 119)[/usr/share/perl/5.8/perl5db.pl:628] line 2
eval '($@, $!, $^E, $,, $/, $\\, $^W) =
@saved
;package main; $^D = $^D | $DB::db_stop;
print {$DB::OUT} $folders;
;' called at /usr/share/perl/5.8/perl5db.pl line 628
DB::eval called at /usr/share/perl/5.8/perl5db.pl line 3410
DB::DB called at mailincron line 55
So now it looks like the configuration file isn't being read. I will plumb this further if anyone is interested, but some assistance would be very much appreciated. I can't really spend the time required to read the code and figure out where things are going wrong myself.
--
DavidHoughton - 07 Nov 2007
oops, sorry about that poor formatting, I'll try to resend the debugger part, since it's the most thoroughly munged. I'm not sure what my options are in this comment box (we're only just installing TWiki).
DB<1>
main::(mailincron:54): $folders = $TWiki::cfg{MailInContrib};
DB<1>
main::(mailincron:55): my $processor = new TWiki::Contrib::MailInContrib($twiki, $debug);
DB<1> p $folders
Use of uninitialized value in print at (eval 119)[/usr/share/perl/5.8/perl5db.pl:628] line 2.
at (eval 119)[/usr/share/perl/5.8/perl5db.pl:628] line 2
eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; $^D = $^D | $DB::db_stop;
print {$DB::OUT} $folders;
;' called at /usr/share/perl/5.8/perl5db.pl line 628
DB::eval called at /usr/share/perl/5.8/perl5db.pl line 3410
DB::DB called at mailincron line 55
--
DavidHoughton - 07 Nov 2007
After mucking about a bit my question has changed so I'm closing the question I asked earlier today.
--
DavidHoughton - 07 Nov 2007