Problem with LMTP connection closed after end of data

DeviC3

Verified User
Joined
Jan 17, 2022
Messages
9
Hello, I'm trying to fix issue with LMTP for few days. In exigrep logs there lot of

Code:
R=virtual_user T=dovecot_lmtp_udp defer (-1): LMTP connection closed after end of data

while users sending mails to each other on local domain.

My log /var/log/dovecot-lmtp-errors.log looks like
Code:
Fatal: setgid(8(mem) from userdb lookup) failed with euid=1009(m1291), gid=12(mail), egid=12(mail): Operation not permitted (This binary should probably be called with process group set to 8(mem) instead of 12(mail))

I was trying to set permissions by DA script, but it looks like legit.
Updating dovecot by custombuild didn;t worked for me.
 
This is a problem I'm a bit more familiar with than I'd like to admit. I migrated a DA server and I did an rsync of /etc/virtual to pick up new data customers added during the migration. However, what I didn't consider, is that user/group IDs on the new system may not match what they did on the previous, and in this case they absolutely did not. Every passwd file in /etc/virtual/$domain contains a user and group ID by number (one for each email on the domain), and this is broken on your system like it was on mine. Let me give you an example.

This is the contents of /etc/virtual/mxroute.com/passwd on my server:

jarland: PASSHASHREMOVED:1144:8::/home/DAUSERREMOVED/imap/mxroute.com/jarland:/bin/false:userdb_quota_rule=*:bytes=5120M

Notice this part:


That's UID and GID. UID 1144 is the user ID of my DirectAdmin user. GID 8 is the group ID of the group "mail" on the system. Since mine didn't match, Dovecot ran without the ability to write to the user's mailbox. I'm thinking you might find something similar if you compare this for a specific user that is seeing the problem.
 
I'm analyzing logs and other files and maybe this is the solution. But is this secure to change this manually?
One of user got
Code:
dxx:somesecretthings/:1009:8::/home/user/imap/domain.com/dxx:/bin/false:userdb_quota_rule=*:bytes=10000M
and rest of same domain users:
Code:
an:somesecretthings/:1009:12::/home/user/imap/domain.com/an:/bin/false:userdb_quota_rule=*:bytes=10000M
 
As long as you make the right change it's okay. The 12 and 8 swap was exactly the same one I had to make.
 
Back
Top