• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue dovecot Error Temp file creation to /tmp/dovecot.imap failed

PeterKi

Regular Pleskian
Occasionally get the following error from dovecot imap on my ubuntu 16.04TLS vServer with the latest ples 17.5.3

dovecot: service=imap, user=xxx@yyyy, ip=[::1]. Error: Temp file creation to /tmp/dovecot.imap. failed: No such file or directory:

From the dovecot forum I found:
Sometimes Dovecot wants to create temporary files to avoid excessive memory usage. If it can't create the temp file it'll just keep the temporary data in memory.

doveconf -n output
does not show any valid setting for the mail_temp_dir variable on my server.

So may be this variable is missing which creates the above error if the server runs short on memory?
 
Try to define it manually in /etc/dovecot/dovecot.conf as

mail_temp_dir = /tmp

restart dovecot and make sure that you have correct permissions for /tmp:

# stat /tmp
File: ‘/tmp’
Size: 20480 Blocks: 40 IO Block: 4096 directory
Device: 38h/56d Inode: 24641731 Links: 15
Access: (1777/drwxrwxrwt) Uid: ( 0/ root) Gid: ( 0/ root)
 
As the error message says it already tries to access /tmp/devocot.imap.
Thus there must be some default to /tmp.
Nonetheless I give your suggestion a try to see if the error will go away.
 
In the meantime I have upgraded my vServer from a single core to a dual core.
The problem with the tmp file creation still exists though.
As the dovecot mailing list does not show active discussions on the topic I assume that the problem is with the plesk modification of dovecot.

I am using plesk-dovecot 2.2.27-ubuntu16.04.17031716 on Plesk Onyx Version 17.5.3 Update #40 and I have made no modifications to the dovecot config.
Logwatch frequently reports messages like shown below.
The errors don't seem to appear for every imap connect as can be seen from the number of deliveries and successful logins.

So what makes dovecot fail sometimes to create the /tmp/dovecot.imap?

Here is the logwatch output from yesterday.

Dovecot Deliveries: 19
Dovecot IMAP and POP3 Successful Logins: 138
Dovecot disconnects: 14

**Unmatched Entries**
dovecot: message repeated 2 times: [ service=imap, [email protected], ip=[::1]. Error: Temp file creation to /tmp/dovecot.imap. failed: No such file or directory]: 2 Time(s)
dovecot: message repeated 2 times: [ service=imap, [email protected], ip=[::1]. Error: Temp file creation to /tmp/dovecot.imap. failed: No such file or directory]: 1 Time(s)
dovecot: service=imap, [email protected], ip=[::1]. Error: Temp file creation to /tmp/dovecot.imap. failed: No such file or directory: 12 Time(s)
dovecot: service=imap, [email protected], ip=[::1]. Error: Temp file creation to /tmp/dovecot.imap. failed: No such file or directory: 1 Time(s)
 
/tmp has the regular settings otherwise I would have a lot of other issues too.
drwxrwxrwt 2 root root 16384 Feb 16 13:21 /tmp
 
Back
Top