diff options
author | Jannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de> | 2021-08-24 11:10:39 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de> | 2021-08-24 11:10:39 +0200 |
commit | 2388747fbf954de990862a6c01713d50823e8725 (patch) | |
tree | c3b3a7dc80f1d6a978d25e3048f7a6afb9fa08e0 /lib/JWebmail/Model/Driver/QMailAuthuser.pm | |
parent | bf5554febae6f299c716b5a9582c6bfd6980b728 (diff) |
overhauled testing
Diffstat (limited to 'lib/JWebmail/Model/Driver/QMailAuthuser.pm')
-rw-r--r-- | lib/JWebmail/Model/Driver/QMailAuthuser.pm | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/JWebmail/Model/Driver/QMailAuthuser.pm b/lib/JWebmail/Model/Driver/QMailAuthuser.pm index 65e90f1..a310024 100644 --- a/lib/JWebmail/Model/Driver/QMailAuthuser.pm +++ b/lib/JWebmail/Model/Driver/QMailAuthuser.pm @@ -4,20 +4,18 @@ use Mojo::Base -base; use IPC::Open2; use File::Basename 'fileparse'; -use JSON::PP; +use JSON::PP 'decode_json'; has 'user'; has 'maildir'; -has 'include'; +has 'prefix' => ''; has qmail_dir => '/var/qmail/'; has prog => [fileparse(__FILE__)]->[1] . '/QMailAuthuser/Extract.pm'; has logfile => '/dev/null'; sub communicate { - use autodie; - my $self = shift; my %args = @_; @@ -32,9 +30,7 @@ sub communicate { my ($user_name) = $args{user} =~ /(\w*)@/; $self->qmail_dir.'/bin/qmail-authuser' - . ' perl ' - . join('', map { ' -I ' . $_ } @{ $self->include }) - . ' -- ' + . $self->prefix . ' ' . join(' ', map { $_ =~ s/(['\\])/\\$1/g; "'$_'" } ($self->prog, $self->maildir, $self->user, $user_name, $args{mode}, @{$args{args}})) . ' 3<&0' . ' 2>>'.$self->logfile; @@ -123,11 +119,11 @@ Depends on the mode =item user -User name +E-Mail address of the user =item password -User password +Corresponding e-mail user password =item challenge @@ -139,4 +135,4 @@ Challenge when using cram L<JWebmail::Model::ReadMails>, L<JWebmail::Model::Driver::QMailAuthuser::Extract> -=cut
\ No newline at end of file +=cut |