On 11 January 2017 at 00:29, Wietse Venema <wie...@porcupine.org> wrote:
> Dominic Raferd:
>> On 10 January 2017 at 14:41, Wietse Venema <wie...@porcupine.org> wrote:
>> > Dominic Raferd:
>> >> # Example 1: response from gmail at end of smtp transmission is
>> >> checked using dns_filter_lookup - as intended, and not found - as
>> >
>> > $ postconf dns_filter_lookup
>> > postconf: warning: dns_filter_lookup: unknown parameter
>> >
>> > No surprise, then, that nothing is matched.
>> >
>>
>> (reposting to postfix-users...)
>>
>> Quite so, but finding a match once the test occurs is not the issue
>> here. My apologies for confusion caused by my typo putting 'dns' in
>> handwritten comment line when of course I meant 'dsn'.
>>
>> I am using smtp_delivery_status_filter=pcre:/etc/postfix/smtp_dsn_filter,
>> and this file does exist and is called to test the response after a
>> successful delivery - my first example is the simple control case.
>>
>> My puzzle is in the second example where no test is performed upon the
>> final response code.
>
> If you wonder why a 421 response does not match your PCRE file,
> show your PCRE file.
>
>         Wietse

I could do so, but this is not what I am wondering. I am wondering why
in my example 2 postfix never even attempts to look up the PCRE file.
Of course it does not find a match because it does not attempt the
lookup.

In my example 1 the single-line gmail response (which happens to be
250) is followed by the pcre lookup:
12:51:10 postfix/smtp: <gmail-smtp-in.l.google.com[74.125.195.27]:25:
250 2.0.0 OK 1484049070 ld4si1455293wjb.62 - gsmtp
12:51:10 postfix/smtp: dsn_filter_lookup: 2.0.0 250 2.0.0 OK
1484049070 ld4si1455293wjb.62 - gsmtp

In my example 2 the final line of the multi-line gmail response (which
happens to be 421) is not followed by the pcre lookup, instead the
message from gmail goes direct to the log and the lookup never
happens:
12:52:40 postfix/smtp: <gmail-smtp-in.l.google.com[74.125.195.27]:25:
421 4.7.0 https://support.google.com/mail/answer/188131 for more
information. c28si1314741wrb.13 -
12:52:40 postfix/smtp: 7A00F43D7C: host
gmail-smtp-in.l.google.com[74.125.195.27] said: 421-4.7.0 ...

With example 2 I think there should be a log entry from
dsn_filter_lookup immediately after the final response line from
gmail, this would show merely that a lookup was being initiated. It
isn't there. Nor are further log lines giving lookup progress and
result (this is unsurprising, since the lookup hasn't happened). All
of these lines are present in (my original full text of) example 1 and
missing from example 2.

Reply via email to