Autor: Matthew Lewis Data: A: exim-users Assumpte: [Exim] Problems with -f flag
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hello everyone,
I'm on a cpanel server, shared hosting, using Exim for the MTA. I have a
PERL script that needs to use the -f[email] flag, but for some reason
that flag isn't working properly with the script. The same script is
functioning on other servers using Sendmail and QMail, but so far I
can't get it to work on our server which as I said is running Exim.
I checked with my host to make sure the script was running as a "Trusted
User" and thus had access to the -f flag. Tech support at my host
verified that we should have access to it, but it's still not working.
Our host is very reluctant to make changes to their Exim configuration,
but they might if I can bring solid details about what needs to be done.
Does anyone have any suggestions on how to allow a PERL script to access
the -f[email] flag? In case it's important, I've included the portion of
the script that's trying to use the flag (look toward the middle of the
code snippet).
Thanks in advance for any ideas,
Matthew
####################
sub send {
my $self = shift;
my $command = $self->{_Sendmail};
if ($self->{_Sendmail} =~ /sendmail/) {
$self->{_From} =~ /([\w-]+\@[\w.-]+)/;
my $email = $1;
if ($self->{_UseCache}) {
$command .= " -odq";
}
if ($email) {
$command .= " -f $email";
}
}
# print "Content-Type: Text/Html\n\n";
# print "COMMAND: $command<P>\n";
open (MAIL, "| $command") || return undef;
print MAIL $self->_generate;
close (MAIL);