diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index f73bac4..4b9ce65 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -5,6 +5,7 @@ use vars qw($TraceLevel $Spool_dir $Size_threshold); use Sys::Hostname; use Qpsmtpd::Constants; +use Qpsmtpd::Address; our $VERSION = "0.94"; @@ -651,7 +652,7 @@ sub auth_mechanism { sub address { my $self = shift; my $addr = Qpsmtpd::Address->new(@_); - $addr->{qp} = $self; + $addr->qp($self); return $addr; } diff --git a/lib/Qpsmtpd/Address.pm b/lib/Qpsmtpd/Address.pm index fc0c810..35ac4f6 100644 --- a/lib/Qpsmtpd/Address.pm +++ b/lib/Qpsmtpd/Address.pm @@ -346,7 +346,8 @@ hook_user_config =cut sub qp { - my ($self) = @_; + my $self = shift; + $self->{qp} = $_[0] if @_; return $self->{qp}; }