cancel
Showing results for 
Search instead for 
Did you mean: 

IMAP configuration getting lost, confusing about IMAP server

bisana
Champ on-the-rise
Champ on-the-rise
Hi
I am trying to configure Alfresco Community edition 4.0.d for IMAP setting, my intention is to drag and drop emails using my email clients
My configuration details are
For "alfresco-global.properties"

# IMAP

imap.server.enabled=true
imap.server.port=143
imap.server.host=localhost

imap.server.attachments.extraction.enabled=true
imap.mail.from.default=alfresco@demo.alfresco.org

# Default IMAP mount points
imap.config.home.store=${spaces.store}
imap.config.home.rootPath=/${spaces.company_home.childname}
imap.config.home.folderPath=Imap Home
imap.config.server.mountPoints=AlfrescoIMAP
imap.config.server.mountPoints.default.mountPointName=IMAP
imap.config.server.mountPoints.default.modeName=ARCHIVE
imap.config.server.mountPoints.default.store=${spaces.store}
imap.config.server.mountPoints.default.rootPath=/${spaces.company_home.childname}
imap.config.server.mountPoints.value.AlfrescoIMAP.
mountPointName=Alfresco IMAP
imap.config.server.mountPoints.value.AlfrescoIMAP.modeName=MIXED

and in my calaina.log files I have logs

2012-06-13 09:20:50,129  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Starting 'imap' subsystem, ID: [imap, default]
2012-06-13 09:20:50,381  INFO  [repo.imap.AlfrescoImapServer] [main] IMAP service started on host:port localhost:143
2012-06-13 09:20:50,381  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Startup of 'imap' subsystem, ID: [imap, default] complete
2012-06-13 09:20:50,381  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Starting 'email' subsystem, ID: [email, outbound]
Exception in thread "Thread-57" java.lang.RuntimeException: java.net.BindException: Permission denied
        at com.icegreen.greenmail.imap.ImapServer.run(ImapServer.java:67)
Caused by: java.net.BindException: Permission denied
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at com.icegreen.greenmail.imap.ImapServer.openServerSocket(ImapServer.java:35)
        at com.icegreen.greenmail.imap.ImapServer.run(ImapServer.java:65)
2012-06-13 09:20:50,500  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Startup of 'email' subsystem, ID: [email, outbound] complete
2012-06-13 09:20:50,500  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Starting 'email' subsystem, ID: [email, inbound]
2012-06-13 09:20:50,557  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Startup of 'email' subsystem, ID: [email, inbound] complete

except
Exception in thread "Thread-57" java.lang.RuntimeException: java.net.BindException: Permission denied
        at com.icegreen.greenmail.imap.ImapServer.run(ImapServer.java:67)
Caused by: java.net.BindException: Permission denied
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at com.icegreen.greenmail.imap.ImapServer.openServerSocket(ImapServer.java:35)
        at com.icegreen.greenmail.imap.ImapServer.run(ImapServer.java:65)

All other messages are fine.
Is the above message relate to stop over for my IMAP settings
From Thunderbird email client I am not able to configure the mail client

Also my doubts are that from the mail client when I configure, what should I give as IMAP Server and SMTP server,
Should I give my Email Server details or Alfresco server IP address. This part is the most confusing
Advice requested
Thanks
Joseph John
6 REPLIES 6

bisana
Champ on-the-rise
Champ on-the-rise

Exception in thread "Thread-57" java.lang.RuntimeException: java.net.BindException: Permission denied
at com.icegreen.greenmail.imap.ImapServer.run(ImapServer.java:67)
Caused by: java.net.BindException: Permission denied
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at com.icegreen.greenmail.imap.ImapServer.openServerSocket(ImapServer.java:35)
at com.icegreen.greenmail.imap.ImapServer.run(ImapServer.java:65)

I feel there is a chance I am running into this problem, because I am running alfresco not as root user, the port no below 1024 is not to be given.
I think a work around of redirecting the port will work
Later I tried running the service using root, when I ran the service using root, then also I am facing the same problems and messages
Thanks

mward
Champ in-the-making
Champ in-the-making
Can you please post which operating system you're using and exactly how you are starting alfresco as root. Also, have you tried changing the IMAP port from 143 to a high numbered port (just to rule out other problems)?

bisana
Champ on-the-rise
Champ on-the-rise
I user Linux, Centos with SElinux disabled
No Firewall
When I start the service using root, I don't think I need to change the port, because root has the permission on that IMAP port 143

mward
Champ in-the-making
Champ in-the-making
because root has the permission on that IMAP port 143

That's correct - that's why I asked you to post exactly how you are running as root - you could also verify using ps that the jvm is running under root.

Ultimately I would avoid running alfresco as root anyway if you can - it's not generally good practice. Investigate iptables, xinetd or capabilities to see which way will help you achieve this. Ideally you would have alfresco running under its own dedicated user account.

bisana
Champ on-the-rise
Champ on-the-rise
by default I try out only on user alfresco, but for trouble shooting I did, to zero in for the permission problem
I feel there is a chance I am running into this problem, because I am running alfresco not as root user, the port no below 1024 is not to be given.
I think a work around of redirecting the port will work
Later I tried running the service using root, when I ran the service using root, then also I am facing the same problems and messages

mward
Champ in-the-making
Champ in-the-making
Please try trouble shooting as I have suggested, either:

1. run as root
2. post how you did that
3. check you're running as root, e.g. ps -u root | grep java

or

1. change port to above 143
2. run as non-root user
3. post stack trace to find which port is not being bound.