Email on new self hosting server

So I have installed two different servers, both in Linode, but in two different data centers. I have reinstalled the one in question multiple times my completely reinstalling the Ubuntu image. And I can send and receive email from the self hosted server, EXCEPT I can not send to one of my Bluehost webhosted email accounts. (I can actually can receive email from that Bluehost webhosted email account. When trying to send email to my erothoff@Domain email account, I get:

              The mail system

erothoff@Domain: host mail.Domain[123.123.123.123] said:
550-Verification failed for <erothoff@$SelfHostedDomain> 550-No Such User Here
550 Sender verify failed (in reply to RCPT TO command)

Any thoughts?

Went into postfix admin. On the 4 alias emails, they all have a red box, and you can not send to them from outside. Drive@ can not send as well as the one I mail to my bluehost webmail account. (just doesn’t show up.)
On postfix admin on my other account, the 4 alias email also have red box next to them, but you CAN send to them, and Drive@ can send to my bluehost webmail account.
I also reinstalled the not working one 2x yesterday. The second time, I waited all night for the DNS to update just in case it was the mail._domainkey was causing the problem, as it changes when you reinstall the server, but the same issue.
At a loss.

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

the 550 that bluehost is giving you is for that reason - seems the setup aliases aren’t allowed at your end to send. If you fix this, you fix bluehost accepting mail by the sending user at your host.

I’m not familiar with postfixadmin, but what enables aliases to receive mail and their mapping to other users is this line … the webui should offer you the menu to alias maps somewhere, map it to the postmaster

./main.cf:local_recipient_maps = proxy:unix:passwd.byname $alias_maps

That’s weird :confused:

I fired up a new test instance, and could send an email to the address you gave me by PM.

The red squares in front of abuse, postmaster, hostmaster, webmaster aliases are OK.
In the “Mailboxes” section below, you should have both orange and grey boxes in front of all of your user addresses, plus drive and welcome.

I must admit, I can’t understand your error message.
Assuming Domain is your Bluehost domain, and SelfHostedDomain is your selfhosted Murena, why would Domain complain about a SelfHostedDomain user?
It’s like you asked the Bluehost server to send an email, while identified as your Murena selfhosted user!
But that doesn’t match sending from your Murena selfhosted, to Bluehost…

Did you, by any chance, tried to re-use your Bluehost DNS domain on Murena selfhosted?

BTW Postfix user source in Murena selfhosted, is Mariadb database (as defined in https://github.com/mailserver2/mailserver/blob/e10532a2261ae10d87dae4fbc36232538e005a03/rootfs/etc/postfix/main.cf#L103, DBDRIVER defaults to mysql).

@erothoff could you please try (please copy/paste as is, except the “export” line where you replace *@*.* with your user email address, leaving quotes untouched):

  • cd /mnt/repo-base
  • . scripts/base.sh
  • export $TEST_USER='*@*.*'
  • docker-compose exec mariadb mysql --user=root --password="$MYSQL_ROOT_PASSWORD" $PFDB_DB -e "SELECT username FROM mailbox WHERE username='$TEST_USER' AND active = TRUE UNION SELECT goto FROM alias WHERE address='$TEST_USER' AND active = TRUE;"

→ this should reply a table with the user email address as “username”.

In the same shell session, please input:

  • docker-compose exec postfixadmin /postfixadmin/scripts/postfixadmin-cli mailbox view $TEST_USER
  • docker-compose exec postfixadmin /postfixadmin/scripts/postfixadmin-cli alias view $TEST_USER

→ both should reply with details about the user/mailbox and it’s alias.

I did not reuse a domain that was on the bluehost. Yes I believe that the server tests to make sure there is a user at the server that is sending to it, and when it doesn’t find one, it refused the email. If you main a new instance, and it worked, I will try again with redoing the server.
The base.sh script didn’t do anything. export $TEST_USER said ‘=erothoff@$DOMAIN’: not a valid identifier.
Checking the mailbox view, gave me a prompt for the email address, when I then entered it, it found the account. But if I exchanged $TESTUSER with my email addressError: The Email is not valid!
(Didn’t find anything under alias)
So tomorrow I will rebuild the server again. Linode said there is no difference in the data centers. (Didn’t expect there to be.) And my other server works fine, just this one. I have to be missing something, but this server is not recognizing the alias when you send email to abuse for example, but I can send email to that account. Just not send email from that account to my bluehost email that checks if there is an account from the server that is sending the email…

This is OK, it just set variables and don’t display anything.

The first ' is to be after the = :wink:

Strange behavior you have here :confused: A rebuild may work, finger crossed!
It may be a good idea to save the setup session output to a text file. You may activate logging (example with Putty), or increase your terminal scrollback buffer (example with Putty) then copy/paste to text file.

Are you strictly bound to Linode? I never had such problems with Hetzner, and their CPX21 is way cheaper than Linode shared-CPU 4GB BTW :wink:

OK, what I have learned…
Why my one domain doesn’t allow me to send to one of my webhosted email addresses, and says it can’t find the sender, I still don’t know. But I have got it to work on 4 other domains, so here are some tips:

  1. You can only install 1 time on a domain per week. Otherwise you reach the maximum certificate creations. And while rerunning the script when a certificate isn’t created correctly works, (misspelled the sub domain) you will get prompted to check the certificates when connecting. Better in my opinion to wait a week.
  2. Didn’t matter which data center, or if the VPS has a private IP with the public IP or not. Also didn’t matter what alternate email address used. (The email I had trouble sending to was my alternate email address.)
  3. Can not use special characters in the creation of the new /e/ account. (Well at least “!” refused to work. I didn’t try any other special characters.)
  4. when the script ends, you will have three more DNS entries to add:

DKIM record (TXT) mail._domainkey' IN TXT (This changes every time you recreate the server.) DMARC record (TXT) _dmarc’ IN TXT (This stays the same. who to email when problems.)
SPF record (TXT) @' IN TXT 'v=spf1 a ip4:xxx.xxx.xxx.xxx ~all' (This is the IP address for your server but you also have to put in the reverse DNS with your hosting provider for the mail.$Domain before you can even run the script…)

  1. Finally, until the script is fixed, You need to run:

cd /mnt/repo-base && docker-compose exec -u www-data nextcloud php occ config:system:set main_domain

to be able to log in on an /e/ OS phone or a Next Cloud Client. Thanks for @smu44 for is work around, and all the help in troubleshooting my problems in getting my self hosting site working.

1 Like

So glad it’s finally working! :smiley_cat:

About:

According to https://letsencrypt.org/docs/duplicate-certificate-limit/#description, It seems to me that it’s five times a sliding week.

It is displayed by https://gitlab.e.foundation/e/infra/ecloud-selfhosting/-/blob/master/scripts/postinstall.sh?ref_type=heads#L166.
For next release, I’ll ask this to be added to install guide, replacing the obsolete Rainloop part :wink:


Once proven working, you may activate SQL backups as described here: https://gitlab.e.foundation/e/infra/ecloud-selfhosting/-/blob/master/docs/SQL_backups.md.
:warning: just saw there is a typo in first line, files to be checked/modified are /mnt/repo-base/scripts/mariadb-nc-backup.sh and /mnt/repo-base/scripts/mariadb-pf-backup.sh (will also get that corrected for next release).
As a side note : this will only backup SQL databases to plain (compressed) files, for files backup you’ll have to rely on your hoster or a third-party solution (choose the backup time windows after the SQL backups).


I also wrote some words about securing your server with CrowdSec.

This topic was automatically closed after 90 days. New replies are no longer allowed.