Re: [exim] how to accept mail with invalid to-header?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Ted Cooper
Ημερομηνία:  
Προς: 'exim-users@exim.org'
Αντικείμενο: Re: [exim] how to accept mail with invalid to-header?
Anja Gawlik wrote:
>>> one of our customers send mail with invalid to-headers in the form of
>>>
>>> T To: <recpt name<recpt.name@???>
>>>
>>> Exim rejects them with: rejected after DATA: "@" or "." expected after >"recpt": failing address in "To:" header is: <recpt >name<recpt.name@???>
>>>
>>> Is there some way to make exim accept mails with this faulty header from >that one domain?
>>>
>>> Thanks in advance,
>>>
>>> Anja
>> Stop doing header syntax checking in your data ACL. Check out the manual
>> for more information.
>
> Thank you for your reply, this was my first idea too, but in our config it says:
>
> require
> message = Found an invalid header
> verify = header_syntax
>
> So I would have expected a line in the logfile that says something about "Found an invalid header". But there is non. Can it still be that require-statement above?


The block above is doing what I would expect it to .. if there is an
invalid header then it causes a "deny" as dictated by the "require" -
everything must be true or it rejects

> There is no other 'verify = header_syntax' statement in the config-file.
>
> If I replace the above by
>
> deny
> message = Found an invalid header
> !verify = header_syntax
> !sender_domains = example.com
>
> would it then selectively allow those mails through that come from example.com and check the others for header syntax?


Order may be important so I would reverse the last 2 lines. You could
test it to see if mattered if you were keen.

Your above ACL section will do what you want. For example.com it will
skip the chunk (test to see if order is important), and for all other
domains it will check headers.

Heading on a tangent, an alternative might be to do something like

warn
verify = header_syntax
set acl_m_header_syntax = valid

The you can use acl_m_header_syntax as a flag later on for adding up
spam points.

--
The Exim Manual
http://www.exim.org/docs.html
http://www.exim.org/exim-html-current/doc/html/spec_html/index.html