I have a domain on namecheap that hosts my web app, lets say www.ultrawebapp.com
I want a subdomain that will be used by for MIAB, lets say mail.ultrawebapp.com
I have created the ‘glue records’ in namecheap. I have installed the MIAB software on my digital ocean droplet.
DNS records:
ns1.mail 123.456.78.90
ns2.mail 123.456.78.90
The problem is when i visit mail.ultrawebapp.com/admin, it does not show me the MIAB interface. But when visiting the droplets ip address, i see the MIAB interface.
Using both Cloudflare’s and your own nameserver concurrently doesn’t really work unless you manually synchronize them. Cloudflare probably doesn’t know about the mail subdomain. You should use either (preferably) MIAB for all DNS services for the domain or Cloudflare as external DNS configured in MIAB.
You can run dig @123.456.78.90 mail.ultrawebapp.com A on an external machine to see what’s going on. It should resolve the address to the desired ip and show the nameservers in the other sections.
Hey thanks a bunch.
I rather cloudflare as external dns because of the current architecture of my apps.
Does this mean I have to go to cloudflare and add the subdomain and ip of the droplet?
If there is another option too please show me how to go about it.
EDIT: this is the output of the dig command:
~$ dig @123.456.78.90 mail.ultrawebapp.com A
; <<>> DiG 9.18.28-0ubuntu0.22.04.1-Ubuntu <<>> @123.456.78.90 mail.ultrawebapp.com A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57372
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;mail.ultrawebapp.com. IN A
;; ANSWER SECTION:
mail.ultrawebapp.com. 86400 IN A 123.456.78.90
;; AUTHORITY SECTION:
ultrawebapp.com. 86400 IN NS ns1.mail.ultrawebapp.com.
ultrawebapp.com. 86400 IN NS ns2.mail.ultrawebapp.com.
;; ADDITIONAL SECTION:
ns1.mail.ultrawebapp.com. 86400 IN A 123.456.78.90
ns2.mail.ultrawebapp.com. 86400 IN A 123.456.78.90
;; Query time: 259 msec
;; SERVER: 123.456.78.90#53(123.456.78.90) (UDP)
;; WHEN: Mon Oct 21 21:22:57 WAT 2024
;; MSG SIZE rcvd: 127
You have to go to MIAB admin page and >> Use External DNS and replicate all the DNS entries listed there, in your Cloudflare. It is painful but once it is setup it should be OK.
The output looks right, assuming the ip there is the same as your miab instance’s public ip. It is possible that if it (randomly) selects a different nameserver it’ll yield no or a different ip instead.
Hello everyone. I currently have the following challenge on my box instance on digital ocean.
I cannot send emails. when i do try to send mails to someone, i get an error.
i also noticed in the status check this message:
Outbound mail (SMTP port 25) seems to be blocked by your network. You will not be able to send any mail. Many residential networks block port 25 to prevent hijacked machines from being able to send spam. A quick connection test to Google’s mail server on port 25 failed.
How do i fix this problem i.e inability to send mail. Thank you
Digital Ocean blocks Outbound port 25 on any new instances. You might try support and ask them to open it and give a statement that you will not send unsolicited mail.
@alento has suggested a number of them and there are people here with affiliate codes that might recommend you ISPs depending on location. I am using a German based one now they have a partner in Virginia USA if you don’t want to be based in Europe. Netcup.de
Yeah you can use sendgrid or mailgun or mailjet. You need to edit /etc/postfix/main.cf and setup a relay. This is well documented. Just google setup postfix relay server. Or search this forum Setup MIAB as relay.
Hit ctr+x and save the file
Then make file sudo nano /etc/postfix/sasl_passwd [smtp.sendgrid.net]:587 your_username:your_password
See credentials in your Sendgrid admin panel.
In MIAB admin panel Custom DNS>> insert TXT record for SPF records as permited senders for Sendgrid, read the instructions on sendgrid how to do it but it should be a TXT record something like this: v=spf1 include:sendgrid.net -all .
Of course replace the examples above with the sendgrid credentials.
You are now good to send via the relay. MIAB will still show errors for outbound port 25 but you just ignore that.
Exvuse any spelling mistakes in the commands use tab for the correct paths.
EDIT: Also inspect main.cf for any duplicates as they may mess postfix. put a hashtag # infront of any disabled lines