On 28.04.20 10:15, natan maciej milaszewski wrote:
I have debian 9 and postfix 3.1.14. Generally, I have distributed mail traffic over several machines
#other go to amavis 0.0.0.0/0 FILTER smtp-amavis:[127.0.0.1]:10628
master.cf: smtp-amavis unix - - - - 80 smtp -o smtp_data_done_timeout=6000s -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes
I believe you should use lmtp instead of smtp for amavis connections.
#80 cosnnections - and in my amavis I have 90 (10+overtime ) #returns from amavis IP .199 86.xxx.xxx.199:10027 inet n - n - - smtpd -o smtpd_proxy_timeout=900s -o content_filter= -o mynetworks_style=host -o mynetworks=10.0.100.0/24,86.xxx.xxx.199/32, -o local_recipient_maps= -o relay_recipient_maps= -o strict_rfc821_envelopes=yes -o smtp_tls_security_level=none -o smtpd_tls_security_level=none -o smtpd_restriction_classes= -o smtpd_delay_reject=no -o smtpd_client_restrictions=permit_mynetworks,reject -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_end_of_data_restrictions= -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings
All works fine but sometimes my "users" use a mial forwarding .... In that forwarding have (100-200 email) like
forwarding how?
u...@domain1.ltd ---> us...@domain1.ltd, us...@domain1.ltd, u...@domain2.ltd, us...@domainx.ltd And all forward e-mail was "releback" in smtp and go to amavis.
do you want to say that users send the same mail to postfix, not from any of whitelisted addreses? Maybe you should whitelist localhost (127.0.0.1) too.
sometimes i get delay=127.0.0.1[127.0.0.1]:10628, conn_use=3, delay=6773, delays=6517/5.8/0/250, dsn=4.4.2, status=deferred (lost connection with 127.0.0.1[127.0.0.1] while sending end of data -- message may be sent more than once)
lmtp should help here.
"smtp_connection_reuse_time_limit" is default 300s
connection reuse won't help here. timeouts and smtp are the problem here.
I solve this problem by adding: in master.cf 1)smtp inet n - y - 100 smtpd -o receive_override_options=no_address_mappings 2)remove "no_address_mappings" in transport: ...... 86.xxx.xxx.199:10027 inet n - n - - smtpd -o smtpd_proxy_timeout=900s ......
No, you don't solve the problem, you work around the problem.
and change map /etc/postfix/amavis_bypass ... #without amavis 86.xxx.xxx.0/24 FILTER smtp:10.0.100.5:10025 .....
and I add another local transport like: 10.0.100.5:10025 inet n - n - - smtpd
you are only making this complicated.
This working - My question is. Is there a simpler solution? Because now my "mail route" is: - incomming e-mail - if IP (whitlisted) go to: - local transport 10.0.100.5 and go to lmtp - if IP (from 0.0.0.0) go to: - local haproxy - local haproxy go to amavis - amavis scanned - amavis return to postfix - postfix local transport 10.0.100.5 and go to lmtp
use LMTP for filtering. -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. I'm not interested in your website anymore. If you need cookies, bake them yourself.