linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

james3.4 can not receive mail.please help me. #3646

Closed panglei1984 closed 4 years ago

panglei1984 commented 4 years ago

I installed james3.4 version(default derby) when I use foxmail(MUA) to send a mail to myself,I can not receive the mail. I saw the source code,It seems deleteFile in method of ActiveMQMailQueueItem.done ,but it does not save the mail in derby table james_mail. When the PASS command of POP3 protocol came , in method of JPAMessageMapper.findInMailbox,james query "findMessagesInMailboxAfterUID" sql but there is no record. This cause STAT command of POP3 return +OK 0 0. Can you help me,why I can not receive mail,how to solve the problem?thanks

chibenwa commented 4 years ago

Hello, have you been trying out he 3.5 new release?

Any suspicious logs?

panglei1984 commented 4 years ago

no,i just try 3.4. there is no this problem in 3.5 version ?

chibenwa commented 4 years ago

there is no this problem in 3.5 version ?

No, as far as I am aware of.

Any suspicious logs?

panglei1984 commented 4 years ago

Hello, have you been trying out he 3.5 new release?

Any suspicious logs?

Is there bug in 3.4 version?

panglei1984 commented 4 years ago

no,there is no suspicious logs.

chibenwa commented 4 years ago

Can you list users, domains and share an anonymized version of your mailetcontainer.xml ?

panglei1984 commented 4 years ago

DEBUG 16:36:27,363 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing james message handler org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension@498674d1 DEBUG 16:36:27,363 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.protocols.smtp.core.log.HookResultLogger@1ac7198d DEBUG 16:36:27,363 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.smtpserver.jmx.HookResultJMXMonitor@3e423776 DEBUG 16:36:27,363 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing james message handler org.apache.james.smtpserver.AddDefaultAttributesMessageHook@714a0687 DEBUG 16:36:27,363 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.protocols.smtp.core.log.HookResultLogger@1ac7198d DEBUG 16:36:27,363 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.smtpserver.jmx.HookResultJMXMonitor@3e423776 DEBUG 16:36:27,363 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing james message handler org.apache.james.smtpserver.SendMailHandler@7f14894c DEBUG 16:36:27,363 | org.apache.james.smtpserver.SendMailHandler | sending mail DEBUG 16:36:27,367 | org.apache.james.mailetcontainer.impl.JamesMailSpooler | ==== Begin processing mail Mail1596184587362-9e785035-2b54-4d1a-a3a5-a6c419d46fa8 ==== DEBUG 16:36:27,369 | org.apache.james.mailetcontainer.lib.AbstractStateCompositeProcessor | Call MailProcessor root INFO 16:36:27,370 | org.apache.james.smtpserver.SendMailHandler | Successfully spooled mail Mail1596184587362-9e785035-2b54-4d1a-a3a5-a6c419d46fa8 from MaybeSender{mailAddress=Optional[zhangsan@consumer.com]} on 172.30.203.58/172.30.203.58 for [zhangsan@consumer.com] DEBUG 16:36:27,370 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.protocols.smtp.core.log.HookResultLogger@1ac7198d DEBUG 16:36:27,370 | org.apache.james.smtpserver.DataLineJamesMessageHookHandler | executing hook org.apache.james.smtpserver.jmx.HookResultJMXMonitor@3e423776 DEBUG 16:36:27,380 | org.apache.james.mailetcontainer.impl.JamesMailSpooler | ==== End processing mail Mail1596184587362-9e785035-2b54-4d1a-a3a5-a6c419d46fa8 ====

james-server.log just print those logs

panglei1984 commented 4 years ago

./james-cli.sh -h 127.0.0.1 -p 9999 ListDomains consumer.com 172.30.52.102 216.104.165.14 216.104.165.74 ListDomains command executed sucessfully in 224 ms.

./james-cli.sh -h 127.0.0.1 -p 9999 ListUsers lisi@consumer.com zhangsan@consumer.com ListUsers command executed sucessfully in 142 ms.

mailetcontainer.xml : <?xml version="1.0"?>

postmaster@consumer.com 20 8 8 transport true transport transport file://var/mail/error/ X-UserIsAuth true ignore X-WasSigned true ignore Sent false local-address-error 550 - Requested action not taken: no such user here relay-denied 550 - Requested action not taken: relaying denied outgoing 5000, 100000, 500000 25 0 10 true bounces mailet-over-quota-error The following recipients do not have enough space for storing the email you sent them. none file://var/mail/over-quota-error/ file://var/mail/spam/ true, bouncing heads none Warning: We were unable to deliver the message below because it was found infected by virus(es). file://var/mail/address-error/ file://var/mail/relay-denied/ false
chibenwa commented 4 years ago

The issue is that the mails don't make it to the LocalDelivery mailet, you will want to cleanup the path to go there...

Can you remove this section for instance :

    <mailet matcher="All" class="WithPriority">
        <value>8</value>
        <priority>8</priority>
    </mailet>

    <mailet matcher="HasPriority=8" class="Null"/>
    <mailet matcher="AtLeastPriority=8" class="Null"/>
    <mailet matcher="AtMostPriority=8" class="Null"/>
panglei1984 commented 4 years ago

Thanks,it ok when I remove this! Could you tell me the detail reason please?thanks again

chibenwa commented 4 years ago

You set priority to 8 then discard messages having a priority of 8 thus you discard all incoming traffic.

I'm happy to have had helped you.

Should we close this issue?

panglei1984 commented 4 years ago

but if I don't set 8,it error when james start. how should i set the and tag?

chibenwa commented 4 years ago

Just remove this section, that 's all.

I close this as it solved your issue.

panglei1984 commented 4 years ago

OK,thanks very much