"max_use=1" does not work at a situation

2020-08-26 Thread kawakami

Hi all,

Setting "max_use=1" on /etc/master.cf, but the same process ID was 
assigned to different connections(postfix/smtpd process) at particular 
situation.


The situation is;

1, A message was sent on IPv4.
2, A message was sent on IPv4, but resuted 451 error.
3, A message was sent on IPv6, but resuted 451 error.
4, A message was sent on IPv6, but resuted 451 error.

These 2,3,4 connections(postfix/smtpd process) get same process ID.

Has anyone had same experiments?
Are there possiblities that other postfix setting affect "max_use" working?


- T.K

--
///
株式会社デージーネット
ソリューション開発部
川上 拓哉
TEL : (052)709-7121  FAX : (052)709-7122
MAIL : kawak...@designet.co.jp
URL : http://www.designet.co.jp
///


Re: "max_use=1" does not work at a situation

2020-08-27 Thread kawakami

On 2020/08/27 20:54, Wietse Venema wrote:

kawakami:

Hi all,

Setting "max_use=1" on /etc/master.cf, but the same process ID was
assigned to different connections(postfix/smtpd process) at particular
situation.


SHOW LOGS.



Thank you for your reply.

Here are the logs I picked out:

Aug  3 15:10:11 dummy postfix/smtpd[5254]: connect from 
example.com[X.X.X.X]:56925
Aug  3 15:10:11 dummy postfix/smtpd[5254]: NOQUEUE: reject: MAIL from 
example.com[X.X.X.X]:56925: 451 4.7.1 : Sender address 
rejected: denied temporary; from= proto=ESMTP 
helo=
Aug  3 15:10:11 dummy postfix/smtpd[5254]: disconnect from 
example.com[X.X.X.X]:56925
Aug  3 15:10:11 dummy postfix/smtpd[5254]: connect from 
example.net[aa:bb:ccc::e]:15480
Aug  3 15:10:21 dummy postfix/smtpd[5254]: NOQUEUE: reject: MAIL from 
example.net[aa:bb:ccc::e]:15480: 451 4.7.1 : Sender 
address rejected: denied temporary; from= proto=ESMTP 
helo=
Aug  3 15:10:26 dummy postfix/smtpd[5254]: lost connection after MAIL 
from example.net[aa:bb:ccc::e]:15480
Aug  3 15:10:26 dummy postfix/smtpd[5254]: disconnect from 
example.net[aa:bb:ccc::e]:15480




Re: "max_use=1" does not work at a situation

2020-08-30 Thread kawakami

On 2020/08/28 23:50, Wietse Venema wrote:

kawakami:

On 2020/08/27 20:54, Wietse Venema wrote:

kawakami:

Hi all,

Setting "max_use=1" on /etc/master.cf, but the same process ID was
assigned to different connections(postfix/smtpd process) at particular
situation.


SHOW LOGS.



Thank you for your reply.

Here are the logs I picked out:

Aug  3 15:10:11 dummy postfix/smtpd[5254]: connect from
example.com[X.X.X.X]:56925

...

Aug  3 15:10:11 dummy postfix/smtpd[5254]: disconnect from
example.com[X.X.X.X]:56925
Aug  3 15:10:11 dummy postfix/smtpd[5254]: connect from
example.net[aa:bb:ccc::e]:15480

...

Aug  3 15:10:26 dummy postfix/smtpd[5254]: disconnect from
example.net[aa:bb:ccc::e]:15480


Good. Now I have a few momre requests.

1) Execute this command:

# postfix reload.

2) Show the output of this command:

# grep smtpd $(postconf config_directory)/master.cf

3) Show logging that one smtpd process still handles more than one
connection.

Wietse





Sorry, the logs I showed was that after I reload postfix.

And this problem occurs NOT always, only in following situatision,


2, A message was sent on IPv4, but resuted 451 error.
3, A message was sent on IPv6, but resuted 451 error. 


Except the above situation, the "max_use = 1" normally works.

kawakami


Re: "max_use=1" does not work at a situation

2020-09-02 Thread kawakami

On 2020/08/31 22:39, Wietse Venema wrote:

kawakami:

And this problem occurs NOT always, only in following situatision,


2, A message was sent on IPv4, but resuted 451 error.
3, A message was sent on IPv6, but resuted 451 error.


