lmtp: Error: Temp file creation to /tmp/ ... failed: No such file or directory on incoming mails with attachments
Aki Tuomi
aki.tuomi at dovecot.fi
Thu Jun 8 11:09:05 EEST 2017
On 07.06.2017 23:42, Lars-Sören Steck wrote:
> Dear list,
>
> I'm currently facing problems when receiving eMails with attachments, at
> least sometimes.
>
> My mailserver is set up with the tool 'Mailcow', and hence is based on
> Dovecot (2.2.22 (fe789d2)) and Postfix.
>
> Usually, there are no problems with receiving mails. If a mail has an
> attachment, however, it is possible that the following error occurs
> (extract from /var/log/mail.log):
>
> 'Jun 7 12:50:28 mail postfix/lmtp[26827]: 564E68A0515:
> to=<abc at def.ghj>, relay=my.mail.server[private/dovecot-lmtp],
> delay=0.71, delays=0.67/0.01/0.01/0.02, dsn=4.3.0, status=deferred (host
> my.mail.server[private/dovecot-lmtp] said: 451 4.3.0 Temporary internal
> failure (in reply to end of DATA command))'
>
> Extract from /var/log/mail.err:
>
> 'Jun 7 12:50:28 mail dovecot: lmtp(26828): Error: Temp file creation to
> /tmp/dovecot.lmtp.mail.26828. failed: No such file or directory'
>
>
> Once this happened the first time after dovecot is running, it will
> happen for all incoming mails with attachments. This can be solved
> temporarily by restarting the dovecot service and running postqueue -f,
> but that obviously does not solve the underlying problem.
>
> In this post to this list, it is stated that dovecot sometimes creates
> temp files to avoid 'excessive memory usage'. I'm guessing that this is
> the case here, also the error message is similiar:
>
> https://dovecot.org/list/dovecot/2016-June/104722.html
>
>
> Should I simply change the configuration variable mail_temp_dir to solve
> this? Why is dovecot not able to find the /tmp folder? In the list
> thread, it is stated that this is caused by dovecot running with enabled
> chrooting. As far as I understand it though (correct me if I'm wrong),
> chrooting is not enabled in my dovecot configuration.
>
> Please find attached the output of 'dovecot -n':
>
>
Are you using either chroot or some apparmor/selinux/whatever security
suite which is preventing writing to /tmp?
Aki
More information about the dovecot
mailing list