Thursday, April 03, 2014

Configure Alfresco Inbound Email in local machine


Alfresco Inbound Email Configuration

When you want your email client send email directly to the alfresco, here is the inbound alfresco configuration.

Email client will connect to IMAP and SMTP server of alfresco itself and then put that email into specified space of alfresco. You know that alfresco acts as a IMAP and SMTP server as well.

I am using alfresco 4.2.1 (Lastest version as of now) on my local machine.

Lets start configure it :

Step 1 :
Best practice is not to override original alfresco files,
we will use alfresco-global.properties file.

location : <alfresco_home>/tomcat/shared/classes

### Inbound setting ###
email.inbound.unknownUser=anonymous
email.inbound.enabled=true
email.server.enabled=true
email.server.port=25
email.server.domain=cignexindia.com
email.server.allowed.senders=.*

###IMAP Configuration###
imap.server.enabled=true
imap.server.port=143
imap.server.host=localhost


### Outbound Email Configuration ###
mail.host=<your_smtp_server>
mail.port=25
mail.username=
mail.password=

##### Test SMTP setup ###
mail.testmessage.send=true
mail.testmessage.to=<test_email_to_send>
mail.testmessage.subject=Outbound SMTP
mail.testmessage.text=The Outbound SMTP email subsystem is working.


I am not explaining above properties as it is already mentioned in the forums/post/wiki.




Step 2 : Creating domain in host file

Open following file in your window's file system
hosts

location : C:\Windows\System32\drivers\etc

Add following entry :
127.0.0.1 cignexindia.com

save file and close it.

Note : This domain name can not be anything it should be your system domain only.



Step 3 : Configure Alfresco

Start Alfresco server and create users
e.g. Fred (username = fred) email = fred@cignexindia.com
Inbox (username = inbox) email = inbox@cignexindia.com
admin(username = admin) email = admin@cignexindia.com


e.g.

After creating sample users as above, add those users to EMAIL_CONTRIBUTORS group in alfresco.

e.g

Go to Company Home space, create Folder (Space) named “Inbound”
Apply Email Alias (Aspect) to it via Run Action

Give alias as “fred” as per our example.
Fred is existed user in alfresco.
Note :  Email alias you should provide is exactly same as email id of user before "@<domain>"

e.g  fred is alias then email id of fred in alfresco is fred@cignexindia.com


Step 4 : Open Mozilla Thunderbird and Configure it

We need to enable IMAP and SMTP on thunderbird to work with Inbound.
As we already activated IMAP and SMTP server in alfresco-global.properties file

e.g.
Configure new Email account <IMAP> in thunderbird,
In screenshot you can see, we have used user “fred” which is already there in alfresco and giving domain cignexindia.com as we specified in alfresco-global.properties file.




Then configure local SMTP server, alfresco already act as a SMTP server , so we just need to give our local alfresco to point out on 25 port.

You can configure in thunderbird by following way :

  • Open “Account Setting”
  • Select “Outgoing server (SMTP)
  • Click Add
It looks like below :



Now you are configured properly for Inbound on mozilla thunderbird.

You can see now thunderbird shows alfresco repository in its email client like below :








Step 5 : Send email from this IMAP account like below



When you see your email comes in your configured space.





==================================
Ghanshyam Rathod
CIGNEX Datamatics Pvt Ltd.
India

1 comment:

  1. Hello, this happens to me:

    17:08:50,428 DEBUG [smtp.server.ConnectionHandler] SMTP connection count: 1
    17:08:50,536 DEBUG [smtp.server.ConnectionHandler] Server: 220 alfrescochap.com ESMTP SubEthaSMTP
    17:08:50,608 DEBUG [smtp.server.ConnectionHandler] Client: EHLO EUR01-HE1-obe.outbound.protection.outlook.com
    17:08:50,625 DEBUG [smtp.server.ConnectionHandler] Server: 250-alfrescochap.com
    250-8BITMIME
    250-STARTTLS
    250 Ok
    17:08:50,694 DEBUG [smtp.server.ConnectionHandler] Client: STARTTLS
    17:08:50,701 DEBUG [smtp.server.ConnectionHandler] Server: 220 Ready to start TLS
    17:08:54,605 DEBUG [smtp.server.ConnectionHandler] Client: EHLO EUR01-HE1-obe.outbound.protection.outlook.com
    17:08:54,624 DEBUG [smtp.server.ConnectionHandler] Server: 250-alfrescochap.com
    250-8BITMIME
    250-STARTTLS
    250 Ok
    17:08:54,750 DEBUG [smtp.server.ConnectionHandler] Client: MAIL FROM:
    17:08:54,801 DEBUG [smtp.server.ConnectionHandler] Server: 250 Ok
    17:08:54,924 DEBUG [smtp.server.ConnectionHandler] Client: RCPT TO:
    17:08:54,930 DEBUG [smtp.server.ConnectionHandler] Server: 250 Ok
    17:08:55,044 DEBUG [smtp.server.ConnectionHandler] Client: DATA
    17:08:55,044 DEBUG [smtp.server.ConnectionHandler] Server: 354 End data with .
    17:08:57,149 DEBUG [smtp.server.ConnectionHandler] Server: 554 La dirección correo electrónico '"alfrescomail@alfrescochap.com" ' no hace referencia a un nodo de acceso válido.
    17:08:57,271 DEBUG [smtp.server.ConnectionHandler] Client: QUIT
    17:08:57,271 DEBUG [smtp.server.ConnectionHandler] Server: 221 Bye

    My /etc/hosts is "IPMachine GDC-CHAP". The MX register should be GDC-CHAP.domain.com?

    ReplyDelete