Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Wietse Venema
Andreas Thienemann: > Hi Wietse, > > On Wed, 3 Apr 2019, Wietse Venema wrote: > > > I am investigating this in my copious spare time. The channel from > > cleanup to smtpd was originally designed for single-line responses > > from header/body_checks. If that is the problem then I'll devise a > >

Re: Bug report: problem with smtp_mx_address_limit = 0

2019-04-03 Thread Luc Pardon
On 3/04/19 17:13, Viktor Dukhovni wrote: > > > It seems you're in a sardonic mood, ... best to not go there. If I gave that impression, I apologize. All I was trying to say is that, because of the bug, you may be more likely to run out of disk space by trying to send to bona fide domains lik

Re: MAILER DAEMON email address question

2019-04-03 Thread Bill Cole
On 3 Apr 2019, at 11:11, Giles Coochey wrote: Yet further off-topic, I have FEATURE(`accept_unresolvable_domains') Configured  for sendmail - but suspect that sendmail still doesn't relay if the domain is unresolvable. Yes, it will, if it will relay for (or deliver locally) the recipient d

Re: Bug report: problem with smtp_mx_address_limit = 0

2019-04-03 Thread Viktor Dukhovni
> On Apr 3, 2019, at 7:02 AM, Luc Pardon wrote: > >> ... and watch their mail queues melt down. > > ... because of all the mail that will get stuck in the queue with > "server unavailable or unable to receive mail" for _any_ MX that has > _both_ A and records. No, because failing delive

Re: MAILER DAEMON email address question

2019-04-03 Thread Marco
Il 03/04/2019 15:12, Matus UHLAR - fantomas ha scritto: does "such" mean null recipient here?  does empty_address_recipient affect both the address in From: of bounces and address for which mail is always accepted?  Do I have to alias MAILER-DAEMON (or what empty_address_recipient is set to) to

Re: MAILER DAEMON email address question

2019-04-03 Thread Giles Coochey
On 03/04/2019 15:25, Wietse Venema wrote: Giles Coochey: I think I've checked that already: # grep? reject_unknown_recipient_domain /etc/postfix/main.cf # OK, now try unknown_sender_domain. Nothing there, but see below! But perhaps one of these settings causes it? Or you could end this g

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Andreas Thienemann
Hi Wietse, On Wed, 3 Apr 2019, Wietse Venema wrote: I do not know if skipping the printable() call does have any side-effects though. As a short-term fix it is probably OK, because the cleanup daemon already filters the response. But smtpd should not rely on the cleanup server doing that. R

Re: MAILER DAEMON email address question

2019-04-03 Thread Wietse Venema
Giles Coochey: > > On 03/04/2019 14:58, Wietse Venema wrote: > > Giles Coochey: > >> I notice that some mails that pass the sendmail server get rejected by > >> postfix, because the sender domain appears to be NXDOMAIN. I assume > >> these are temporary 400 rejections (to cope with a failed DNS) -

Re: MAILER DAEMON email address question

2019-04-03 Thread Giles Coochey
On 03/04/2019 14:58, Wietse Venema wrote: Giles Coochey: I notice that some mails that pass the sendmail server get rejected by postfix, because the sender domain appears to be NXDOMAIN. I assume these are temporary 400 rejections (to cope with a failed DNS) -? Sendmail keeps these in the queu

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Wietse Venema
Andreas Thienemann: > Looks good to me. Patched, rebuilt, verified working. > > Multiline responses from the milter are now correctly forwarded the smtpd > and the client does not timeout anymore waiting for data. > > I do not know if skipping the printable() call does have any side-effects > t

Re: MAILER DAEMON email address question

2019-04-03 Thread Wietse Venema
Giles Coochey: > I notice that some mails that pass the sendmail server get rejected by > postfix, because the sender domain appears to be NXDOMAIN. I assume > these are temporary 400 rejections (to cope with a failed DNS) -? > Sendmail keeps these in the queue for a number of days and eventuall

Re: Rewriting recipient before routing the email

2019-04-03 Thread Bill Cole
On 3 Apr 2019, at 2:38, André Rodier wrote: > Maybe I can do this with recipient delimiter, but can I have more than > one character recipient delimiter in postfix? Yes. See the man page for postconf(5) -- Bill Cole b...@scconsult.com or billc...@apache.org (AKA @grumpybozo and many *@billmai

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Andreas Thienemann
Hi Wietse, On Wed, 3 Apr 2019, Wietse Venema wrote: Try this: *** ./src/smtpd/smtpd.c-2019-03-30 08:05:29.0 -0400 --- ./src/smtpd/smtpd.c 2019-04-03 08:26:07.0 -0400 *** *** 3598,3604 if (state->err == 0) { why = vstring_alloc(10);

Re: MAILER DAEMON email address question

2019-04-03 Thread Matus UHLAR - fantomas
>Marco: >> The only exception is the recipient "mailer-dae...@example.com", where >> let suppose example.com is a local domain. On 03.04.19 07:16, Wietse Venema wrote: >MAILER-DAEMON is special. Postfix sends mail mail from <> as >MAILER-DAEMON@$myorigin and accepts mail for MAILER-DAEMON (or >wh

Re: MAILER DAEMON email address question

2019-04-03 Thread Giles Coochey
On 03/04/2019 13:45, Wietse Venema wrote: Matus UHLAR - fantomas: Marco: The only exception is the recipient "mailer-dae...@example.com", where let suppose example.com is a local domain. On 03.04.19 07:16, Wietse Venema wrote: MAILER-DAEMON is special. Postfix sends mail mail from <> as MAI

Re: MAILER DAEMON email address question

2019-04-03 Thread Wietse Venema
Matus UHLAR - fantomas: > >Marco: > >> The only exception is the recipient "mailer-dae...@example.com", where > >> let suppose example.com is a local domain. > > On 03.04.19 07:16, Wietse Venema wrote: > >MAILER-DAEMON is special. Postfix sends mail mail from <> as > >MAILER-DAEMON@$myorigin and a

Re: MAILER DAEMON email address question

2019-04-03 Thread Matus UHLAR - fantomas
Marco: The only exception is the recipient "mailer-dae...@example.com", where let suppose example.com is a local domain. On 03.04.19 07:16, Wietse Venema wrote: MAILER-DAEMON is special. Postfix sends mail mail from <> as MAILER-DAEMON@$myorigin and accepts mail for MAILER-DAEMON (or whatever

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Wietse Venema
Try this: *** ./src/smtpd/smtpd.c-2019-03-30 08:05:29.0 -0400 --- ./src/smtpd/smtpd.c 2019-04-03 08:26:07.0 -0400 *** *** 3598,3604 if (state->err == 0) { why = vstring_alloc(10); state->err = mail_stream_finish(state->dest,

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Andreas Thienemann
Hi Wietse, On Wed, 3 Apr 2019, Wietse Venema wrote: I am investigating this in my copious spare time. The channel from cleanup to smtpd was originally designed for single-line responses from header/body_checks. If that is the problem then I'll devise a workaround for existing code, and a proper

Re: MAILER DAEMON email address question

2019-04-03 Thread Wietse Venema
Marco: > The only exception is the recipient "mailer-dae...@example.com", where > let suppose example.com is a local domain. MAILER-DAEMON is special. Postfix sends mail mail from <> as MAILER-DAEMON@$myorigin and accepts mail for MAILER-DAEMON (or whatever empty_address_recipient says).

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Wietse Venema
John Fawcett: > The output you sent shows what the smtpd server replies to the client > and shows a different behaviour between sendmail and postfix when the > milter uses? smfi_setmlreply(). It does not show that postfix is > receiving multiple reply lines from the milter and folding them, though

Re: Bug report: problem with smtp_mx_address_limit = 0

2019-04-03 Thread Luc Pardon
On 3/04/19 01:16, Wietse Venema wrote: > I prefer to remove the ability to disable safety mechanisms. And in your initial response, you also wrote: > Probably better to not allow a limit-less smtp_mx_address_limit, > as it makes Postfix vulnerable to resource exhaustion attack. Both respons

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread Andreas Thienemann
Hi John, On Wed, 3 Apr 2019, John Fawcett wrote: The output you sent shows what the smtpd server replies to the client and shows a different behaviour between sendmail and postfix when the milter uses  smfi_setmlreply(). It does not show that postfix is receiving multiple reply lines from t

Re: Authentication attempts for x...@com.au addresses

2019-04-03 Thread Matus UHLAR - fantomas
On 03.04.19 14:14, James Brown wrote: Thanks all for your replies. Increasing both Ban time and Find time are good and I’ll do that. Looking through the logs I can see some repeated IPs for IMAP failures, but over long times (eg maybe once or twice a day max). We have Stunnel receive the traff

MAILER DAEMON email address question

2019-04-03 Thread Marco
Hello, I have configured postfix with local domains mydestination = ldap:/etc/postfix/ldap-localdomain.cf and to check local recipients: local_recipient_maps = ldap:/etc/postfix/ldap-localrecipient.cf smtpd_relay_restrictions = permit_mynetworks, permit_sasl_a

Re: Postfix and smfi_setmlreply() milter command resulting in SMTP protocol breakage.

2019-04-03 Thread John Fawcett
On 02/04/2019 10:48, Andreas Thienemann wrote: > Hi, > > I have a locally developed milter using the python-milter bindings > which seems to trigger a Postfix bug. > > The milter in question uses the smfi_setmlreply() command to set a > multiline response as defined in rfc5321. > > Multiline replie