1

Our new postfix server we set up just for our weekly newsletter seems very slow, it takes more than double the time our old server at 1&1 did.

The last days i tried to figure out whats wrong, following this guide as much as i could. http://www.postfix.org/TUNING_README.html

So, in my test group i send mails to 440 recipients all on our domain, just for testing purposes.

Our old 1&1 smtp takes about 7 - 10 Minutes, our own postfix needs between 20 and 30 minutes. Load in htop is always very low: CPU hovering about 2 - 5%, Mem is at 200MB/4GB. In iotop the highest Total DISK WRITE i saw was about 200kb/s.

As stated in the guide above i took a look in the qshape outputs while sending, but the queues were mostly empty all the time.

I hope there is anybody who can give us some tips where to find the problem, any help is appreciated.

Here is the output of iostat while sending:

Linux 4.4.27-x86_64-jb1 (j3XXXXXX.servers.xxxxxxxx.net)     02/22/2017  _x86_64_    (2 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.25    0.04    0.34    0.01    0.01   99.37

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
xvda              0.84         4.70        14.43     384062    1180244
xvdb              0.00         0.01         0.00        468          0

This is what the mail logs look like while sending to our test group:

Feb 22 09:22:24 j3XXXXXX postfix/smtpd[3333]: connect from superwebmailer[93.180.XXX.XXX]
Feb 22 09:22:26 j3XXXXXX postfix/smtpd[3333]: 2684A42D0B: client=superwebmailer[93.180.XXX.XXX], sasl_method=LOGIN, sasl_username=newsletter@mail.xxxxxxx.xxx
Feb 22 09:22:26 j3XXXXXX postfix/cleanup[3334]: 2684A42D0B: message-id=<1f55a889f0e8d2f278476d6bbf5d6c9e087348@mail.xxxxxxx.xxx>
Feb 22 09:22:26 j3XXXXXX postfix/qmgr[3174]: 2684A42D0B: from=<no-reply@mail.xxxxxxx.xxx>, size=124666, nrcpt=1 (queue active)
Feb 22 09:22:26 j3XXXXXX postfix/smtpd[3333]: disconnect from superwebmailer[93.180.XXX.XXX]
Feb 22 09:22:26 j3XXXXXX postfix/smtp[3327]: 2684A42D0B: to=<testp414@xxxxxxx.xxx>, relay=mx00.kundenserver.de[212.227.15.41]:25, delay=0.17, delays=0.01/0/0.03/0.13, dsn=2.0.0, status=sent (250 Requested mail action okay, completed: id=0M3qVy-1cPTIu0nOk-00rbOr)
Feb 22 09:22:26 j3XXXXXX postfix/qmgr[3174]: 2684A42D0B: removed
Feb 22 09:22:26 j3XXXXXX postfix/smtpd[3333]: connect from superwebmailer[93.180.XXX.XXX]
Feb 22 09:22:28 j3XXXXXX postfix/smtpd[3333]: 331F542D0B: client=superwebmailer[93.180.XXX.XXX], sasl_method=LOGIN, sasl_username=newsletter@mail.xxxxxxx.xxx
Feb 22 09:22:28 j3XXXXXX postfix/cleanup[3334]: 331F542D0B: message-id=<09ca3d8f35fa101d2de4e52b4eae9d8f087348@mail.xxxxxxx.xxx>
Feb 22 09:22:28 j3XXXXXX postfix/qmgr[3174]: 331F542D0B: from=<no-reply@mail.xxxxxxx.xxx>, size=124666, nrcpt=1 (queue active)
Feb 22 09:22:28 j3XXXXXX postfix/smtpd[3333]: disconnect from superwebmailer[93.180.XXX.XXX]
Feb 22 09:22:28 j3XXXXXX postfix/smtp[3326]: 331F542D0B: to=<testp413@xxxxxxx.xxx>, relay=mx00.kundenserver.de[212.227.15.41]:25, delay=0.19, delays=0.01/0/0.03/0.15, dsn=2.0.0, status=sent (250 Requested mail action okay, completed: id=0M5mJx-1cQrHx11WT-00xvuo)
Feb 22 09:22:28 j3XXXXXX postfix/qmgr[3174]: 331F542D0B: removed
Feb 22 09:22:28 j3XXXXXX postfix/smtpd[3333]: connect from superwebmailer[93.180.XXX.XXX]
Feb 22 09:22:30 j3XXXXXX postfix/smtpd[3333]: D390F42D0B: client=superwebmailer[93.180.XXX.XXX], sasl_method=LOGIN, sasl_username=newsletter@mail.xxxxxxx.xxx
Feb 22 09:22:30 j3XXXXXX postfix/cleanup[3334]: D390F42D0B: message-id=<bb65a0a088864323cae2b40471866b27087348@mail.xxxxxxx.xxx>
Feb 22 09:22:30 j3XXXXXX postfix/qmgr[3174]: D390F42D0B: from=<no-reply@mail.xxxxxxx.xxx>, size=124666, nrcpt=1 (queue active)
Feb 22 09:22:30 j3XXXXXX postfix/smtpd[3333]: disconnect from superwebmailer[93.180.XXX.XXX]
Feb 22 09:22:31 j3XXXXXX postfix/smtp[3327]: D390F42D0B: to=<testp412@xxxxxxx.xxx>, relay=mx00.kundenserver.de[212.227.15.41]:25, delay=0.21, delays=0.01/0/0.03/0.17, dsn=2.0.0, status=sent (250 Requested mail action okay, completed: id=0LsRC8-1cDwze3m9I-0122lz)
Feb 22 09:22:31 j3XXXXXX postfix/qmgr[3174]: D390F42D0B: removed
Feb 22 09:22:31 j3XXXXXX postfix/smtpd[3333]: connect from superwebmailer[93.180.XXX.XXX]
Feb 22 09:22:33 j3XXXXXX postfix/smtpd[3333]: 4077542D0B: client=superwebmailer[93.180.XXX.XXX], sasl_method=LOGIN, sasl_username=newsletter@mail.xxxxxxx.xxx
Feb 22 09:22:33 j3XXXXXX postfix/cleanup[3334]: 4077542D0B: message-id=<100adcae44f1c76509c0eba2e3bdb9b4087348@mail.xxxxxxx.xxx>
Feb 22 09:22:33 j3XXXXXX postfix/qmgr[3174]: 4077542D0B: from=<no-reply@mail.xxxxxxx.xxx>, size=124666, nrcpt=1 (queue active)
Feb 22 09:22:33 j3XXXXXX postfix/smtpd[3333]: disconnect from superwebmailer[93.180.XXX.XXX]
Feb 22 09:22:33 j3XXXXXX postfix/smtp[3326]: 4077542D0B: to=<testp440@xxxxxxx.xxx>, relay=mx00.kundenserver.de[212.227.15.41]:25, delay=0.16, delays=0.01/0/0.04/0.1, dsn=2.0.0, status=sent (250 Requested mail action okay, completed: id=0MGKrT-1cbHfq1Ivf-00FB48)
Feb 22 09:22:33 j3XXXXXX postfix/qmgr[3174]: 4077542D0B: removed

Sometimes postfix/anvil logs the following:

Feb 22 09:12:26 j3XXXXXX postfix/anvil[3178]: statistics: max connection rate 27/60s for (smtp:93.180.XXX.XXX) at Feb 22 09:09:05
Feb 22 09:12:26 j3XXXXXX postfix/anvil[3178]: statistics: max connection count 1 for (smtp:93.180.XXX.XXX) at Feb 22 09:02:27

This is our postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
default_destination_concurrency_limit = 40
default_process_limit = 700
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 100
inet_interfaces = all
inet_protocols = all
initial_destination_concurrency = 10
local_transport = virtual
mailbox_size_limit = 0
mydestination = localhost.mail.xxxxxxx.xxx, j3XXXXXX.servers.xxxxxxxx.net, localhost.servers.xxxxxxxx.net, localhost
myhostname = mail.xxxxxxx.xxx
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_nam
smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth_dovecot
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_tls_cert_file = /etc/postfix/ssl/mailserver.crt
smtpd_tls_key_file = /etc/postfix/ssl/mailserver.key
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_gid_maps = static:6000
virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual-domains-maps.cf
virtual_mailbox_limit = 0
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_minimum_uid = 104
virtual_transport = dovecot
virtual_uid_maps = static:6000
Libertas
  • 11
  • 2

0 Answers0