Postfix Relay access denied (can't send or recieve mails)

3 posts / 0 new
Last post
#1 Fri, 07/24/2015 - 06:41
bernd_k

Postfix Relay access denied (can't send or recieve mails)

Hello There,

I have two domains in Virtualmin registered but unfortunately i can not send or receive mails .

Here are my settings :

[root@v12326 postfix]# postconf -n

alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases

broken_sasl_auth_clients = yes

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

debug_peer_level = 2

html_directory = no

inet_interfaces = all

inet_protocols = ipv4

mailbox_command = /usr/bin/procmail -a "$EXTENSION"

mailq_path = /usr/bin/mailq.postfix

manpage_directory = /usr/share/man

newaliases_path = /usr/bin/newaliases.postfix

readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES

sample_directory = /usr/share/doc/postfix-2.6.6/samples

sendmail_path = /usr/sbin/sendmail.postfix

setgid_group = postdrop

smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination permit_sasl_authenticated check_policy_service unix:/var/spool/postfix/postgrey/socket

smtpd_sasl_auth_enable = yes

smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem

smtpd_tls_key_file = /etc/postfix/postfix.key.pem

smtpd_tls_mandatory_ciphers = high

smtpd_tls_security_level = may

smtpd_use_tls = yes

unknown_local_recipient_reject_code = 550

virtual_alias_maps = hash:/etc/postfix/virtual

[root@v12326 postfix]# hostname v12326.php-friends.de

[root@v12326 postfix]# hostname -f v12326.php-friends.de

[root@v12326 postfix]# cat virtual (i have replaced my domains with example1 and 2) example1@example1.de example1 postmaster@example1.de example1@example1.de hostmaster@example1.de example1@example1.de abuse@example1.de example1@example1.de webmaster@example1.de example1@example1.de tet@example1.de example1@example1.de example1.de example1.de example2@example2.de example2 example2.de example2.de hostmaster@example2.de example2@example2.de webmaster@example2.de example2@example2.de postmaster@example2.de example2@example2.de abuse@example2.de example2@example2.de anni@example2.de example2@example2.de

Maillog: Jul 24 13:26:56 v12326 postfix/smtpd[11913]: NOQUEUE: reject: RCPT from external.ip[1.1.1.1]: 554 5.7.1 mymailname@gmx.com: Relay access denied; from=example1@example1.de to=mymailname@gmx.com proto=ESMTP helo=<[2.2.2.2]>

I do not know what I can do.

Thank you for your help.

Bernd K.

Fri, 07/24/2015 - 10:15
andreychek

Howdy,

The email log entry you're showing there -- what email address was that email destined to?

Also, in Edit Virtual Server, is the Mail for Domain feature enabled for all the domains who should be able to receive email?

-Eric

Fri, 07/24/2015 - 11:32
bernd_k

Hi Eric, thank you for your answer.

The mail was sent to gmx.de and yes the feature "Mail for Domain" is enabled.

I have Virtualmin reinstalled because I have probably changed too much in the config files . Now I have the source files which now serve as a basis .

I want to actually manage only 3 domains and which of course this includes mails send and receive via SSL . ( or TLS better ? )

I have created a self-signed SSL certificate and copies with Virtualmin to postfix and dovecot .

To receive mails works now without problems with Thunderbird with the settings SSL / TLS port 993 authentication method Password normal.

When i try to send with Thunderbird from my virtual domain to my gmx account then that happend in the Log;

Jul 24 18:05:35 v12326 postfix/smtpd[31404]: connect from aftr-33-33-33-33.unity-media.net[33.33.33.33]
Jul 24 18:05:35 v12326 postfix/smtpd[31404]: NOQUEUE: reject: RCPT from aftr-33-33-33-33.unity-media.net[33.33.33.33]: 554 5.7.1 <bernd_k@gmx.de>: Relay access denied; from=<teddythebear@teddythebear.de> to=<bernd_k@gmx.de> proto=ESMTP helo=<[127.0.0.1]>
Jul 24 18:06:18 v12326 postfix/smtpd[31404]: disconnect from aftr-33-33-33-33.unity-media.net[33.33.33.33]

What do i have to change in virtualmin that i can send and recieve Mails SSL encrypted with thunderbird?

Here my current configs:

[root@v12326 postfix]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination check_policy_service unix:/var/spool/postfix/postgrey/socket permit_sasl_authenticated
smtpd_sasl_auth_enable = yes
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_tls_mandatory_ciphers = high
smtpd_tls_security_level = may
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
 
[root@v12326 postfix]# dovecot -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-504.30.3.el6.x86_64 x86_64 CentOS release 6.6 (Final)
auth_mechanisms = plain login
disable_plaintext_auth = no
mail_location = maildir:~/Maildir
mbox_write_locks = fcntl
passdb {
  driver = pam
}
protocols = imap pop3
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_cipher_list = ECDHE-RSA-AES256-SHA384:AES256-SHA256:AES256-SHA256:RC4:HIGH:MEDIUM:+TLSv1:+TLSv1.1:+TLSv1.2:!MD5:!ADH:!aNULL:!eNULL:!NULL:!DH:!ADH:!EDH:!AESGCM
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  driver = passwd
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}

Thank you for your time and support.

Many Greetings Bernd

PS: Sorry for my bad englisch ;)

Topic locked