YunoHost-Apps / opensondage_ynh

OpenSondage for YunoHost
https://framadate.org/
GNU Affero General Public License v3.0
16 stars 14 forks source link

How to NOT using YunoHost build in SMTP server? #55

Closed steve-s-71 closed 2 years ago

steve-s-71 commented 4 years ago

Currently my Opensondage installation is sending emails through the YunoHost build in SMTP server.

The problem is, those emails are not arriving - probably because I run my YunoHost on my Home DSL line and the IP addresses from DSL accounts are usually blocked / ignored by many professional mailservers.

How and where can I configure Opensondage or YunoHost to use a different SMTP server? I want to configure my other email adress from a professional email provider (GMX.de)?

autra commented 4 years ago

@steve-s-71 I managed to get a pretty decent mail-tester score with yunohost, and my mails are now accepted by all major mail service provider I know of (hotmail, gmail, gandi... It took 2 or 3 clic on "Not Spam" on gmail to make their engine understand I'm no spam, and since then no pb). Have you read https://yunohost.org/#/email_en? Especially the mail-tester.com part, it was very useful to me. You can post the mail-tester result here if you want us to have a look.

steve-s-71 commented 4 years ago

I ran mail-tester.com earlier to prove that email is really sent. I do not have it on hands anymore, but the result was pretty positive.

However, I have mail accounts at 2 professional mail- / web-hosters and both are not delivering the mails. It is not even in the SPAM folder. And even if I could train the engine of my own mail accounts, that does not help. Because other users of the service are not technical persons. Those users are neither willing to, nor do they know how to train their SPAM engine.

Isn’t there a possibility to configure a different SMTP server other than the YunoHost build in SMTP server?

autra commented 4 years ago

It is possible to configure postfix to send mail through an external smtp server , but yunuhost won't help you there, you're on your own with your text editor ;-) For opensondage, you need to check their doc / source code.

That being said, if I were you, I won't jump to the conclusion that it's because you're behind your home dsl line, or because these are blocked by professional mail serveur. It is very possible to make them accept your mails. With the mail tester score the thing is: for some mail providers, only one missing point (for example, missing spf record in DNS) can be enough to get rejected. With a fresh installation of ynh, you have already a score > 8, which is "pretty decent", but this is not enough. Can you do this mail-tester.com again and post the result?

Normally, all it takes to have your mails get through is to fill a form at spamhaus.org to have your ip whitelisted (by default, spamhaus add to its SBL list all the ip), BUT FIRST: correct DNS configuration must be done, and we especially need to check some item about spf records. So we need your mail-tester report.

And even if I could train the engine of my own mail accounts, that does not help.

I think you misunderstand me, because your user won't need to do this of course. In my experience, only gmail needs to be trained. You just send 1-3 mails to a gmail account, click "not spam" on them, and voilà, every other gmail user get your mail. All other mail providers where happy as soon as my DNS were setup correctly and I submitted the spamhaus form. Actually, my company uses gandi DNS, and I have a better score than my company mails (and delivers them more reliably).

However, I have mail accounts at 2 professional mail- / web-hosters and both are not delivering the mails. It is not even in the SPAM folder.

That is another thing. Do you get rejection mail ? Did you use mail-tester.com on them? If yes and they are not delivered, that sounds like another problem, either a bug or a port not opened. Did you check the /var/log/mail* log files on your yunohost server? For example with cat /var/log/mail*[^gz] | grep -i error

steve-s-71 commented 4 years ago

Thank you, @autra for your kind and detailed response.

I checked the log you pointed me to. Indeed that says Service not available because IP Address is backlisted. One of the mail server error messages said “multiple RBL lists” without naming them, the other server referred especially to using Spamhaus.

When checking the IP at Spamhaus this is the result: https://www.spamhaus.org/pbl/query/PBL681467

As you can see from the notification, this is per recommendation of the Telekom provider and it is for a big range of IP addresses. There is little to no change to get my IP removed from the Blacklist. And even if, the effect will be only short, because my DSL line provider use dynamic IP address – my IP changes every few days ….

So what I did, I googled for “how to configure postfix to send mail through an external smtp server”. I found it is not very difficult to setup. So now I’m using the professional SMTP server from my dyndns provider (Strato.de). It works great, I now get all messages from Opensondage on all my test accounts.

Thanks again, for you comments.