I've started playing around with a domain I bought, and right now I want to add a mail server to it. After googling around, Citadel seemed like the easiest to start with.
I've got a small Ubuntu (22.04.1 LTS) server on my home network behind a router which I used to install Citadel as a docker container, and used their exact command line for starting it (other than changing the location of the files, which I'm guessing shouldn't really affect anything). I've also added the MX DNS record that points to my server, and after opening port 25 in my router, I can now receive mail without any issues. I cannot, however, send any mails...
I've tried both through Citadels web interface and through my mail client (Outlook for now). The mails get added to the outbound SMTP queue, and vanish a minute or two later (which, as I've understood it, is how it's supposed to look). The mail never gets delivered though, and a few hours later I get a mail from Citadel which says:
A message you sent has not been delivered to some or all of its recipients.
Citadel will continue attempting delivery for five days.
The following addresses were undeliverable:
[email protected]: 421()
(and no, I'm not trying to send it to the actual address "[email protected]", names have been changed to protect the innocent). A few days later I get a similar "I'm giving up" mail from Citadel.
I've tried googling, but any helpful responses are lost in the sea of results relating to configuring servers in your mail client.
I've also added an SPF ("v=spf1 mx all", I changed "-all" to "all" to make sure it wasn't blocking anything) and a DMARC ("v=DMARC1;p=none;rua=mailto:[email protected];ruf=mailto:[email protected]") record in my DNS as recommended by a tool I found (MXToolBox), but adding those records changed nothing. I also don't get any of the error messages I was hoping to get by setting the return addresses in the DMARC record.
Have I missed anything obvious? Do I need to open any ports for sending mails the way I opened port 25 for incoming? I figured getting the mails to me would be the challenging part, but instead I run into a wall on something as "simple" as sending mails...
Also, if anyone knows where Citadel keeps the log files I'd appreciate it. I'm hoping there's something helpful in there, but I just haven't been able to find any files to go through.