Project

General

Profile

SMTP setting not working

Added by Martin Neuß over 3 years ago

Hi

as i ´ve already written i ´m new to redmine. i ´ve installed it on my synology ds920+ using the provided redmine package.
to be able to send email i ´ve set the environment variables to (see screenshot) so i thought it should work. trying to send a test mail i got the message: temporary failure in name resolution.
searching the net was inconclusive as some found no real reason, some answered commonplace as „check your settings“ or „dns not working“ or such.
but one mentioned that the dns server has to be configured in etc/resolv.conf. which doesn ´t exist in the synology´s docker container.

Is anybody able to help?
Have i made an error in the config settings which i simply overlooked,

Thanks for the answers

Martin


Replies (6)

RE: SMTP setting not working - Added by C S over 3 years ago

Try without SMTP_DOMAIN

RE: SMTP setting not working - Added by Martin Neuß over 3 years ago

Hi,

thanks for your fast response.

i tried with direct ip-adresses (out of whois) - name resolution no problem but:
- with the ip address for strato.de (connection refused: no port 587 available)
- with the ip address for an smtp-server (out of the SPF-records): Beim Senden einer E-Mail ist ein Fehler aufgetreten (hostname "81.169.145.133" does not match the server certificate).

so i think i ´m stuck with: a) inserting the url smtp.strato.de for the smtp-server and configuring a nameserver for the container (mainly due to the last error)

of course i ´ll try your suggestion but i think it will be of no help.

i ´ll create a resolv.conf file in a new folder etc and enter a nameserver entry such as nameserver 8.8.8.8 for google or so.

does this t seem to be sound to you?

with best regards

MArtin

RE: SMTP setting not working - Added by Martin Neuß over 3 years ago

I tried your suggestion, temproary failure of name resolution returns.
so i think it´s the missing nameserver entry.

MArtin

RE: SMTP setting not working - Added by C S over 3 years ago

I think strato doesn't support Port 587 TLS so you have to use ssl Port 465?

RE: SMTP setting not working - Added by Martin Neuß over 3 years ago

my normal email setup is going via 587.

both ports are possible (as mentioned by strato on their configuration pages).
i think that the first ip was just the domain main servers ip which was returned by whois. the smtp servers seem to have another ip (as shown by startos spf record). there port 587 was available but the ssl credentials - to my understanding - expected to see the domain name „smtp.strato.de“ instead of its ip address.

i ´ll report back when i ´ve tried it.

martin

RE: SMTP setting not working - Added by Martin Neuß over 3 years ago

Hi,

in the meantime i´ve installed the original redmine-image instead of the synology package. that was a process full of trial and error (as it was not covered in any documentation) but now all seems to be working again.

in short:
- i saved the actual database (phpmyadmin-export) and the mapped folder (/docker/redmine)
- i installed the latest image of sameersbn-redmine
- manually transferred the settings, port and folder mappings
- exported the settings file and manually added the last mapping of the mysqld.sock symlink (/docker/mysqld/mysqld.sock > /var/run/mysqld.sock; but be careful: the package installs /docker/mysqld/mysqld-redmine.sock as symlink - and switches the name back to mysqld.sock when the package is removed)
reimported the new settings-file
- and restarted the container.
....
- many errors and tries later, restoring the data-folder and the database
...
with the correct settings the upgrade from synology-package 3.4.13 to original docker image sameersbn-redmine 4.2.1 worked flawlessly.

all the relevant settings are in the provided .txt file. just remove the .txt and you´ll have a docker-settings file - naturally without any correct ip-adresses and credentials.
reimport the settings file and adjust the dta for the database, the smtp- and the imap settings and it might or should work. at least it worked fpr me

with best regards

Martin

PS: SMTP with the FQDN smtp.strato.de didn´t work because the dns name resolution does not work. in resolv.con my router is listed as the dns for my LAN. but name resolution just does not work in this setting. i used the direct ips of the smtp- and imap-server instead.

Following text of my original posting in a german synology-forum.


Hallo

mittlerweile habe ich das Redmine-Paket von Synology deinstalliert und das aktuelle Docker-Image von sameersbn (4.2.1) installiert. Da ich bereits einiges an Projekten erstellt habe habe ich die vom Paket erstellten Ordner und Datenbanktabellen in die Einstellungen des Docker-Images übernommen. Zwischenzeitlich hatte ich mir alles zerschossen. Dank ausreichender Sicherungen (Datenbankexport zuvor, HyperBackup) konnte ich alles wieder restaurieren.

Anbei die aktuelle Einstellungsdatei (einfach die .txt-Extension löschen) für den Container (natürlich ohne die Datenbank-, SMTP-, IMAP-Credentials. Diese müssen ersetzt werden. Der Port für Redmine ist auf 30002 gestellt. Die Einstellungen mappen den /home/redmine/data-Ordner auf /docker/redmine. Das kann man natürlich beliebig legen.
Was nicht beliebig ist ist das auf /var/run/mysqld.sock gemappte socket file auf /docker/mysqld.sock (Symlink-File), was wiederum auf das Synology-Socketfile bei /var/run/mysqld10.sock (bei MAriaDB10) verweist. Wer MAriaDB 5 oder anderes verwendet muss ggf. anders mappen.

Ansonsten sind alle Einstellungen hier in der Datei. Die Adressen der SMTP und IMAP-Server möglichst als IP angeben und nicht als FQDN. Bei meinem Docker-Image (aktuelle Dockerversion, aktuelles DSM, DS 920+, aktuellste Redmine-Version) funktioniert die DNS-Auflösung nicht obwohl mein Router als Nameserver korrekt angegeben ist.

Damit der externe Zugriff einfacher ist empfehle ich über reverse proxy eine Subdomain (z.B. redmine.mydomain.dscloud.me) einzurichten, die dann den https-Port 443 auf den Redmine-Port 30002 beim localhost mappt, so dass ein externer Zugriff über https://redmine.mydomain.dscloud.me) immer verschlüsselt und gesichert ist.

Martin

PS: Ach ja, die aktuelle Redmine-Version findet sich z.B. im gemappten /home/redmine/data/tmp-Verzeichnis also auf der DS z.B. in /Docker/redmine/tmp. Wenn mann sich alles beim Upgrade zerschiesst, dann immer Datenbank (zuvor über phpmyadmin gesicherte sql-datei der Tabelle) und Ordner mit der gleichen Version restaurieren, docker-container löschen,, die zuvor gesichertern Dockereinstellungen wieder importieren und dann den Container wieder starten. Dann restauriert sich alles eigentlich sehr zuverlässig.

PPS: Das ganze hin und her hat mich insgesamt drei Arbeitstage gekostet. Allerdings keine wesentliche Erfahrung mit Linux, keine Erfahrung mit Docker oder Redmine zuvor. Vernünftige Computerkenntnisse allerdings.

    (1-6/6)