Sendmail error piping to RT alias

RT is up and running fine, working via SSL, and I can create tickets fine
via the web GUI. However the problem lies in creating a ticket via email.
I’ve exhausted the RT wiki, the mailing list archives, and a few other unix
forums looking for an answer.

I am using RT 3.6.7, running on Solaris 10. (SunOS HOSTNAME 5.10
Generic_127111-11 sun4u sparc SUNW,Sun-Fire-V215). I am using Apache
1.3.27. MySQL 5.0.51a, FastCGI 2.4.6, OpenSSL 0.9.7g, Sendmail v. 8.13.8,
and Perl 5.8.4.

I send mail via the command line:

“sendmail -v General” (General is the name of an alias in /etc/mail/aliases,
newaliases has been run also)

sendmail -v General

Test
Test
Test
.
General… Connecting to [127.0.0.1] via relay…
220 vpd1tst1no ESMTP Sendmail 8.13.8+Sun/8.13.8; Thu, 21 Aug 2008 16:00:01
-0600 (MDT)

EHLO vpd1tst1no
250-vpd1tst1no Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
VERB
250 2.0.0 Verbose mode
MAIL From:user@vpd1tst1no SIZE=15
250 2.1.0 user@vpd1tst1no… Sender ok
RCPT To:General@vpd1tst1no
DATA
050 General@vpd1tst1no… aliased to
“|/usr/local/rt3/bin/rt-mailgate --queue General --action
correspond --url https://localhost/
250 2.1.5 General@vpd1tst1no… Recipient ok
354 Enter mail, end with “.” on a line by itself
.
050 “|/usr/local/rt3/bin/rt-mailgate --queue General --action
correspond --url https://localhost/”… Connecting to prog…
250 2.0.0 m7LM01Am008272 Message accepted for delivery
General… Sent (m7LM01Am008272 Message accepted for delivery)
Closing connection to [127.0.0.1]
QUIT
221 2.0.0 vpd1tst1no closing connection

and the mail doesn’t get piped to RT. /var/adm/messages shows:

Aug 21 14:26:16 vpd1tst1no sm-mta[8091]: [ID 801593 mail.info]
m7LKQGhW008090: Warning: program /usr/lib/smrsh unsafe: No such file or
directory
Aug 21 14:26:16 vpd1tst1no last message repeated 1 time
Aug 21 14:26:16 vpd1tst1no sm-mta[8091]: [ID 801593 mail.crit]
m7LKQGhW008090: SYSERR(root): Cannot exec /usr/lib/smrsh : No such file or
directory
Aug 21 14:26:16 vpd1tst1no last message repeated 1 time

Now I understand sendmail uses its restricted shell when an alias instructs
it to pipe to a program. Sendmail is configured to use smrsh, and I have
placed a symlink and/or copy of rt-mailgate in /var/adm/sm.bin…([ z a z z
y b o b . c o m ] FEATURE(smrsh', /usr/lib/smrsh’)dnlhttp://www.zazzybob.com/smrsh.html)
which is sendmail’s authorized programs directory. But still the above error
occurs.

I’ve reconfigured sendmail.cf to use /bin/bash and /sbin/sh instead of
/usr/lib/smrsh instead, without success. Permissions on smrsh look okay as
far as I know. I still get the same result…just now with the different
shell reference:

Aug 21 15:41:46 vpd1tst1no sm-mta[8214]: [ID 801593 mail.info]
m7IHPmSJ005195: to=“|/usr/local/rt3/bin/rt-mailgate --queue
‘General’ --action correspond --url https://localhost/”,
ctladdr=General@vpd1tst1no (1/0), delay=3+04:15:58, xdelay=00:00:00,
mailer=prog, pri=14340349, dsn=4.0.0, stat=Operating system error
Aug 21 15:41:46 vpd1tst1no last message repeated 1 time
Aug 21 15:41:46 vpd1tst1no sm-mta[8238]: [ID 801593 mail.info]
m7IHG1OT005170: Warning: program /sbin/sh unsafe: No such file or directory
Aug 21 15:41:46 vpd1tst1no last message repeated 1 time
Aug 21 15:41:46 vpd1tst1no sm-mta[8238]: [ID 801593 mail.crit]
m7IHG1OT005170: SYSERR(root): Cannot exec /sbin/sh : No such file or
directory
Aug 21 15:41:46 vpd1tst1no last message repeated 1 time
Aug 21 15:41:46 vpd1tst1no sm-mta[8214]: [ID 801593 mail.info]
m7IHG1OT005170: to=“|/usr/local/rt3/bin/rt-mailgate --queue
‘General’ --action correspond --url https://localhost/”,
ctladdr=General@vpd1tst1no (1/0), delay=3+04:25:45, xdelay=00:00:00,
mailer=prog, pri=14430344, dsn=4.0.0, stat=Operating system error
Aug 21 15:41:46 vpd1tst1no last message repeated 1 time

Also, I removed all references and copies of rt-mailgate from the
/var/adm/sm.bin dir, just to see if smrsh or sh actually makes it to the
check of that dir, and it does not give me any errors relating to rejecting
rt-mailgate because its not in the proper dir.

(That error is usually: smrsh: /var/adm/sm.bin/rt-mailgate: not found)

It seems it’s an error before any of that happens. I’ve checked my $PATH to
make sure it can find /bin/sh or /bin/bash (even though its pretty hard to
miss those)… and I’m out of ideas. /etc/mail/aliases is configued as so:

General: “|/usr/local/rt3/bin/rt-mailgate
–queue General --action correspond
–url https://localhost/

general-comment: “/usr/local/rt3/bin/rt-mailgate
–queue general --action comment |
–url https://localhost/

I am able to send mail locally via sendmail, but can’t get it to pipe to RT
properly. This may be a sendmail configuration problem, but I cannot tell
for sure. All shells do infact exist in /sbin/sh, /bin/bash,
/usr/lib/smrsh. Am I missing any system variables?

Any ideas team? I’m absolutely stumped.

Any feedback would be greatly appreciated. Thanks!