1

Topic: terminating connections to postfix

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:  debian 9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): msyql
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro? no - i thinking about it
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi
For test i use extrenal amavis (via haproxy)

All works fine but sometimes i have a problem with amavis and terminated connections to postfix
this happen when I get "mailling with ~80 cc:"


Probably postfix while amavis is processing the message, therefore it is no surprise that amavis cannot send the  response to the BEFORE-QUEUE SMTP client.

what paramter i must change in postfix ?

smtpd_proxy_timeout ?

Log from amavis:
Sep 24 13:49:14 amavis-ng3 amavis[22641]: (22641-01) TIMING-SA total 3641 ms - parse: 12 (0.3%), extract_message_metadata: 60 (1.6%), get_uri_detail_list: 8 (0.2%), tests_pri_-1000: 49 (1.4%), tests_pri_-950: 1.71 (0.0%), tests_pri_-900: 69 (1.9%), tests_pri_-90: 45 (1.2%), check_bayes: 43 (1.2%), b_tokenize: 25 (0.7%), b_tok_get_all: 6 (0.2%), b_comp_prob: 7 (0.2%), b_tok_touch_all: 2.3 (0.1%), b_finish: 0.24 (0.0%), tests_pri_0: 511 (14.0%), check_dkim_adsp: 5 (0.1%), check_pyzor2: 112 (3.1%), tests_pri_10: 17 (0.5%), check_dcc: 14 (0.4%), tests_pri_20: 2336 (64.2%), check_razor2: 2333 (64.1%), tests_pri_500: 3.0 (0.1%), tests_pri_1000: 492 (13.5%), total_awl: 490 (13.5%), check_awl: 0.63 (0.0%), update_awl: 488 (13.4%), get_report: 0.60 (0.0%)
Sep 24 13:49:14 amavis-ng3 amavis[22641]: (22641-01) (!!)TROUBLE in process_request: Error writing an SMTP response to the socket: Broken pipe at (eval 95) line 1345, <GEN22> line 26.
Sep 24 13:49:14 amavis-ng3 amavis[22641]: (22641-01) (!)Requesting process rundown after fatal error
Sep 24 13:49:14 amavis-ng3 amavis[22641]: (22641-01) SMTP shutdown: Error writing an SMTP response to the socket:  at (eval 95) line 1345, <GEN22> line 26.\n
Sep 24 13:49:14 amavis-ng3 amavis[22641]: (22641-01) (!)TempDir removal: tempdir is to be PRESERVED: /var/amavis/tmp/amavis-20190924T134640-22641-UoJPr1RK




smtp_connect_timeout = 30s
smtp_connection_cache_time_limit = 2s
smtp_connection_reuse_time_limit = 300s
smtp_data_done_timeout = 600s
smtp_data_init_timeout = 120s
smtp_data_xfer_timeout = 180s
smtp_helo_timeout = 300s
smtp_mail_timeout = 300s
smtp_pix_workaround_delay_time = 10s
smtp_pix_workaround_threshold_time = 500s
smtp_quit_timeout = 300s
smtp_rcpt_timeout = 300s
smtp_rset_timeout = 20s
smtp_sasl_auth_cache_time = 90d
smtp_starttls_timeout = 300s
smtp_tls_session_cache_timeout = 3600s
smtp_xforward_timeout = 300s
smtpd_error_sleep_time = 1s
smtpd_policy_service_timeout = 100s
smtpd_proxy_timeout = 300s
smtpd_starttls_timeout = ${stress?{10}:{300}}s
smtpd_timeout = ${stress?{10}:{300}}s
smtpd_tls_session_cache_timeout = 600s
smtpd_upstream_proxy_timeout = 5s


lmtp:
bsmtp_time_limit = $command_time_limit
smtp_connect_timeout = 30s
smtp_connection_cache_time_limit = 2s
smtp_connection_reuse_time_limit = 300s
smtp_data_done_timeout = 600s
smtp_data_init_timeout = 120s
smtp_data_xfer_timeout = 180s
smtp_helo_timeout = 300s
smtp_mail_timeout = 300s
smtp_pix_workaround_delay_time = 10s
smtp_pix_workaround_threshold_time = 500s
smtp_quit_timeout = 300s
smtp_rcpt_timeout = 300s
smtp_rset_timeout = 20s
smtp_sasl_auth_cache_time = 90d
smtp_starttls_timeout = 300s
smtp_tls_session_cache_timeout = 3600s
smtp_xforward_timeout = 300s
smtpd_error_sleep_time = 1s
smtpd_policy_service_timeout = 100s
smtpd_proxy_timeout = 300s
smtpd_starttls_timeout = ${stress?{10}:{300}}s
smtpd_timeout = ${stress?{10}:{300}}s
smtpd_tls_session_cache_timeout = 600s
smtpd_upstream_proxy_timeout = 5s
root@thebe4:/etc/postfix#
root@thebe4:/etc/postfix#
root@thebe4:/etc/postfix# postconf |grep time |grep lmtp
lmtp_connect_timeout = 0s
lmtp_connection_cache_time_limit = 2s
lmtp_connection_reuse_time_limit = 300s
lmtp_data_done_timeout = 600s
lmtp_data_init_timeout = 280s
lmtp_data_xfer_timeout = 180s
lmtp_lhlo_timeout = 300s
lmtp_mail_timeout = 300s
lmtp_pix_workaround_delay_time = 10s
lmtp_pix_workaround_threshold_time = 500s
lmtp_quit_timeout = 300s
lmtp_rcpt_timeout = 300s
lmtp_rset_timeout = 20s
lmtp_sasl_auth_cache_time = 90d
lmtp_starttls_timeout = 300s
lmtp_tls_session_cache_timeout = 3600s
lmtp_xforward_timeout = 300s

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.