From 55388248e44b8096aa55c811737ef48816ce78a3 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Mon, 29 Apr 2013 23:50:18 -0400 Subject: [PATCH] store envelope from and to in connection notes --- lib/Qpsmtpd/SMTP.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index 40d8b38..b5bb500 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -354,6 +354,7 @@ sub mail { } $self->log(LOGDEBUG, "full from_parameter: $line"); + $self->connection->notes('envelope_from', $line); $self->run_hooks("mail_parse", $line); } @@ -442,6 +443,7 @@ sub mail_respond { sub rcpt { my ($self, $line) = @_; + $self->connection->notes('envelope_rcpt', $line); $self->run_hooks("rcpt_parse", $line); } @@ -466,7 +468,7 @@ sub rcpt_parse_respond { # (... or anything else parseable by Qpsmtpd::Address ;-)) # this means, a plugin can decide to (pre-)accept # addresses like or - # by removing the trailing "."/" " from this example... + # by removing the trailing dot or space from this example. $self->run_hooks("rcpt_pre", $rcpt, \%param); }