Re: Cannot receive email for local users

Mihai Zamfira <[email protected]>
Newsgroups gmane.comp.jakarta.james.user
Message-ID <[email protected]>
Hi,
domain was created before
and the result it's below

curl -XGET http://<ip>:<port>/domains

[
    "example.com",
    "localhost",
    "127.0.0.1"
]

The problem has something to do with "<enableVirtualHosting>true</enableVirtualHosting>” tag from usersrepository.xml file because if i change it to “false” and the  userIdAttribute to an LDAP attribute that contain only the username (without @example.com) everything works as expected. 

thanks. 

> On 17 Apr 2023, at 18:35, Tung Tran Van <[email protected]> wrote:
> 
> Hi,
> 
> Did you add donain?
> Can you try:
> 
> curl -XGET http://localhost:8000/ <http://localhost:8000/users>domains
> 
> 
> Vào Th 2, 17 thg 4, 2023 lúc 22:26 Mihai Zamfira
> <[email protected]> đã viết:
> 
>> Hi,
>> I have installed version 3.7.4 of Apache James on OEL8 and it works
>> integrated with Cassandra, Elasticsearch, SOGo (as web mail frontend) and
>> the users are stored in OpenLDAP.
>> LDAP configuration works and i can see users thru WebAdmin and also i'm
>> able to connect on IMAP fomr SOGO or others email clients.
>> The problem is with the SMTP server that refuses to recognize local users
>> reporting "550 5.1.1 Unknown user:"
>> 
>> The content of the "usersrepository.xml" file looks like below:
>> 
>> <usersrepository name="LocalUsers"
>>            ldapHost="ldap://localhost:389"
>>            principal="cn=domain_admin,dc=example,dc=com"
>>            credentials=“<some password>"
>>            userBase="ou=users,ou=james,dc=example,dc=com"
>>            userIdAttribute="uid"
>>            userObjectClass="person">
>>          <enableVirtualHosting>true</enableVirtualHosting>
>>          <enableForwarding>true</enableForwarding>
>> </usersrepository>
>> 
>> Therefore the VirtualHosting it's enable and the user has ending with "@
>> example.com"
>> 
>> resuts from "curl -XGET http://localhost:8000/users" show me that the
>> Apache James can read users from OpenLdap
>> 
>> [
>>    {
>>        "username": "[email protected]"
>>    }
>> ]
>> 
>> 
>> The real problem appears when I try to set the SMTP server with the telnet
>> command and the result is shown below
>> 
>> [root@mail ~]# telnet 127.0.0.1 25
>> Trying 127.0.0.1...
>> Connected to 127.0.0.1.
>> Escape character is '^]'.
>> 220 Apache JAMES awesome SMTP Server
>> ehlo test
>> 250-mail.example.com Hello test [127.0.0.1])
>> 250-PIPELINING
>> 250-ENHANCEDSTATUSCODES
>> 250 8BITMIME
>> mail from:<[email protected]>
>> 250 2.1.0 Sender <[email protected]> OK
>> rcpt to:<[email protected]>
>> 550 5.1.1 Unknown user: [email protected]
>> Connection closed by foreign host.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> --
> Tung, Tran Van
> *Phone:* (+84) 35 757 6258
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.