[Mimedefang] Message Mime Data - Relays

Jonas Eckerman jonas_lists at frukt.org
Thu May 24 12:11:12 EDT 2007


Daniel Aquino wrote:

> From reading your code it looks like filter_relay only gives me the
> ip/hostname so I guess I can't read the headers there?

You can't read any headers there as the mail has not yet been 
received. That is why I mentioned "filter_begin", "filter", 
"filter_multipart" and "filter_end" in my reply.

Please read the mimedefang-filter man page. It explains when the 
different callbacks are called and what is passed to them. The 
documentation is much more suited as documentation than my filter.

To get information about mail relays that the mail has passed 
though, you need to read the Received headers in the mail. This, 
of course, has to be done after the mail has been received 
(received, not necessarily accepted).

In my filter there is code that gets the Received headers from 
the MIME::Entity object and parses them with the help of 
Mail::Field::Received. A search for "received" in my filter would 
find that code (as I suggested). It would also show you that I do 
this from "filter_begin" and not "filter_relay".

You can also read those headers from the "HEADERS" file.

 > only gives me the ip/hostname

What more did you want to know about the relays?

Regards
/Jonas
-- 
Jonas Eckerman, FSDB & Fruktträdet
http://whatever.frukt.org/
http://www.fsdb.org/
http://www.frukt.org/




More information about the MIMEDefang mailing list