Problems executing external program (not owner)

Hi!

When I try to run a mailman wrapper it generates the follow error message:

"Shell exited with status 1 (Not owner)" (extracted form mai.log_current file)

The user mta have a home directory well defined, with full access permissions. The script have the correct execution permissions.

Enabling the master_debug keyword in the pipe channel (imta.conf file), the output messages in the log file are:

17:35:51 PMDF initialized -- hostname is pipe-daemon

17:35:51 Pipe delivery channel (pipe) starting

17:35:51Deliveries will be done as user mta

17:35:51 Now processing /opt/SUNWmsgsr/data/queue/pipe/010/ZZf0e0z0Q~P23.00

17:35:51Envelope from is"XXXX@XXXX"

17:35:51Recipient:"postmaster-user%mailman_post@pipe-daemon" (originally"rfc822;YYYYY@YYYYY")

17:35:51Delivering message to"postmaster-user%mailman_post@pipe-daemon"

17:35:51Using program /opt/SUNWmsgsr/data/site-programs/mailman

17:35:51After substitution:"|/opt/SUNWmsgsr/data/site-programs/mailman post postmaster-user+mailman_post"

17:35:51Successfully parsed profile entry (1 recipients)

17:35:51Delivering to recipient via: |/opt/SUNWmsgsr/data/site-programs/mailman post postmaster-user+mailman_post (SHELL)

17:35:51Delivering to shell |/opt/SUNWmsgsr/data/site-programs/mailman post postmaster-user+mailman_post

17:35:51Shell delivery commencing

17:35:51 stdin set to /var/spool/mta/.li.nQaaLb

17:35:51 Substituting filename into command

17:35:51 Pipe command: /opt/SUNWmsgsr/data/site-programs/mailman post postmaster-user+mailman_post

17:35:51 Message copied

17:35:51 stdout set to /var/spool/mta/.lo.oQaaLb

17:35:51 Preparing file descriptorsfor execve()

17:35:51 Forking...

17:35:51Fork done, child pid 809

17:35:52 Shell execution complete, status 1

17:35:52Delivery status: BOUNCE (Shell exited with status 1 (Not owner))

17:35:52Completed delivery (BOUNCE)

17:35:52Calling PMDFrecipientDisposition (WHOLE: FAILED): 178028571

17:35:52.77: mm_return_bad_messages called.

17:35:52.77:Initializing MMfor submission.

17:35:52.77:Initializing message to be returned.

17:35:52.78:Format processing.

17:35:52.78: Address list processing.

17:35:52.78:Address list complete.

17:35:52.78:Copy message.

17:35:52.78:Finish submission.

17:35:52 No more messages, terminate processing

If I launch the Messaging Server using svcadm system, the problem always happen.

If I use the /opt/SUNWmsgsr/sbin/start-msg from the command line, the problem happens after some time and e-mails processed. Restarting the server works again, until the next crash :-s.

My Messaging Server version is:

Sun Java(tm) System Messaging Server 6.2-6.01 (built Apr 3 2006)

libimta.so 6.2-6.01 (built 11:20:35, Apr 3 2006)

running on a Sparc Solaris 10 box with the lastest recommended patches.

Thanks in advance for any idea to solve this problem

H.Molina

[3270 byte] By [h.molina] at [2007-11-26 10:09:44]
# 1
Who 'owns" the mailman program?It certainly appears your script is getting executed. Perhaps you might want to add some debugging to that script, or even have it "truss" itself.
jay_plesset at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 2

Hi,

Thanks for your reply.

The mailman script is owned by mta user (the same Messaging Server user).

It is not a script problem, because it works when I start the server from the command line, but fails after process several messages (not a fixed number).

Thanks in advance for the ideas.

H.Molina

hmolina at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 3
Is the failure the same?"not owner" can really only mean one thing. Something is being accessed by some process that's not the correct owner.The only successful way to start Messaging is as root. It should not matter if started by Console (running as root), or by command
jay_plesset at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 4

Hi!

Yeah, it is the same error in both cases.

The only difference is in the first case I start the server using:

svcadm enable sunonemsg (where sunonemsg is the SMF definition which invokes /opt/SUNWmsg/sbin/start-msg) and it never works

In the second case I use directly

/opt/SUNWmsg/sbin/start-msg, working for a few messages.

The user who invokes the both commands is root (the messaging owner and running user is mta)

I try with two wrapper versions: the first one a shell script, and the second one a perl script with the same results....

I was looking for several causes. I check the trusted directories using crle (/usr/lib/secure:/usr/opt/SUNWmsgsr/lib:/opt/SUNWmsgsr/lib). I change the mta's home directory permissions, changed to 777.

Maybe assigning an administrator profile to mta user? But can be a security hole.

Thanks for any help....

H.Molina

hmolina at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 5

I suspect that using "svcadm" to start Messaging wouild be unsupported.....

What happens when you run the script as the msg user? Does it work, then?

Messaging Server is definitely calling your script, but it's failing somewhere along the way. This isn't really a messaging server issue, but one of debugging your script.

Honestly, in the 6 years I've been supporting Messaging, I've rarely found any reason to use an external program. What is it you're using that for?

jay_plesset at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 6

I theory svc system will replace the /etc/rcX.d scripts.... The only advantage using this way is: the problems always happen, then I can solve them. Using the other way (executing directly start-msg), the problem is more hard to generate, and more more hard to debug.

I need to use the external program to use Mailman list distribution programs. The script is a wrapper to send the message to mailman program.

The wrapper works well until I installs a SunONE messaging patch, at the end of the last year.

Any idea to use truss only with pipe_master program? Maybe with this tool I can found which file or directory the process try to open and fails.

Or, maybe another way to use mailman with SunONE messaging?

Thanks for your help.

H.Molina

hmolina at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 7
I think Chad Stewart has a writeup on integrating mailman.Yep: http://ims.balius.com/resources/downloads/files/mailmanWrapper.plLooks like perl.
jay_plesset at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 8

Yeah,

I test with that script, and It fails too (when I try with a perl script was with that script.....)

I will try changing pipe_master for a script whom invokes truss....

Well, tomorrow will be a new day... (In europe is a midnight...)

Thanks a lot for your help! If I found a solution, I will post it.

H.Molina

hmolina at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 9

I use a perl wrapper for integrating mailman as well, but it is considerably simpler than Chad's. I based it on a script from Stephen Balukoff and updated it to work with newer versions of mailman. You can find info on Steve's site (http://www.balukoff.com/~stephen/mailman-on-sunone/) and my updated wrapper at http://www.stthom.edu/~neil/mailman-wrapper.pl. From what I remember, I never ran into any issues like yours, although the wrapper would not execute until mailsrv had a valid home directory. Other than that, I had very few problems. I'll try to dig up the documentation I wrote down while installing and see if any of it helps.

il_postino at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 10

Hi!

I test your script and Chad's script. But does not work. The user have home directory, is well configured, and if the process works when is launched from command line (for few messages).

I think it is not a script error. Looks like permision problem before execute the program....

Mmm, maybe permision in the TTY file?

I try to run truss, but can not execute setuid's programs like pipe_master...

Thanks again, and I will working in the problem

H.Molina

hmolina at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 11
Can you actually log in as the messaging user? shell and all?\You may end up wanting to open a support case....
jay_plesset at 2007-7-7 1:53:33 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...