ZConf-Mail
view release on metacpan or search on metacpan
bin/zcmailaccount view on Meta::CPAN
"; pgpType: The signing type for the message.\n".
"; clearsign: Clear sign the message.\n".
"; mimesign: Attach the signature as a attachment.\n".
"pgpType=";
if (defined($args{pgpType})) {
$ini=$ini.$args{pgpType};
}else {
$ini=$ini."clearsign";
}
$ini=$ini."\n\n".
"; PGPkey: The PGP to use. A list can be found using 'gpg -K'.\n".
"PGPkey=";
if (defined($args{PGPkey})) {
$ini=$ini.$args{PGPkey};
}
$ini=$ini."\n\n".
"; PGPdigestAlgo: The digest algorithym to use.\n".
"; To find what out what your version supports, run 'gpg --version'.\n".
"PGPdigestAlgo=";
if (defined($args{PGPdigestAlgo})) {
$ini=$ini.$args{PGPdigestAlgo};
}
$ini=$ini."\n";
return $ini;
}
lib/ZConf/Mail.pm view on Meta::CPAN
}
print BODYWRITE $body;
#this is the file that will be read into $sign
my $read=undef;
#this is what will be returned
my $sign=undef;
#handles clear signing
my $execstring='gpg -u '.$Aargs{PGPkey}.' --digest-algo '.$hash.' ';
if ($Aargs{pgpType} eq 'clearsign') {
$execstring=$execstring.' --clearsign '.$bodyfile;
system($execstring);
if ($? ne '0') {
$sign->{error}=44;
$sign->{errorString}='Signing failed. Command="'.$execstring.'"';
warn($self->{module}.' '.$method.':'.$self->error.': '.$self->errorString);
return undef;
}
$read=$bodyfile.'.asc';
lib/ZConf/Mail.pm view on Meta::CPAN
#handles sign and encrypt
if ($Aargs{pgpType} eq 'signencrypt') {
$execstring=$execstring.' -se -r '..' '.$bodyfile;
system($execstring);
if ($? ne '0') {
$sign->{error}=44;
$sign->{errorString}='Signing failed. Command="'.$execstring.'"';
warn($self->{module}.' '.$method.':'.$self->error.': '.$self->errorString);
return undef;
}
$read=$bodyfile.'.gpg';
}
open(SIGNREAD, '<'.$read);
$sign=join("", <SIGNREAD>);
close(SIGNREAD);
unlink($bodyfile);
unlink($read);
rmdir($bodydir);
lib/ZConf/Mail.pm view on Meta::CPAN
Sign and encrypt the message. Not yet implemented.
=head3 accounts/smtp/*/PGPkey
The PGP key to use.
=head3 accounts/smtp/*/PGPdigestAlgo
The digest algorithym to use. It will default to 'SHA512' if not specified.
To find what out what your version supports, run 'gpg --version'.
=head2 EXEC
=head3 deliver
This is the command to execute for delivering a mail message. A single message
will be delivered at a time by running the specified program and piping the message
into it. Only a single message is delivered at once.
A example would be setting this to '/usr/local/libexec/dovecot/deliver' to deliver a
( run in 0.802 second using v1.01-cache-2.11-cpan-df04353d9ac )