mouss wrote:
LÉVAI Dániel wrote:
Hi!
I'm using postfix-2.5.4.
I have this in my main.cf:
smtpd_client_restrictions = check_client_access
hash:/etc/postfix/client_access, permit_sasl_authenticated,
reject_unknown_client_hostname
It seems that the reject_unknown_client_hostname is applied always
before the other rules, and I can not rely on the
permit_sasl_authenticated rule to allow my connection always. Is this
because of my
"smtpd_delay_reject = no" setting, or is there something else?
there is something else!
- make sure reject_unknown_client_hostname is really called. Logs are
needed.
- check whether it is not caused by client_access
The client_access is empty for now.
- check other restrictions.
I only get the hostname not found errors, and when I comment out that
restriction, then I can connect (and authenticate).
post the output of 'postconf -n' and relevant logs (showing the rejection).
postfix/smtpd[23810]: warning: 78.131.56.68: hostname
78-131-56-68.static.hdsnet.hu verification failed: no address associated
with name
postfix/smtpd[23810]: connect from unknown[78.131.56.68]
postfix/smtpd[23810]: NOQUEUE: reject: CONNECT from
unknown[78.131.56.68]: 450
4.7.1 Client host rejected: cannot find your hostname, [78.131.56.68];
proto=SMTP
postfix/smtpd[23810]: disconnect from unknown[78.131.56.68]
postfix/smtpd[23810]: warning: 78.131.56.68: hostname
78-131-56-68.static.hdsnet.hu verification failed: no address associated
with name
postfix/smtpd[23810]: connect from unknown[78.131.56.68]
postfix/smtpd[23810]: NOQUEUE: reject: CONNECT from
unknown[78.131.56.68]: 450
4.7.1 Client host rejected: cannot find your hostname, [78.131.56.68];
proto=SMTP
postfix/smtpd[23810]: disconnect from unknown[78.131.56.68]
postconf -n:
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
biff = no
bounce_template_file = /etc/postfix/bounce.cf
command_directory = /usr/local/sbin
config_directory = /etc/postfix
daemon_directory = /usr/local/libexec/postfix
debug_peer_level = 2
debug_peer_list =
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks
html_directory = /usr/local/share/doc/postfix/html
inet_protocols = ipv4
mail_owner = _postfix
mailbox_size_limit = 0
mailq_path = /usr/local/sbin/mailq
manpage_directory = /usr/local/man
message_size_limit = 20971520
mynetworks_style = host
newaliases_path = /usr/local/sbin/newaliases
notify_classes = protocol, resource, software
queue_directory = /var/spool/postfix
readme_directory = /usr/local/share/doc/postfix/readme
recipient_delimiter = +
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = _postdrop
smtp_tls_security_level = may
smtp_tls_session_cache_database =
btree:${data_directory}/smtp_tls_scache
smtpd_client_restrictions = check_client_access
hash:/etc/postfix/client_access,
permit_sasl_authenticated, reject_unknown_client_hostname
smtpd_delay_reject = yes
smtpd_error_sleep_time = 2s
smtpd_hard_error_limit = 3
smtpd_helo_required = yes
smtpd_helo_restrictions = check_helo_access hash:/etc/postfix/helo_access,
permit_sasl_authenticated, reject_invalid_helo_hostname,
reject_unknown_helo_hostname, reject_non_fqdn_helo_hostname
smtpd_recipient_restrictions = check_recipient_access
hash:/etc/postfix/spam-filter_leva,
permit_mynetworks, permit_auth_destination, permit_sasl_authenticated,
reject
smtpd_sender_restrictions = check_sender_access
hash:/etc/postfix/sender_access,
permit_sasl_authenticated, reject_unknown_sender_domain,
reject_non_fqdn_sender
smtpd_soft_error_limit = 2
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/postfix_cert.pem
smtpd_tls_key_file = /etc/ssl/private/postfix_key.pem
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_tls_scache
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_gid_maps = hash:/etc/postfix/virtual_users_gid
virtual_mailbox_base = /var/mail/virtual
virtual_mailbox_domains = hash:/etc/postfix/virtual_domains
virtual_mailbox_limit = 0
virtual_mailbox_maps = hash:/etc/postfix/virtual_users
virtual_minimum_uid = 8001
virtual_transport = dovecot-lda
virtual_uid_maps = hash:/etc/postfix/virtual_users_uid
Thanks!
--
LEVAI Daniel
PGP key ID = 0x4AC0A4B1
Key fingerprint = D037 03B9 C12D D338 4412 2D83 1373 917A 4AC0 A4B1