Thomas,

> Zdravo Mark,
:-)

> >> After XFORWARD has been received, the information is in:
> >>   $msginfo->client_addr
> >>   $msginfo->client_port
> > You mean your own IP address? See 'package Amavis::In::Connection',
> > such info is stored in $conn->socket_ip and $conn->socket_port.
> Slowly I'm understanding small parts of the code ;-) Thanks a lot
> for your help! IP address that has been logged once at this place
> has been that from "MX Out" in the following "illustration":
>      | MX In | => | Amavis | => | MX Out |
> If I didn't misunderstand the whole thing, $conn->socket_* is
> "Amavis" himself and $msginfo->client_* is "MX In" - correct?

Yes, pretty much so.

The $conn object holds info on the MX-In=>amavisd TCP connection
and SMTP session over that connection, according to comments:

sub client_ip    # client IP address (immediate SMTP client, i.e. our MTA)
sub socket_ip    # IP address of our interface that received connection
sub socket_port  # TCP port of our interface that received connection
sub socket_proto # TCP/UNIX
sub appl_proto   # SMTP/ESMTP(A|S|SA)/LMTP(A|S|SA) / AM.PDP/AM.CL/QMQP/QMQPqq
sub smtp_helo    # (E)SMTP HELO/EHLO parameter

so the client_* methods are the TCP peer (our MTA-in in this case),
and socket_* is amavisd's side of the TCP connection.


Information about the message being processed is stored in
methods of
  package Amavis::In::Message;
and
  package Amavis::In::Message::PerRecip;

As it happens, postfix is willing to provide some TCP/DNS info
about the remote mailer from which it received a message.
This info is also stored in $msginfo  (Amavis::In::Message):

sub client_proto  # orig. client protocol, obtained from XFORWARD or milter
sub client_addr   # original client IP addr, obtained from XFORWARD or milter
sub client_addr_mynets  # client IP address matches @mynetworks_maps (boolean)
sub client_name   # orig. client DNS name, obtained from XFORWARD or milter
sub client_port   # orig. client port num., obtained from XFORWARD or milter
sub client_helo   # orig. client EHLO name, obtained from XFORWARD or milter


  Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to