I found what may be a bug, or what may be intended based on the data I
was submitting to exim via smtp.  I thought I would present what I was
doing, then let you guys judge the outcome.

On Thu, Sep 2, 2010 at 1:58 PM, Todd Lyons <[email protected]> wrote:
> Hey all, I have a configuration that I'm putting in place for an
> autoresponder.  Following the wiki, it makes perfect sense, however,
> I'm moving most of the logic into the ACL's instead of in the router.
> During my testing, I've figured out that the header checks are failing
> when they should be passing.  Using this config snippet:
>
>  warn    logwrite      = DEBUG: Checking for List-Help header
>          condition     = ${if def:header_List-Help: }
>          logwrite      = DEBUG: Found List-Help header
>
> This portion of ACL is in acl_check_content, which is assigned to the
> acl_smtp_data configuration option:
> acl_smtp_data = acl_check_content
>
> I telnet to the server, do the handshake and then paste a valid email

It wasn't valid.  I had just grabbed an email out of
/var/spool/mail/root and was just pasting it, headers and body.  Read
on...

> into it with the following header:
> List-Help: blah
>
> The output in the log is:
> 2010-09-02 20:35:20 1OrGUz-0003m1-9t DEBUG: Checking for List-Help header
> 2010-09-02 20:35:21 1OrGUz-0003m1-9t <= [email protected]
> H=tlyons.ivenue.net (tlyons.ivenue.com) [192.168.100.166] P=esmtp
> S=2227
> 2010-09-02 20:35:21 1OrGUz-0003m1-9t =>
> /IV/user_data/email/a/v/e/averybigandlongdomain.biz/parent/Maildir/
> ([email protected]) <[email protected]>
> R=virtual_user_old T=address_directory

After experimenting with many things, I was able to stumble upon a
solution.  The very first line of the email I was pasting in was:

  From [email protected]  Mon Jan 21 00:34:02 2008

If I omit that line, header variable expansion works as expected.

So my question is if there is any kind of known scenario that a
leading From line is _supposed_ to prevent header expansion
($h_HEADER:) or if this is a bug?  Or is a leading From line
indicative of something else?

-- 
Regards...      Todd
I seek the truth...it is only persistence in self-delusion and
ignorance that does harm.  -- Marcus Aurealius

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details 
at http://www.exim.org/ ##

Reply via email to