NTTCom-MS / eyp-postfix

postfix management - relay or multidomain mailserver
Apache License 2.0
0 stars 10 forks source link

Recipient address rejected: Access denied #76

Open hertell opened 4 years ago

hertell commented 4 years ago

I get just "Recipient address rejected: Access denied" errors with the example-setup. I'm pretty sure I missing something, but i can't figure it out :-(

class { 'postfix':
  mynetworks           =>  [ '127.0.0.1/32',"${ipaddress_eth0}/32" ],
  ipv6                 => false,
  inetinterfaces       => 'all',
  mydestination        => [ 'mysub.example.com', $::fqdn, 'localhost' ],
  myhostname           => 'mysub.example.com',
  smtpdbanner          => 'mysub.example.com ESMTP',
}
class { 'postfix::vmail': }
postfix::vmail::alias { 'virtual_user1@mysub.example.com':
  aliasto              => [ 'virtual_user1@mysub.example.com' ],
}
postfix::vmail::account { 'virtual_user1@mysub.example.com':
  accountname => 'virtual_user1',
  domain      => 'mysub.example.com',
  password    => 'secretpassw0rd',
}

I get this error


Dec  2 04:00:44 srv6 private/smtpd[4933]: NOQUEUE: reject: RCPT from mail-lj1-f176.google.com[209.85.208.176]: 554 5.7.1 <virtual_user1@mysub.example.com>: Recipient address rejected: Access denied; from=<someone@somewhere.com> to=<virtual_user1@mysub.example.com> proto=ESMTP helo=<mail-lj1-f176.google.com>```
hertell commented 4 years ago

I got it fixed with this (had to remove the last 'reject'):

  class { 'postfix::vmail':
    smtpd_recipient_restrictions => ['permit_inet_interfaces,permit_mynetworks,reject_authenticated_sender_login_mismatch,permit_sasl_authenticated,reject_unauth_destination'],
    smtpd_relay_restrictions     => ['permit_inet_interfaces,permit_mynetworks,reject_authenticated_sender_login_mismatch,permit_sasl_authenticated,reject_unauth_destination'],
  }
jordiprats commented 4 years ago

Hi, What distro are you using?

thanks,

hertell commented 4 years ago

Embarrassing that I forgot the most important detail.. Sorry!

I'm running Centos 7