After a 4xx error, the SAME  Postfix SMTP client process may
IMMEDIATELY try to make the SAME delivery to a different MX host.
If this is new, please read the SMTP protocol spec, RFC 5321.

Wietse



I understood that specification.
But I think that spec doesn't explain the reason why
postfix "max_use=1" doesn't work on the situation.

To make this situation clear, I explain that again and
show settings as you request.


2, A message was sent on IPv4, but resuted 451 error.
3, A message was sent on IPv6, but resuted 451 error.

Setting "max_use=1" on /etc/master.cf, but the same process ID was
assigned to different connections(postfix/smtpd process) like above.

Senders and Recipients are diffrent between 2 and 3.

On that time, following LOGs apperred.

Aug  3 15:10:11 dummy postfix/smtpd[5254]: connect from 
example.com[X.X.X.X]:56925
Aug  3 15:10:11 dummy postfix/smtpd[5254]: NOQUEUE: reject: MAIL from 
example.com[X.X.X.X]:56925: 451 4.7.1 : Sender address 
rejected: denied temporary; from= proto=ESMTP 
helo=
Aug  3 15:10:11 dummy postfix/smtpd[5254]: disconnect from 
example.com[X.X.X.X]:56925
Aug  3 15:10:11 dummy postfix/smtpd[5254]: connect from 
example.net[aa:bb:ccc::e]:15480
Aug  3 15:10:21 dummy postfix/smtpd[5254]: NOQUEUE: reject: MAIL from 
example.net[aa:bb:ccc::e]:15480: 451 4.7.1 : Sender 
address rejected: denied temporary; from= proto=ESMTP 
helo=
Aug  3 15:10:26 dummy postfix/smtpd[5254]: lost connection after MAIL 
from example.net[aa:bb:ccc::e]:15480
Aug  3 15:10:26 dummy postfix/smtpd[5254]: disconnect from 
example.net[aa:bb:ccc::e]:15480



Postfix setting are here;


# posgconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_min_user = yes
bounce_queue_lifetime = 3d
bounce_size_limit = 5
bounce_template_file = /etc/postfix/bounce.cf
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd 
$daemon_directory/$process_name $process_id & sleep 5

default_destination_concurrency_limit = 40
default_destination_recipient_limit = 200
default_transport = smtp:[192.168.x.y] ★
disable_vrfy_command = yes
header_size_limit = 102400
html_directory = no
inet_interfaces = all
inet_protocols = all
initial_destination_concurrency = 40
mail_owner = postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maximal_queue_lifetime = 3d
message_size_limit = 20971520
mydestination = $myhostname, dummy.example.jp
mydomain = example.jp
myhostname = dummy.example.jp
myorigin = example.jp
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
relay_domains = hash:/etc/postfix/relaydomain
relay_recipient_maps = ldap:/etc/postfix/ldap-basic.cf
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_data_xfer_timeout = 300s
smtpd_banner = $myhostname ESMTP
smtpd_client_port_logging = yes
smtpd_data_restrictions = check_policy_service inet:127.0.0.1:2525 permit
smtpd_delay_reject = no
smtpd_milters = unix:/var/run/milter-manager/milter-manager.sock
smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:2525 
reject_unauth_destination
smtpd_sender_restrictions = check_policy_service inet:127.0.0.1:2525 
reject_non_fqdn_sender permit

smtpd_timeout = 60s
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual


# postconf -Mf
smtp   inet  n   -   n   -   300 smtpd -o max_use=1
pickup unix  n   -   n   60  1   pickup
cleanupunix  n   -   n   -   0   cleanup
qmgr   unix  n   -   n   300 1   qmgr
tlsmgr unix  -   -   n   1000?   1   tlsmgr
rewriteunix  -   -   n   -   -   trivial-rewrite
bounce unix  -   -   n   -   0   bounce
defer  unix  -   -   n   -   0   bounce
trace  unix  -   -   n   -   0   bounce
verify unix  -   -   n   -   1   verify
flush  unix  n   -   n   1000?   0   flush
proxymap   unix  -   -   n   -   -   proxymap
proxywrite unix  -   -   n   -   1   proxymap
smtp   unix  -   -   n   -   - 
smtp.(masked program)

relay  unix  -   -   n   -   -   smtp