git://git.jankratochvil.net
/
PerlMail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
+Note sendmail wrapper setup.
[PerlMail.git]
/
perlmail-sendmail
diff --git
a/perlmail-sendmail
b/perlmail-sendmail
index
5ea95ab
..
9f7c30c
100755
(executable)
--- a/
perlmail-sendmail
+++ b/
perlmail-sendmail
@@
-25,10
+25,12
@@
use warnings;
use File::Basename;
BEGIN {
use File::Basename;
BEGIN {
-
use lib $ENV{"PERLMAIL_BASEDIR"} || File::Basename::dirname($0)
;
-
use PerlMail::Config
;
-
use PerlMail::Lib
;
+
my $self=$0
;
+
$self=readlink $self while -l $self
;
+
eval 'use lib $ENV{"PERLMAIL_BASEDIR"} || File::Basename::dirname($self);'
;
}
}
+use PerlMail::Config;
+use PerlMail::Lib;
require Getopt::Long;
use POSIX qw(WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG WIFSTOPPED WSTOPSIG);
require Getopt::Long;
use POSIX qw(WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG WIFSTOPPED WSTOPSIG);
@@
-153,7
+155,11
@@
for my $rcpt (@rcpts) {
if (defined $rcpt) { # !defined($rcpt) if we have no recipients
local $_;
$opt_f=FromAddress($rcpt,1)->address() if !defined $opt_f;
if (defined $rcpt) { # !defined($rcpt) if we have no recipients
local $_;
$opt_f=FromAddress($rcpt,1)->address() if !defined $opt_f;
- $head->replace($from_headername,FromAddress($rcpt,0)->format()) if $from_headername;
+ if ($from_headername) {
+ if (my $fromaddr=FromAddress($rcpt,0)->format()) {
+ $head->replace($from_headername,$fromaddr);
+ }
+ }
}
1; # drop '-bm' if present as it is default anyway
}
1; # drop '-bm' if present as it is default anyway