# SMTP - authentication failure - (one more time...)

**URL:** <https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344>\
**Category:** Support\
**Tags:** english\
**Created:** [January 18, 2026, 10:17pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344 "2026-01-18T22:17:13Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![marc](https://forum.yunohost.org/user_avatar/forum.yunohost.org/marc/32/10973_2.png) [@marc](https://forum.yunohost.org/u/marc)\
**Post date:** [January 18, 2026, 10:17pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/1 "2026-01-18T22:17:13Z")

</div>

**What type of hardware are you using** : Raspberry Pi 0, 1 or 2  
**What YunoHost version are you running** : 12.1.39  
**How are you able to access your server** : SSH  
**Are you in a special context or did you perform specific tweaking on your YunoHost instance ?** : No

### Describe your issue

Impossible to send email using SMTP server.

I already had a similar problem here ( [SMTP - authentication failure - #9](https://forum.yunohost.org/t/smtp-authentication-failure/40960/9) )  
, but i can not solve it now.

Please can somebody help?

**Here is what i have already tried (many hours**…)

1. i have regened the initial conf with `yunohost tools regen-conf dovecot postfix slapd -force`
2. I have changed `/etc/postfix/main.cf` and `master.cf` to get into debug mode , by changing the `*loglevel` directives
3. I then changed `/etc/dovecot/dovecot.conf` to get into debug mode with`log_debug = (category=auth) OR (category=smtp)`
4. Here is my actual thoughts:
  1. postfix receives a connexion

  2. it opens a connexion with dovecot, as written in /etc/postfix/main.cf

  3. dovecot search in ldap for the sending user:

  4. dovecot does not find and return (`uid= marc; uid unused`)

  5. But when i search in ldap with the same filter, it works:

Any idea?

Thanks in advance

### Share relevant logs or error messages

> **[hastebin](https://paste.yunohost.org/zefobupuwe)**

---

<div class="post-metadata">

**Author:** ![djez](https://forum.yunohost.org/user_avatar/forum.yunohost.org/djez/32/736_2.png) [@djez](https://forum.yunohost.org/u/djez)\
**Post date:** [January 19, 2026, 7:59pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/2 "2026-01-19T19:59:19Z")

</div>

Hi @marc,

I looked at the logs and the problem doesn’t seem to be related to the LDAP filter or permissions. The message `uid=marc; uid unused` is not an error, it’s a normal debug message.

**The problem: slapd (LDAP) too slow**

The timeline from the logs:

```auto
22:09:06 - Connection lost to LDAP server, reconnecting
22:09:06 - Can't connect to server: 127.0.0.1
22:09:25 - Dovecot starts LDAP lookup for SMTP
22:09:35 - Postfix gives up (10s timeout): "Connection lost to authentication server"
22:09:46 - Dovecot FINALLY completes the lookup successfully

```

Postfix waits a maximum of ~10 seconds for a response from Dovecot, but your LDAP query takes 10-20 seconds. Result: SMTP fails systematically, while IMAP works (because it’s more tolerant of delays).

**To check**

1. slapd status:

2. Raspberry Pi resources (often the issue on Pi 1-2):

3. Restart slapd and test immediately:

**Questions:**

- How long has the server been running without a reboot?
- Did the problem appear suddenly or did it degrade progressively?
- Do you have enough RAM available? (`free -h`)

If slapd restarts and it works temporarily then degrades again, it’s probably a resource issue (RAM/swap) on the Raspberry Pi.

EDIT : traduction EN

---

<div class="post-metadata">

**Author:** ![marc](https://forum.yunohost.org/user_avatar/forum.yunohost.org/marc/32/10973_2.png) [@marc](https://forum.yunohost.org/u/marc)\
**Post date:** [January 20, 2026, 11:59pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/3 "2026-01-20T23:59:27Z")

</div>

Hi djez,

Thank you very much for your help. You analyze is fine and gives hope

### Here are the results of the commands

1. for

> [@djez](#):
>
> `systemctl status slapd`

result:

> `● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)`  
> `Loaded: loaded (/etc/init.d/slapd; generated)`  
> `Drop-In: /usr/lib/systemd/system/slapd.service.d`  
> `└─slapd-remain-after-exit.conf`  
> `/etc/systemd/system/slapd.service.d`  
> `└─ynh-override.conf`  
> `Active: active (running) since Tue 2026-01-20 22:29:37 GMT; 34min ago`  
> `Docs: man:systemd-sysv-generator(8)`  
> `Process: 28028 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS)`  
> `Tasks: 6 (limit: 1569)`  
> `CPU: 4min 5.581s`  
> `CGroup: /system.slice/slapd.service`  
> `└─28037 /usr/sbin/slapd -h “ldap://localhost:389/ ldaps:/// ldapi:///” -g openldap -u openldap -F /etc/ldap/slapd.d`

for

> [@djez](#):
>
> `journalctl -u slapd --since "1 hour ago" | tail -50`

see here [https://paste.yunohost.org/raw/ibovavemid](https://paste.yunohost.org/raw/ibovavemid)

- for

> `$ free -h`  
> `total used free shared buff/cache available`  
> `Mem: 921Mi 401Mi 53Mi 25Mi 562Mi 519Mi`  
> `Swap: 511Mi 243Mi 268Mi`  
> ` $ uptime`  
> `23:08:35 up 6 days, 2:07, 2 users, load average: 0.13, 0.19, 0.19`

for

> [@djez](#):
>
> Then try sending an email right away.

Still fails. See here: [https://paste.yunohost.org/raw/owepodokeg](https://paste.yunohost.org/raw/owepodokeg)

- Dovecot needs 12 s for imap LDAP request (seen in another log file)
- And you are right, request of POSTFIX fails before the end of LDAP request

### Your questions:

> [@djez](#):
>
> - How long has the server been running without a reboot?
> - Did the problem appear suddenly or did it degrade progressively?
> - Do you have enough RAM available? (`free -h`)

- i recently rebooted it

- it degraded suddenly last week, when i de-installed LUFI. But i already had the same kind of problem, due to memory and number of threads, solved by changing some request parameters in nlscd.conf : see [Impossible to connect to SSH or to SMTP](https://forum.yunohost.org/t/impossible-to-connect-to-ssh-or-to-smtp/40261)

- RAM available: 53Mi Mem, 268 Mi RAM

---

<div class="post-metadata">

**Author:** ![djez](https://forum.yunohost.org/user_avatar/forum.yunohost.org/djez/32/736_2.png) [@djez](https://forum.yunohost.org/u/djez)\
**Post date:** [January 21, 2026, 6:32pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/4 "2026-01-21T18:32:08Z")

</div>

Hi marc,

Your logs confirm the issue: LDAP queries take 12-24 seconds, but Postfix gives up after ~10 seconds waiting for Dovecot’s response.

With only 53Mi free RAM and heavy swap usage, your Pi is struggling — same root cause as your October SSH issue.

**Can you show me what’s consuming memory?**

bash

```auto
ps aux --sort=-%mem | head -15

```

The real fix is to free up resources. Increasing timeouts would just be a band-aid on a resource problem.

---

<div class="post-metadata">

**Author:** ![marc](https://forum.yunohost.org/user_avatar/forum.yunohost.org/marc/32/10973_2.png) [@marc](https://forum.yunohost.org/u/marc)\
**Post date:** [January 24, 2026, 1:54pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/5 "2026-01-24T13:54:15Z")

</div>

Hi,

Here is the result:

```auto
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
mysql 742 0.2 11.0 560864 104024 ? Ssl 13:25 0:02 /usr/sbin/mariadbd
root 572 0.9 3.3 54956 31756 ? Ss 13:25 0:09 python3 /usr/bin/yunohost-api
root 548 2.0 3.2 232500 30480 ? Ssl 13:25 0:19 /usr/bin/python3 /usr/bin/fail2ban-server -xf start
sogo 1340 0.1 3.0 94884 28684 ? Ss 13:25 0:01 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /run/sogo/sogo.pid -WOLogFile /var/log/sogo/sog
ynh-por+ 574 0.6 2.9 46968 27904 ? Ss 13:25 0:06 python3 /usr/bin/yunohost-portal-api
sogo 1341 0.0 2.4 91132 23504 ? Ss 13:25 0:00 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /run/sogo/sogo.pid -WOLogFile /var/log/sogo/sog
sogo 1342 0.0 2.4 91136 23120 ? Ss 13:25 0:00 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /run/sogo/sogo.pid -WOLogFile /var/log/sogo/sog
sogo 1248 0.2 2.2 90052 21692 ? S 13:25 0:02 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /run/sogo/sogo.pid -WOLogFile /var/log/sogo/sog
vaultwa+ 569 0.1 2.2 184660 20988 ? Ssl 13:25 0:01 /var/www/vaultwarden/live/vaultwarden
root 556 0.0 2.2 210092 20980 ? Ss 13:25 0:00 php-fpm: master process (/etc/php/8.3/fpm/php-fpm.conf)
www-data 1266 0.2 2.1 280284 20376 ? S 13:25 0:02 nginx: worker process
www-data 1267 0.1 2.1 279700 20028 ? S 13:25 0:01 nginx: worker process
root 558 0.0 2.0 208664 19784 ? Ss 13:25 0:00 php-fpm: master process (/etc/php/8.4/fpm/php-fpm.conf)
root 566 0.1 1.9 40740 18116 ? Ssl 13:25 0:01 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signa
mdns 929 0.2 1.8 44244 17784 ? Ssl 13:25 0:02 python3 /usr/bin/yunomdns
root 519 0.1 1.7 63232 16928 ? Ssl 13:25 0:01 /usr/sbin/NetworkManager --no-daemon
ntpsec 696 0.1 1.7 17596 16460 ? SLs 13:25 0:01 /usr/sbin/ntpd -p /run/ntpd.pid -c /etc/ntpsec/ntp.conf -g -N -u ntpsec:ntpsec
root 1043 0.0 1.6 46024 15316 ? Sl 13:25 0:00 python3 /usr/bin/yunohost-api
www-data 1269 0.0 1.5 278800 14948 ? S 13:25 0:00 nginx: worker process
www-data 1270 0.0 1.5 278800 14904 ? S 13:25 0:00 nginx: worker process

It se

```

It seems there are not many ways to free up resources:

- SOGo is my webmail app
- other services should be kept also i think

This problem reminds me that i had several problems when Yunohost team released the \>10 versions of Yunohost.

As a matter of fact, i installed Yunohost on this Rapsberry Pi 2 , maybe in 2017. I had RAM problems with recent Yunohot versions: i noticed new debian versions use more and more RAM

When i reinstalled the whole server last july, after my SDCard crash, i could not event find the RPI2 Yunohost OS on the web! I had to find a workaround to reinstall it.

As a conclusion, i tried to resist to this Planned obsolescence of my raspberry PI2, but i go through many problems now. This is the signal: i probably have to buy another more recent RPI i guess

---

<div class="post-metadata">

**Author:** ![marc](https://forum.yunohost.org/user_avatar/forum.yunohost.org/marc/32/10973_2.png) [@marc](https://forum.yunohost.org/u/marc)\
**Post date:** [January 24, 2026, 2:14pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/6 "2026-01-24T14:14:11Z")

</div>

I tried to stop some services (Sogo, Posgresql, Mariadb).

I get this ram consumption:

```auto
           total used free shared buff/cache available

```

`Mem: 921Mi 303Mi 373Mi 19Mi 321Mi 617Mi`  
`Swap: 511Mi 0B 511Mi`

Free RAM is now 373 Mi instead of 53Mi

But sending email still fails. Is RAM really the issue?

Moreover, because of these RAM problems, i installed a cron task to log memory usage.

Here is the log information before SMTP issue, 2 weeks ago:

```auto
cron décenché à 20260107-07:40
           total used free shared buff/cache available

```

`Mem: 921Mi 489Mi 86Mi 11Mi 427Mi 432Mi`  
`Swap: 511Mi 497Mi 14Mi`

With only 86Mi left, it worked…That’a mystery then

---

<div class="post-metadata">

**Author:** ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)\
**Post date:** [January 24, 2026, 2:42pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/7 "2026-01-24T14:42:51Z")

</div>

Hi @marc  
Can you try setting `timelimit` to `0` (indefinitely) in `/etc/nslcd.conf` for testing purpose ?

---

<div class="post-metadata">

**Author:** ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)\
**Post date:** [January 24, 2026, 4:01pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/8 "2026-01-24T16:01:51Z")

</div>

> [@marc](#):
>
> SOGo

For this limited hardware specs, you should use a desktop/mobile email client and avoid making pressure on the machine. It can work but don’t expect it to do more than it can.

So remove “unnecessary” apps to allow it to breath.

(heavy load on sdcard will break it)

---

<div class="post-metadata">

**Author:** ![marc](https://forum.yunohost.org/user_avatar/forum.yunohost.org/marc/32/10973_2.png) [@marc](https://forum.yunohost.org/u/marc)\
**Post date:** [January 27, 2026, 9:50pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/9 "2026-01-27T21:50:35Z")

</div>

Hi @otm33

I tried timelimit=0 : same result

---

<div class="post-metadata">

**Author:** ![marc](https://forum.yunohost.org/user_avatar/forum.yunohost.org/marc/32/10973_2.png) [@marc](https://forum.yunohost.org/u/marc)\
**Post date:** [January 27, 2026, 9:55pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/10 "2026-01-27T21:55:31Z")

</div>

Hi @jarod5001

Thanks for the advice, i have very few apps working: SOGo, Jirafeau, Phpmyadmin, PhpLdapAdmin.

It worked fine until beginning of january. SD Card is recent (summer 2025).

So i wonder why it does not work anymore, since i removed Lufi.

I will try and reinstall Lufi , and also enter debug mode of Dovecot and nslcd if possible.

---

<div class="post-metadata">

**Author:** ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)\
**Post date:** [January 27, 2026, 11:39pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/11 "2026-01-27T23:39:38Z")

</div>

Autre possibilité à explorer: augmenter le timeout côté dovecot.  
A tester :  
ajout de `auth_policy_server_timeout_msecs = 6000` (la valeur par défaut est 2000 ms) à la fin de `/etc/dovecot/dovecot.conf` et redémarrage de dovecot.  
Même si cela change quelque chose, ce sera écrasé par regenconf… (à moins qu’un fichier d’override existe qq part ?)

---

<div class="post-metadata">

**Author:** ![marc](https://forum.yunohost.org/user_avatar/forum.yunohost.org/marc/32/10973_2.png) [@marc](https://forum.yunohost.org/u/marc)\
**Post date:** [January 28, 2026, 10:47pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/12 "2026-01-28T22:47:20Z")

</div>

> [@otm33](#):
>
> ajout de `auth_policy_server_timeout_msecs = 6000` (la valeur par défaut est 2000 ms) à la fin de `/etc/dovecot/dovecot.conf` et redémarrage de dovecot.

test effectué. Sans résultat.

---

<div class="post-metadata">

**Author:** ![marc](https://forum.yunohost.org/user_avatar/forum.yunohost.org/marc/32/10973_2.png) [@marc](https://forum.yunohost.org/u/marc)\
**Post date:** [February 22, 2026, 10:50pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/13 "2026-02-22T22:50:52Z")

</div>

Hi @otm33 @djez @jarod5001

I got the solution! At least, after many hours of trials and debugging!

very simple, but how difficult to resolve:

in Yunohost dovecot configuration (for example: in `/etc/dovecot/yunohost.d/post-ext.conf` ) just add :

`auth_cache_size = 10M`

### For those who will encounter the same kind of problems:

It is possible to add debug messages to dovecot and postfix using:

> **[Postfix Debugging Howto](https://www.postfix.org/DEBUG_README.html)**

and

> **[Debugging | Dovecot CE](https://doc.dovecot.org/main/developers/debugging.html)**
>
> Dovecot CE Documentation

For my side, i used the debug parameters in dovecot:

`log_debug = (category=auth) OR (category=smtp)`

Then i could analyse the log file with the command:

```auto
sudo tail -f /var/log/mail.log 

```

Here is how SMTP works:

- first your mail client connects to Postfix
- in /etc/postfix/main.cf, we can see that dovecot is used by Postfix to authenticate the user (with `smtpd_sasl_type = dovecot `parameter)
- so Postfix sends a connexion request to Dovecot
- Then dovecot goes through LDAP to authenticate the user

In my case, the time to authenticate was about 14 seconds. Postfix can not wait more than 10 seconds, and this delay can not be tuned ! There is no such parameter in Postfix config file. I tried a lot, but no one works!

But Dovecot proposes [some guidelines](https://doc.dovecot.org/2.3/configuration_manual/performance_tuning/) to tune performance, and especially [for CPU](https://doc.dovecot.org/2.3/configuration_manual/performance_tuning/#:~:text=CPU%20usage%20optimization%C2%B6)

There is the solution !

I hope these explanations will help !

---

<div class="post-metadata">

**Author:** ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)\
**Post date:** [March 24, 2026, 10:51pm UTC](https://forum.yunohost.org/t/smtp-authentication-failure-one-more-time/41344/14 "2026-03-24T22:51:45Z")

</div>

Closed on March 24, 2026, 10:51pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
