Email stays pending. Never sends

My YunoHost server

Hardware:
Hardware: x86_64 Desktop PC
YunoHost version: 11.0.10.1
I have access to my server: Direct Access, SSH, SFTP, WebAdmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: No

Description of my issue

I am trying to use my Yunohost server to send and receive emails. I receive emails easily enough, and can log into K-9 Mail, Nextcloud Mail and Thunderbird. However sending emails is a different story. I have to use SMTP forwarding due to the fact my ISP blocks outgoing port 25, but not incoming emails on port 25. I was using sendpulses smtp-pulse service for a while but one day my hard drive corrupted itself and I had to reset it entirely. Now I can not get sending emails to work at all. I tried using smtp-pulse and mailjet but both fail to send emails.

On my quest to fix the issue on my own I’ve found a few things that might help someone to help me figure out this issue.

  1. Changing any SMTP settings from the command line outputs two errors.
admin@yunohost:~$ sudo yunohost settings set smtp.relay.host -v in-v3.mailjet.com 
Success! Configuration updated for 'postfix'
Warning: postmap: fatal: open database /etc/postfix/sasl_passwd.db: Permission denied
Error: Could not run script: /usr/share/yunohost/hooks/conf_regen/19-postfix
admin@yunohost:~$ 
sudo yunohost settings set smtp.relay.port -v 587
Success! Configuration updated for 'postfix'
Warning: postmap: fatal: open database /etc/postfix/sasl_passwd.db: Permission denied
Error: Could not run script: /usr/share/yunohost/hooks/conf_regen/19-postfix
admin@yunohost:~$ 
sudo yunohost settings set smtp.relay.user -v user
Success! Configuration updated for 'postfix'
Warning: postmap: fatal: open database /etc/postfix/sasl_passwd.db: Permission denied
Error: Could not run script: /usr/share/yunohost/hooks/conf_regen/19-postfix
admin@yunohost:~$ sudo yunohost settings set smtp.relay.password -v password
Success! Configuration updated for 'postfix'
Warning: postmap: fatal: open database /etc/postfix/sasl_passwd.db: Permission denied
Error: Could not run script: /usr/share/yunohost/hooks/conf_regen/19-postfix

A fatal warning, and an error saying a script can’t be run. This issue is present on my installation, even after a fresh install.

  1. Running the Diagnosis from the webadmin shows the emails I try to send as
    6 pending emails in the mail queues
    and after some searching I found that I’m actually able to view these pending emails by entering the command
    mailq in the terminal, which shows me this error message:
B31B5CC0973     769 Tue Oct 18 01:19:11  sender@mydomain.com
          (local data error while talking to in-v3.mailjet.com[104.199.96.85])
                                         email@receiver.com

930EBCC0986     690 Tue Oct 18 02:29:48  sender@mydomain.com
          (local data error while talking to in-v3.mailjet.com[104.199.96.85])
                                         email@receiver.com

My best guess as a non-developer is that for some reason, Yunohost can’t change the SMTP Forward password for whatever reason. I believe that’s what the “sasl_passwd.db: Permission denied” error is, based on the fact that mailq shows that it knows it needs to talk to the SMTP forwading service.

Any help here is appreciated because I’ve had to fall back to my ancient Yahoo mail that I only kept around for spam.
Much Love & thanks.

I’ve found a solution with help from the Matrix room, and a bit of my own research.
It seems the user postfix doesn’t have proper access to /etc/postfix for whatever reason. The fix it to chown that directory for postfix, and then to generate the sasl_passwd.db with the command. My emails work again and hopefully this doesn’t cause me any other issues

sudo chown postfix /etc/postfix
sudo postmap sasl_passwd

Source here

1 Like

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