On 2022-10-20 21:38 -07, "Lyndon Nerenberg (VE7TFX/VE6BBM)" <[email protected]> 
wrote:
> My reading of smtpd.conf says that any reject action should be able
> to take a message parameter. Yet the following line is rejected
> with a syntax error message:
>
>   match mail-from rdns regex "\.t-online\.de$" reject "550 5.7.1 you don't 
> accept our mail, so we don't accept yours."
>
> Yet the same line without the string after the reject keyword works.
>
> I spent some time digging in the grammar, but yacc just gives
> me migraines.  Should this in fact work?  Or is the manpage
> wrong.

There are two kinds of matches, you are using this:

     match options reject
             Reject the incoming message during the SMTP dialogue.  The same
             options are supported as for the match action directive.


You need this one:

     filter filter-name phase phase-name match conditions decision
             Register a filter filter-name.  A decision about what to do with
             the mail is taken at phase phase-name when matching conditions.
             Phases, matching conditions, and decisions are described in MAIL
             FILTERING, below.

i.e.

filter dtag phase mail-from match rdns regex "\.t-online\.de$" reject "550 
5.7.1 you don't accept our mail, so we don't accept yours."
listen on egress filter dtag

No, I don't know why things are the way they are.

>
> --lyndon
>

-- 
I'm not entirely sure you are real.

Reply via email to