Discussion:
postfix delay problem for outgoing
(too old to reply)
maciejm
2017-02-03 15:00:35 UTC
Permalink
Hi
I have postfix 3.x and two servers:

1)for incomming
2)for outgoing

and have probem in queue active "delay time" in smtp for outgoing e-mails


Please check timing:

example:

-------------- log ---------------------------------------------------
Feb 3 13:29:11 smtp1 postfix/submission/smtpd[2517]: 877C28048E: client=domena.pl[86.x.x.x], sasl_method=LOGIN, sasl_username=***@testowe.domena.pl
Feb 3 13:29:11 smtp1 postfix/qmgr[1749]: 877C28048E: from=<***@testowe.domena.pl.pl>, size=391, nrcpt=1 (queue active)
Feb 3 13:29:12 smtp1 postfix/smtp[2892]: 877C28048E: to=<***@testowe.domena.pl.pl>, relay=mail.domena.pl.pl[86.x.x.x]:25, delay=1.1, delays=0.05/0/1/0.01, dsn=2.0.0, status=sent (250 ok 1486124952 qp 47954 by mail2.domena.pl)


----> delay=1.1 delays=0.05/0/1/0.01



Feb 3 13:29:20 smtp1 postfix/submission/smtpd[3304]: A558E8049C: client=domena.pl[86.x.x.x], sasl_method=LOGIN, sasl_username=***@testowe.domena.pl
Feb 3 13:29:20 smtp1 postfix/qmgr[1749]: A558E8049C: from=<***@testowe.domena.pl>, size=391, nrcpt=1 (queue active)
Feb 3 13:29:50 smtp1 postfix/smtp[1998]: A558E8049C: to=<***@testowe.domena.pl>, relay=mail.domena.pl[86.x.x.x]:25, delay=30, delays=0.05/0/30/0.01, dsn=2.0.0, status=sent (250 ok 1486124990 qp 8747 by mail2.domena.pl)


and this time ------> delay=30 delays=0.05/0/30/0.01

dalays 30 ?



I test connection setup including DNS, HELO and TLS

I check:
DNS - by dig
Helo
TLS
mysql - by postmap
ldap - by postmap

every timing is ok



main.cnf:

smtpd_end_of_data_restrictions = permit_mynetworks, lpolicyd

smtpd_sender_login_maps = ldap:/etc/postfix/sender_login_maps.cf


sender_dependent_default_transport_maps =
memcache:/etc/postfix/memcache_sender_cache.cf, # <--- virtual ip
memcache:/etc/postfix/memcache_sender_default_cache.cf # <---- shared ip

sender_bcc_maps = ldap:/etc/postfix/sender_bcc_maps_user.cf # <------ bcc maps


for test i turn off lpolicyd


postmap test working fast


mailq ~ 200 messages

load average: 0,19, 0,21, 0,29

qshape active:
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 51 51 0 0 0 0 0 0 0 0 0

qshape deferred:
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 415 52 32 47 45 178 13 16 10 11 11
yahoo.com 228 18 17 30 31 132 0 0 0 0 0


Any idea ? why sometime is ~30 and some second ago near 1s ?



main.cf:

default_process_limit = 400
maximal_queue_lifetime = 24h
bounce_queue_lifetime = 1h
smtpd_client_connection_count_limit = 500
smtpd_hard_error_limit = 5
smtpd_soft_error_limit = 2
smtpd_recipient_limit = 150
default_destination_recipient_limit = 150

broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes

smtpd_client_restrictions =
check_client_access cidr:/etc/postfix/client_checks.cidr, #ip class spamers
reject_unauth_pipelining,
permit

smtpd_sender_restrictions =
permit_mynetworks,
reject_unknown_sender_domain,
reject_non_fqdn_sender,
reject_unknown_address,
reject_sender_login_mismatch,
check_sender_access pcre:/etc/postfix/sender_checks.pcre,
reject_unauth_pipelining,
permit

smtpd_recipient_restrictions =
permit_mynetworks,
reject_unauth_pipelining,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
permit_sasl_authenticated,
reject_unauth_destination,
permit


Best regards
maciejm
2017-02-03 15:49:08 UTC
Permalink
Post by maciejm
Hi
1)for incomming
2)for outgoing
and have probem in queue active "delay time" in smtp for outgoing e-mails
-------------- log ---------------------------------------------------
----> delay=1.1 delays=0.05/0/1/0.01
and this time ------> delay=30 delays=0.05/0/30/0.01
dalays 30 ?
I test connection setup including DNS, HELO and TLS
DNS - by dig
Helo
TLS
mysql - by postmap
ldap - by postmap
every timing is ok
smtpd_end_of_data_restrictions = permit_mynetworks, lpolicyd
smtpd_sender_login_maps = ldap:/etc/postfix/sender_login_maps.cf
sender_dependent_default_transport_maps =
memcache:/etc/postfix/memcache_sender_cache.cf, # <--- virtual ip
memcache:/etc/postfix/memcache_sender_default_cache.cf # <---- shared ip
sender_bcc_maps = ldap:/etc/postfix/sender_bcc_maps_user.cf # <------ bcc maps
for test i turn off lpolicyd
postmap test working fast
mailq ~ 200 messages
load average: 0,19, 0,21, 0,29
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 51 51 0 0 0 0 0 0 0 0 0
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 415 52 32 47 45 178 13 16 10 11 11
yahoo.com 228 18 17 30 31 132 0 0 0 0 0
Any idea ? why sometime is ~30 and some second ago near 1s ?
default_process_limit = 400
maximal_queue_lifetime = 24h
bounce_queue_lifetime = 1h
smtpd_client_connection_count_limit = 500
smtpd_hard_error_limit = 5
smtpd_soft_error_limit = 2
smtpd_recipient_limit = 150
default_destination_recipient_limit = 150
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_client_restrictions =
check_client_access cidr:/etc/postfix/client_checks.cidr, #ip class spamers
reject_unauth_pipelining,
permit
smtpd_sender_restrictions =
permit_mynetworks,
reject_unknown_sender_domain,
reject_non_fqdn_sender,
reject_unknown_address,
reject_sender_login_mismatch,
check_sender_access pcre:/etc/postfix/sender_checks.pcre,
reject_unauth_pipelining,
permit
smtpd_recipient_restrictions =
permit_mynetworks,
reject_unauth_pipelining,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
permit_sasl_authenticated,
reject_unauth_destination,
permit
Best regards
Reslove problem:

enable_long_queue_ids=yes

Loading...