Can't install Custom Webapp : mail.mailutils: cannot send message

Hi there,

RPI4 local YNH 4.3.6.2 fresh install.

I can’t install the app Custom Webapp. I had installed YNH previously and an update of the “Custom Webapp” app went badly 3 month ago.

Here is some of the logs :

2022-02-14 14:05:00,699: DEBUG - + ynh_replace_string '$' '<br>' mail_to_send
2022-02-14 14:05:01,097: DEBUG - + sed --in-place 's@$@<br>@g' mail_to_send
2022-02-14 14:05:01,109: DEBUG - + sed --in-place '1s@^@<!DOCTYPE html>\n<html>\n<head></head>\n<body>\n@' mail_to_send
2022-02-14 14:05:01,121: DEBUG - + ynh_replace_string '  ' '\&#160;\&#160;' mail_to_send
2022-02-14 14:05:01,564: DEBUG - + sed --in-place 's@  @\&#160;\&#160;@g' mail_to_send
2022-02-14 14:05:01,576: DEBUG - + ynh_replace_string '\t' '\&#160;\&#160;' mail_to_send
2022-02-14 14:05:02,019: DEBUG - + sed --in-place 's@\t@\&#160;\&#160;@g' mail_to_send
2022-02-14 14:05:02,031: DEBUG - + ynh_replace_string '__URL_TAG1__\(.*\)__URL_TAG2__\(.*\)__URL_TAG3__' '<a href="\2">\1</a>' mail_to_send
2022-02-14 14:05:02,482: DEBUG - + sed --in-place 's@__URL_TAG1__\(.*\)__URL_TAG2__\(.*\)__URL_TAG3__@<a href="\2">\1</a>@g' mail_to_send
2022-02-14 14:05:02,498: DEBUG - + ynh_replace_string __PRE_TAG1__ '<pre>' mail_to_send
2022-02-14 14:05:02,958: DEBUG - + sed --in-place 's@__PRE_TAG1__@<pre>@g' mail_to_send
2022-02-14 14:05:02,971: DEBUG - + ynh_replace_string __PRE_TAG2__ '<\pre>' mail_to_send
2022-02-14 14:05:03,418: DEBUG - + sed --in-place 's@__PRE_TAG2__@<\pre>@g' mail_to_send
2022-02-14 14:05:03,431: DEBUG - + echo -e '\n</body>\n</html>'
2022-02-14 14:05:03,433: DEBUG - + '[' -e /usr/bin/bsd-mailx ']'
2022-02-14 14:05:03,434: DEBUG - + local mail_bin=/usr/bin/mail.mailutils
2022-02-14 14:05:03,436: DEBUG - + content_type=text/html
2022-02-14 14:05:03,440: DEBUG - + cat mail_to_send
2022-02-14 14:05:03,442: DEBUG - + /usr/bin/mail.mailutils -a 'Content-Type: text/html; charset=UTF-8' -s '☁️🆈🅽🅷☁️: `my_webapp` has just been installed!' '  root'
2022-02-14 14:05:03,597: WARNING - mail.mailutils: cannot send message: Process exited with a non-zero status
2022-02-14 14:05:03,607: DEBUG - + ynh_exit_properly
2022-02-14 14:05:03,609: DEBUG - + local exit_code=36
2022-02-14 14:05:03,618: DEBUG - + '[' 36 -eq 0 ']'
2022-02-14 14:05:05,139: ERROR - Impossible d'installer my_webapp : Une erreur est survenue dans le script d'installation de l'application

and of course the full log of the install :

https://paste.yunohost.org/raw/xunizefini

I don’t were to search a this point.
Thanks for your help

Is there any usefull information in /var/log/mail.err ?

1 Like

yep

here is the last line :

postfix/sendmail[10089]: fatal: chdir /var/spool/postfix: No such file or directory

Posfix and dovecot service was also down.
So I create the missing folder /var/spool/postfix

I restarted both services and tried a new install of custom webapp which works.
So thank you for your advice.

before the end YNH return an :

Erreur: "504"

Action: "POST" /yunohost/api/apps

What I’ve found is when I reboot the server, the postfix folder is missing again and so the two services. I don’t host mail on this server but it could be problematic if I reboot again and YNH want to send me alert.

you normally don’t need to create that directory, it’s certainly a consequence of your failing postfix service.
To repai rit you can look at ljf advices : https://forum.yunohost.org/t/impossible-denvoyer-des-mails-postfix-ko/10294/6?u=ewilly

ok thanks

I tried :

yunohost service regen-conf postfix --force

and also :

apt-get install postfix --reinstall
yunohost tools regen-conf postfix
yunohost tools restart postfix

The services won’t start. Each logs ( journalctl / /var/log/mail.err / /var/log/mail.log ) contains the same line :

/var/spool/postfix: No such file or directory

The only way to run postfix and dovecot is to mkdir /var/spool/postfix

I’ve reverse proxy behind my routeur. All the port are open in YNH exposure diagnostics.

Is this directory mount on a tmpfs ? (cat /etc/mtab | grep /var)
What say the log of postfix service after a reboot ? (via the ynh admin web ui or journalctl -u postfix.service)

1 Like

found it…

it was a line that I wrote into /etc/fstab on my previous instance.

tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0

I deleted it, a reboot, and both services are working.

thanks for your help :slight_smile:

1 Like

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