Raffael Schmid: > Hi list > > Do you know whether there is a possibility to reject invalid return > paths in postfix? > > The problem is, that we get spam with a header-line like the following > and would like to reject those messages: > Return-Path: <MAILER-DEAMON> > > AFAIK the return-path above is invalid, as there is only the following > formats allowed: > Return-Path: <john....@example.org> > Return-Path: <> > > As I did not find a option in postfix to reject those mails, i could > write a header check with pcre. But before I will do this, I'd like to > verify whether there is really no option in postfix to set this?
Postfix has no "enforce RFC 100%" option. In particular, the address parser must tolerate errors. Unlike a compiler such as GCC, Postfix cannot abort on incorrect syntax, or throw away all the input that it can't understand, therefore it cannot be implemented with a parser that strictly goes by the rules of the grammar. Adding a check for every possible violation is not practical, therefore Postfix has explicit checks only for the most common violations. Wietse