After fixing that issue, I noticed that when postfix first connect to
my milter, it starts with 2 requests containing ` * `.

Then, I receive 1 request from the sender address (which was not
expected), then 2 requests for each recipient.

This only happens when postfix is first connecting to the milter,
after that, queries ran as expected: 1 request for each recipient.

Postfix logs shows only 1 request per recipient, but my milter that
logs every request has catch that behavior.

Is that normal? Can it be managed to avoid duplication?

Any tip?

Thanks in advance.

BR,
Rafael

Em qui., 16 de out. de 2025 às 11:53, Rafael Azevedo
<[email protected]> escreveu:
>
> Hi Wietse,
> Thanks for the reply.
> I've changed the code and now the connections are kept open and now
> its working perfectly.
> Thanks for the help.
> Best regards,
> Rafael
>
> Em qui., 16 de out. de 2025 às 11:29, Wietse Venema via Postfix-users
> <[email protected]> escreveu:
> >
> > Rafael Azevedo via Postfix-users:
> > > Hi there,
> > >
> > > I'm writing a new Milter to be used on transport_maps with tcp map:
> > >
> > > transport_maps = tcp:127.0.0.1:9998
> > >
> > > Here is the thing.
> > >
> > > When I send one message, everything goes smoothly, but when I send
> > > more than one message, I get this error:
> > >
> > > postfix/trivial-rewrite[214756]: warning: read TCP map reply from
> > > 127.0.0.1:9998: unexpected EOF (Connection reset by peer).
> >
> > The tcp_table server at 127.0.0.1:9998 has closed the connection
> > spontaneously. Don't do that.
> >
> > The tcp_table server is supposed to keep the connection open until
> > the Postfix process closes it.
> >
> > - A Postfix daemon such as trivial-rewrite will terminate (and close
> >   the tcp_table connection) after 100s idle time.
> >
> > - A Postfix command-line tool such as postmap will terminat (and
> >   close the tcp_table connection) immediately.
> >
> >         Wietse
> > _______________________________________________
> > Postfix-users mailing list -- [email protected]
> > To unsubscribe send an email to [email protected]
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to