Rt2 mailgate causes Perl "require" errors, tho ticket gets entered

This smells like a bad perl module installation on my part, but I
can’t find the source of the area. I’ve configured a qmail per the
installation instructions, e.g., ~alias/.qmail-sna-support contains:

| /var/qmail/bin/preline /usr/local/rt2/bin/rt-mailgate --queue sna --action correspond

When I submit via this alias, the ticket does get created, but qmail
logs an error generated by something Perl’s trying to do:

@400000003c73bad12cb050b4 delivery 582: success: syntax_error_at_(eval_46)line_1,near"require_Mail::Mailer::/var/"/syntax_error_at(eval_60)_line_1,near"require_Mail::Mailer::/var/"/did_0+0+1/

Piping a message from a file to mailgate generates a similar error:

cshenton@Palimpsest(255> cat /tmp/rtmail |/usr/local/rt2/bin/rt-mailgate --queue sna --action correspond
syntax error at (eval 46) line 1, near "require Mail::Mailer::/var/"
syntax error at (eval 60) line 1, near “require Mail::Mailer::/var/”

I’ve grepped for this code snippet in all the places I can think of:

/usr/local/rt2
/usr/libdata/perl [FreeBSD’s core library install dir]
/usr/local/lib/perl5 [optionally-installed modules]

but I can’t find where this is coming from. I have a suspiscioin it’s
not occurring on the submit, but rather when RT tries to send out an
email notice, but I’m a newbie to RT and not sure what it’s supposed
to be doing.

Any suggestions on how to debug this and track down the source of the
error? What’s this error causing to fail if the ticket is getting
entered?

Thanks.

cshenton@Palimpsest(255> cat /tmp/rtmail |/usr/local/rt2/bin/rt-mailgate --queue sna --action correspond
syntax error at (eval 46) line 1, near “require Mail::Mailer::/var/”
syntax error at (eval 60) line 1, near “require Mail::Mailer::/var/”

You have ‘/var/’ in your RT config.pm somewhere, possible as part of
$MailCommand or $SendmailArguments.

You won’t find a grep match in your source, as RT::Action::Sendmail is
sending it as $MIMEObj->send($RT::MailCommand in the Commit().

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

syntax error at (eval 60) line 1, near “require Mail::Mailer::/var/”

Bruce Campbell bruce_campbell@ripe.net writes:

You have ‘/var/’ in your RT config.pm somewhere, possible as part of
$MailCommand or $SendmailArguments.

That’s it! I’m using qmail and figured I had to specify the path to
it’s “sendmail wrapper”:

$MailCommand = '/var/qmail/bin/sendmail';

But I was concerned that it without the full path, it would find the
olde, stock sendmail. So how do I specify the path to the wrapper in
/var/qmail/bin/sendmail? Later in the config.pm, it says:

# !! If you did not # select 'sendmailpipe' above, this has no effect!!
$SendmailPath = "/usr/sbin/sendmail";

And since I’m not using sendmailpipe I can’t change it here.

Sorry if I’m being dense, I’m just not clear on this.

Thanks!

syntax error at (eval 60) line 1, near “require Mail::Mailer::/var/”

Bruce Campbell bruce_campbell@ripe.net writes:

You have ‘/var/’ in your RT config.pm somewhere, possible as part of
$MailCommand or $SendmailArguments.

That’s it! I’m using qmail and figured I had to specify the path to
it’s “sendmail wrapper”:

$MailCommand = '/var/qmail/bin/sendmail';

But I was concerned that it without the full path, it would find the
olde, stock sendmail. So how do I specify the path to the wrapper in
/var/qmail/bin/sendmail? Later in the config.pm, it says:

# !! If you did not # select 'sendmailpipe' above, this has no effect!!
$SendmailPath = "/usr/sbin/sendmail";

And since I’m not using sendmailpipe I can’t change it here.

Sorry if I’m being dense, I’m just not clear on this.

Ok, up goes RT’s hood again. The quick answer is to use sendmailpipe in
$MailCommand, and ensure that $SendmailPath points to qmail’s sendmail
interface (I’m no longer a qmail guru, so I’ll point you to
www.fsck.com/rtfm/ for you search for ‘qmail’)

When you send as ‘sendmail’, you are invoking Mail::Mailer. A perldoc on
this will show you PERL_MAILERS which you could conceivably put in RT’s
config.pm ( $ENV{PERL_MAILERS} = examples there ) if your install of
Mail::Mailer doesn’t know about the Qmail installation.

The easiest is possibly symbolic linking the common locations of the
sendmail binary (/usr/{lib,sbin}/sendmail) to /var/qmail/bin/sendmail .

Since you’re from Nasa, could you redo the April 4 launch to that weekend?
I’d hate to miss out on seeing it :wink:

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations