'Relay access denied'. Can't send or receive mail


I’m trying to setup email on my wordpress server (-wpredis). So far I’m able to open Roundcube, but thats it.

I followed the instructions I found here: http://docs.rtcamp.com/easyengine/commands/stack/#InstallUtilities (ee stack install --mail). I edited the file in vim:

These are my DNS settings:

I can access Roundcube via http://webmail.hetbeursplein.com/. And I can access ViMbAdmin via https://hetbeursplein.com:22222/vimbadmin, but not via https://www.hetbeursplein.com/vimbadmin/.

I have only set up one mailbox in ViMbAdmin:

When I try to mail to that adres, I get this error:

I don’t know what I should do. But I do know the reverse DNS does not resolve:

Thanks in advance

1 Like

Still trying, still no luck. I now followed this tutorial: https://rtcamp.com/tutorials/mail/server/postfix-dovecot-ubuntu/, which, as far as I can see, was the tutorial before you automated the process with ee stack install --mail. Most files were already set up like in the tutorial, some weren’t. Still, it didn’t fix my problem. The ip address used in de config files is the local host. Is that ok? Should I edit it to the ip address of the mail server?

Side question, why does EasyEngine still install Postfix 2.9.6? There appear to be a few newer stable releases.

I hope someone can help me out or point me in the right direction, because I can’t seem to figure it out on my own :slight_smile:

Hello @Francis_Verhoeven

It seems like your Email Port are not open . Please refer below documentation to open following port from your IP Tables or firewall.

Port List: https://rtcamp.com/tutorials/mail/server/port-numbers/

Also Check if are you able to connect to mail server

And about your query on Postfix

It is installed from ubuntu repositories, seems like ubuntu repositories does not have latest version .

Thanks for your answer.
I checked the ports (they are all listening):

IMAP test:
openssl (It lists the email address I used when I set up the web server using easy engine, should I change this?):
Loggin in, 5th command doesn’t seem to work:

POP test (pretty much the same as IMAP):

SMTP test:
Wether I run
telnet example.com 25 or
openssl s_client -starttls smtp -connect example.com:465,
nothing happens. When I run
openssl s_client -starttls smtp -connect example.com:465,
or the same command on port 587 , I get
connect: Connection refused connect:errno=61

Hello @Francis_Verhoeven

But from here i could see the port 25 is blocked . Could u please check your firewall configuration with iptables .

I just have a standard --wpredis installation. No firewall set up.

I have opened port 25 using the following command: (not ideal, since it will disappear on reboot, correct?)

iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT

Getting this output now:

And afterwards, I did the same with ports 465 and 587.
Iptables output:

My wordpress with redis on digitalocean has the following error in mail.log

Dec 10 14:43:49 easyengine-WP postfix/smtp[4713]: 41FCB7F307: to=you@example.com, relay=none, delay=11133, delays=11103/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[2606:2800:220:1:248:1893:25c8:1946]:25: Network is unreachable)

Is this a firewall or a postfix configuration problem ? :confounded:

I have the same problem. I simply installed mail package by using ee stack install --mail then created a domain in ViMbAdmin and afterward, created a user with ashkan@example.com. I’m now able to send emails through roundcube (ashkan@example.com) to my gmail account, but in reverse, it shows 554 Relay access denied error. mail.log error is as following: Mar 3 16:40:33 www postfix/smtpd[2930]: NOQUEUE: reject: RCPT from mail-wr0-f176.google.com[]: 554 5.7.1 <ashkan@example.com>: Relay access denied; from=<example@gmail.com> to=<ashkan@example.com> proto=ESMTP helo=<mail-wr0-f176.google.com>

I’ve googled a lot and got confused how should i fix it. I’d appreciate if you could help me.