cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging inbound email

tondmn
Champ in-the-making
Champ in-the-making
Hi,

I'm having problems getting inbound email to work. I found some information about enabling logging:

log4j.logger.org.subethamail.smtp.server.ConnectionHandler=debug

In which file do I have to put this?

/opt/alfresco-4.2.c/tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties
/opt/alfresco-4.2.c/tomcat/webapps/share/WEB-INF/classes/log4j.properties
/opt/alfresco-4.2.c/tomcat/work/Catalina/localhost/solr/WEB-INF/classes/log4j.properties

and which logfile to look into?

Best regards,
Ton
6 REPLIES 6

mitpatoliya
Star Collaborator
Star Collaborator
/opt/alfresco-4.2.c/tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties

tondmn
Champ in-the-making
Champ in-the-making
Nothing appears in alfresco.log about email.

My main problem is that this is not working:

"When an email comes into the system, the only identification is the sender's email address. The user is look-up is based on the email address"

The 'From:' address is tond@mydomain.nl

The user tond is member of EMAIL_CONTRIBUTORS

email.server.allowed.senders=.*

Setting "mail.from.default=tond" results in getting emails into a node, but that is not the intended way.

Thanks for any suggestion.

Regards,
Ton

Hi Ton,

since you've managed to get a mail into Alfresco at least once, the basics are probably setup correctly (email.inbound.enabled=true etc.). Alfresco will try to match your Email address to an Alfresco user by matching as follows: <username>@domain.tld
If email.server.allowed.senders is set to .*, no sender should be rejected.

When you say "that is not the intended way", what exactly do you expect?

Cheers,
Michael Böckling

Hi Michael,

Thanks for your reply.

What I mean with not the intended way is the following.

Currently incoming email is accepted based on the setting:

email.inbound.unknownUser=tond

while this user should be recognized based on the "From: tond@domain.com".

when I change the above setting to:

email.inbound.unknownUser=anonymous

incoming email from the same user (tond@domain.com) is rejected.

This is not correct. The drawback of the current config is that al content coming in through email is created by "tond".

Hope you follow my point.

Cheers,
Ton

alfresco-jan
Champ in-the-making
Champ in-the-making
I am having the same problem. All incoming mails will be directed to the "email.inbound.unknownUser".

I followed the steps described in the wiki:

1)
EMAIL_CONTRIBUTORS group and adds "admin" user to this group.
Only alfresco accounts that are contained by EMAIL_CONTRIBUTORS can email via SMTP.

Done


2)
As email arriving at the Alfresco email server is unauthenticated. When an email comes into the system, the only identification is the sender's From email address. The alfresco user is looked-up based on the email address.

    If a matching user is found then the current user is the matching alfresco user.
Not working, because:


Ok. I did a quick test, it seems true that:

identification is the sender's From email address
                                ^^^^

If I have a external from, i.e. jan@google.de, i get:

mail from:<jan@google.de>
554 'jan@google.de' wurde der Zugriff auf 'inbox@alfresco.com' verweigert.

But:


helo test
250 alfresco.com
mail from:<inbox@alfresco.com>
250 Ok
rcpt to:<inbox@alfresco.com>
250 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: Test 27
asdf
.
250 Ok

Works.

In my common sense feeling this is not what I would expect.

I would like to process external emails via the to: field, to distinguish between different "cases".

My use case is something like:

- documents_supplier_one@alfresco.com      -> space for all documents concering our supplier one
- documents_supplier_two@alfresco.com      -> space for all documents concering our supplier two
- documents_supplier_three@alfresco.com    -> space for all documents concering our supplier three


I suspect that this method:

      public void from(String from) throws RejectException
         {
             this.from = from;
             try
            {
                filterSender(from);
                 ^^^^^^^^
throws a RejectException if the sender is not a validated user of Alfresco.

Right now recompiling and patching this for my needs may be a bit too much effort (although recompiling Alfresco with a new version of SubEtha and adding a new property "could" improve the project and also would be a proof for my assumption.).


Nevertheless I have a postfix on port 25, which then redirects everything to 4425 (subetha in alfresco), explained in this blog:

http://blogs.system-worx.de/kejr/2011/07/25/mail-an-alfresco-postfix-umkonfigurieren/

Therefore a solutions for ton's problem would be to add a pre-postfix server with a sender rewrite option:

The question would be, what is the domain name of the alfresco server and what is the sender name of the incoming mail?

> incoming email from the same user (tond@domain.com) is rejected.
> tond@mydomain.nl

If the domain of the alfresco server is: alfresco.com and I have a supplier domain: supplier_one.de, i did a postfix hack like this:

$ vim sender_canonical
  + /^(.*)supplier_one.de/ supplier_one@alfresco.com

$ vim main.cf
  + sender_canonical_maps = regexp:/etc/postfix/sender_canonical

supplier_one must be a valid alfresco user with a space with a mail alias and in the correct group.

I like postfix, this is a very powerful tool.

If you need help with my workaround, I can explain more in detail.