Mail Server on CentOS - Relay access denied
10,979
Follow this tutorial - It is very good and it helped me getting rid of the relay access error.
I am now able to send mail to any address:
http://centoshelp.org/servers/mail/postfix-mail-server-on-centos/
Related videos on Youtube
![DextrousDave](https://i.stack.imgur.com/VG1xR.jpg?s=256&g=1)
Author by
DextrousDave
Intermediate Web and Graphic Designer. HTML·CSS·jQuery·Wordpress
Updated on September 18, 2022Comments
-
DextrousDave almost 2 years
I have setup Postfix and Dovecot on my CentOS Server.
Now I am using unsecure SMTP and POP/IMAP (ports 25 and 110/143). I can send mail locally to and from myself, but when I want to send email TO my gmail account, eg. [email protected], it responds:
Relay access denied
I tried the following, but it still gives me an access deny issue. Made the following changes to
/etc/postfix/main.cf
:smtpd_sasl_local_domain = smtpd_sasl_auth_enable = yes smtpd_sasl_type = cyrus smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_sasl_authenticated_header = yes smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
-
user almost 11 yearsIs that main.cf snippet literal as shown? Because if so, you are setting
smtpd_recipient_restrictions
empty (not sure how Postfix feels about that) and then have a syntax error on the next line. Look at and possibly post the output ofpostconf -d | grep -E 'smtpd_[^_]+_restrictions'
. -
Prabu Raja almost 11 yearsYou have to authenticate with user and password to send emails outside your domain. Or you could have your computer ip included in mynetworks in main.cf but this would be very unsecure.
-
-
Jeff Schaller over 2 yearsWould you please incorporate the relevant commands so that this Answer is self-contained, in case the link ever rots? I realize this answer is nearly 10 years old, but it's been flagged as "not an answer" because it's essentially link-only. Thank you!