Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

How to get Subject in transport?

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


_lek at inbox

Aug 6, 2012, 5:07 AM

Post #1 of 3 (284 views)
Permalink
How to get Subject in transport?

Hello.

How can i get Subject header in transport appendfile.c?

log_write(0, LOG_MAIN, "DEBUG: transport delivered to dir=%s from=%s, subject=%s, size=%d", path, sender_address, subject, message_size);

Variable "subject" does not exists, other variables are present.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Chris.Knadle at coredump

Aug 6, 2012, 10:51 AM

Post #2 of 3 (280 views)
Permalink
Re: How to get Subject in transport? [In reply to]

On Monday, August 06, 2012 08:07:39, Алексей Киреев wrote:
> Hello.
>
> How can i get Subject header in transport appendfile.c?
>
> log_write(0, LOG_MAIN, "DEBUG: transport delivered to dir=%s from=%s,
> subject=%s, size=%d", path, sender_address, subject, message_size);
>
> Variable "subject" does not exists, other variables are present.

Rather than build this into Exim4 itself, I do this via an ACL:

acl_check_data:
...
warn
logwrite = msg Subject: $header_Subject:
logwrite = msg To: $recipients
logwrite = return path: $return_path
logwrite = reply addr: $reply_address

-- Chris

--
Chris Knadle
Chris.Knadle [at] coredump

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


exim-users at spodhuis

Aug 6, 2012, 11:15 AM

Post #3 of 3 (282 views)
Permalink
Re: How to get Subject in transport? [In reply to]

On 2012-08-06 at 16:07 +0400, Алексей Киреев wrote:
> How can i get Subject header in transport appendfile.c?
>
> log_write(0, LOG_MAIN, "DEBUG: transport delivered to dir=%s from=%s, subject=%s, size=%d", path, sender_address, subject, message_size);
>
> Variable "subject" does not exists, other variables are present.

Walk the header_list variable or change expand.c:find_header() to be
non-static (and add a declaration to a header file).

Examples of walking header_list for Subject: are in 'deliver.c'.

The comments on find_header() are pretty clear; this is the function
call behind the $h_* / $rh_* / $bh_* expansions in the string expansion
language used for the config file.

-Phil

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.