cancel
Showing results for 
Search instead for 
Did you mean: 

Error receiving emails for some email aliases

sebp
Champ in-the-making
Champ in-the-making
I configured the inbuilt Alfresco SMTP server and it works fine for some Email Aliases and for some it doesn't. If I give a folder the Email Alias 123456 and send an Email to the Alfresco SMTP Server with To: 123456@mycompany.com it works and the Email ends up in the folder with the 123456 alias. If I rename the EMail Alias of the same folder to sebastian and send a mail to sebastian@mycompany.com it doesn't work and I get the error:
The email address 'sebastian@mycompany.com' does not reference a valid accessible node.

I tried a little bit and found out that e.g. the following aliases work:
1234
Inbox
Fred
These aliases don't work:
sebastian
Klaus

I debugged a little bit and found out that EmailServiceImpl line 280:
ResultSet resultSet = searchService.query(storeRef, SearchService.LANGUAGE_LUCENE, query);
does not return any result for some aliases even if the alias is set on a folder. Anyone having the same problem or even better a solution?
6 REPLIES 6

sebp
Champ in-the-making
Champ in-the-making
Ok, I found the solution. The Email Alias property is tokenized by Lucene. To prevent the property from being tokenized the email server model must be changed. The emailserver:aliasable aspect in emailServerModel.xml must look like this:


<aspect name="emailserver:aliasable">
          <title>Email Alias</title>
          <properties>
              <property name="emailserver:alias">
                  <title>Alias</title>
                  <type>d:text</type>
                  <mandatory>false</mandatory>
                  <index enabled="true">
                      <atomic>true</atomic>
                      <stored>false</stored>
                      <tokenised>false</tokenised>
                  </index>
                  <constraints>
                      <constraint ref="emailserver:alias" />
                  </constraints>
              </property>
          </properties>
      </aspect>

I'm using Alfresco Community 2.9B_dev labs which is not the latest development version. Maybe smbd. can check if this is still an issue in the current version.

_sax
Champ in-the-making
Champ in-the-making
Thank you for your solution - something I didn't even consider as a cause before!
I followed your path, let the search index rebuilt, changed space aliases, created new folders with aliases, but still to no avail.
We're, too, using 2.9B.
      <aspect name="emailserver:aliasable">
         <title>Email Alias</title>
         <properties>
            <property name="emailserver:alias">
               <title>Alias</title>
               <type>d:text</type>
               <mandatory>false</mandatory>
               <index enabled="false">
                                  <atomic>true</atomic>
                                  <stored>false</stored>
                                  <tokenised>false</tokenised>
               </index>
               <constraints>
                           <constraint ref="emailserver:alias" />
               </constraints>
            </property>
         </properties>
      </aspect>

Is there something else to consider?

sebp
Champ in-the-making
Champ in-the-making
Hi _sax,

you've set <index enabled="false">. I'm not sure but I think if it is set to false then the email alias is not indexed at all and will therefore not be found by the email server.

_sax
Champ in-the-making
Champ in-the-making
Hi sebp,

thank you very much! That was the point! Now it resolves names like a charm.

Greetings to Dresden!

amolchavan
Champ in-the-making
Champ in-the-making
Hi Seb,

I wonder if just configuring Alfresco's Inbound SMTP server works for inbound emails in Community v 3.3.

I did that but not worked at all - here is my post with the issues I am facing -
http://forums.alfresco.com/en/viewtopic.php?f=9&t=34785

Here are the values -

email.server.enabled=true
email.server.port=25
email.server.domain=alfresco.com   — can we have our company domain here?

email.inbound.enabled=true
email.inbound.unknownUser=anonymous
email.server.allowed.senders=.*
#email.server.blocked.senders=


Just want to know what value to be given for property -
email.server.domain=alfresco.com

Also, as your post mentions aliases like 'Inbox', etc. works for you but in my case it is not.
What could be the issue?

I was thinking to try out Alfresco's built-in Inbound email server for receiving incmoing mails rather trying email Collector.
Please help.

Thanks in advance,
Amol

sebp
Champ in-the-making
Champ in-the-making
Hi Amol,

I've also read your other post. If you send a mail to Alfresco do you get any error messages? If yes, then which?

In addition to setting up the alfresco-global.properties for incoming email you also have to:
1. create a user with an email address
2. add this user to the EMAIL_CONTRIBUTORS group
3. give this users write access to the folder that has the Inbox email alias
4. if you send an email to the Alfresco SMTP server use the email address of this user in the emails from field.

Regards
sebp