Am 2018-03-09 13:13, schrieb Wietse Venema:
delay=0.51, delays=0.21/0/0.17/0.13
Just to be sure, these numbers include receiving and delivering mail.
0.21 time from message arrival to last active queue entry
0 time from last active queue entry to connection setup
0.17 time in connection setup, including DNS, EHLO and STARTTLS
0.13 time in message transmission
The first number shows that it takes 0.2s to put mail into the
queue. Does your host run a LOCAL caching DNS server? If not, that
could explain sluggish performance for receiving and sending mail.
When receiving SMTP mail, Postfix looks up IPaddress->name and
name->IPaddress which can result in two DNS queries per inbound
connection.
I run a local instance of unbound for dns caching
The other numbers show that the total delays are dominated by
deliveries. Which Postfix delivery agent that was producing these
numbers? I suppose that was the SMTP client? If it is a local
delivery agent, then WHAT IS WRONG WITH YOUR FILE SYSTEM?
It was the SMTP Client.
> I suspect that your mail sending program is too slow. You can test
> Postfix raw speed with smtp-source test program, part of the Postfix
> source bundle.
time smtp-source -4 -m 20 -S Test -l 500 -t u...@xxx.yy 127.0.0.1
real 0m4.097s
user 0m0.007s
sys 0m0.017s
So one thread delivers 5 mail/sec to postfix. Multiple threads scale
well, but single thread performance seems really low.
It is consistent with the 0.21s above. Your measurement agrees with
Postfix's delays reporting.
Below is postconf -n output:
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
debug_peer_level = 1
default_process_limit = 150
delay_warning_time = 0
disable_vrfy_command = yes
html_directory = no
in_flow_delay = 0
inet_interfaces = 127.0.0.1
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 20971520
milter_default_action = accept
milter_protocol = 6
mydestination = localhost.$mydomain, localhost
mydomain = xxx.yy
myhostname = zz.xxx.yy
mynetworks = $config_directory/mynetworks
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = $smtpd_milters
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
recipient_delimiter = -
relay_domains = xxx.yy
relay_recipient_maps =
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_connect_timeout = 15
smtp_helo_timeout = 60
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database =
btree:$data_directory/smtp_tls_session_cache
smtp_use_tls = yes
smtpd_client_restrictions =
smtpd_data_restrictions =
smtpd_helo_required = yes
smtpd_helo_restrictions =
smtpd_milters = inet:127.0.0.1:8891
smtpd_recipient_restrictions = permit_mynetworks,
reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions =
smtpd_tls_cert_file = /etc/pki/tls/certs/zz.xxx.yy.crt
smtpd_tls_key_file = /etc/pki/tls/private/zz.xxx.yy.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport,
regexp:/etc/postfix/transport.regexp
unknown_local_recipient_reject_code = 550
virtual_gid_maps = static:12
virtual_mailbox_base = /home/vmail
virtual_minimum_uid = 101
virtual_transport = dovecot
virtual_uid_maps = static:101