Score:0

Postfix relay denied

ve flag

I have installed Cyberpanel with postfix installed I am facing Relay Denied error while sending out the emails i.e.gmail.com or any other external

I have tried googling and read many posts but not able to get is work

The main.cf is as under

myhostname = vmi1029709.contaboserver.net
mynetworks = 127.0.0.0/8
#ynetworks = 0.0.0.0/0, 127.0.0.0/8
message_size_limit = 30720000
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

the error log shows

Oct  7 12:33:31 vmi1029709 postfix/smtpd[259061]: connect from unknown[182.191.133.112]
Oct  7 12:33:32 vmi1029709 postfix/smtpd[259061]: NOQUEUE: reject: RCPT from unknown[182.191.133.112]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<RizwanPC>
Oct  7 12:33:35 vmi1029709 postfix/smtpd[259061]: disconnect from unknown[182.191.133.112] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4

Any suggestions Rizwan


Well I am using outlook as mail client and using smtp authentication while sending mails

If I send mail to the another domain hosted on this server. It goes fine But if I send mail to external domain i.e. gmail.com etc. its relay is denied. whereas I connect with same IP both times

Score:1
ar flag

The connection is coming from outside mynetworks and doesn't appear to be authenticated, and gmail.com should not be a permitted destination for relaying.

In short, everything is configured correctly. You do not want to be an open relay.

Deliveries originating from localhost should work given your configuration. External connections should be authenticated using SASL to allow relaying. Based on the log entry you show, your client doesn't attempt authentication.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.