SUMMARY: Using pipe channel to reach an external program in JESMS

From: Aaron Taylor <kusoneko_at_gmail.com>
Date: Sun Jun 19 2005 - 15:24:11 EDT
I got two good suggestions.

First, from Rich Bishop to define the program with the "imsimta
program" command. I had already done that but forgot to mention it in
my email. It is a necessary step in the process.

Second, I revieved a suggestion from Derek Diget to post this on the
Info-iMS mailing list that deals exclusively with Sun's Messaging
Server. They're located at ims.balius.com. I posted it there and
received a suggestion from Chad Stewart to create a home directory for
the user that the mail daemon is running as(mailsrv by default) and to
give it the appropriate permissions. I did that and the script runs
successfully now.

Many thanks to the people that responded. This is a great list!

Thanks,
     -Aaron Taylor



On 6/16/05, Aaron Taylor <kusoneko@gmail.com> wrote:
> Hi,
>
> I've got a configured mail server that's about ready to go live. All I
> still have to do is get it finished is have incoming mail to a certain
> account be passed off to a script.
>
> I've followed the instructions I could find, but when I send a test
> mail to the account, the script doesn't get called. If I log in as the
> user, I find the mail in the Inbox. I've detailed the process below.
>
> First, I put the file in /opt/SUNWmsgsr/data/site-programs. It's
> called lead_parse. I changed it to 777 for permissions for the purpose
> of testing.
>
> >>>>>
> bash-2.05# ls -lha
> total 22
> drwxr-xr-x   2 mailsrv  mailsrv      512 Jun 15 16:23 .
> drwxr-xr-x  15 root     other        512 May 18 12:23 ..
> -rwxrwxrwx   1 root     other        132 Jun 16 09:20 lead_parse
> -rwxr-xr-x   1 root     other       7.7K Jun 15 16:23 lead_parse.bak
>
> bash-2.05# pwd
> /opt/SUNWmsgsr/data/site-programs
>
> bash-2.05# more lead_parse
> #!/usr/bin/perl
> my @dat = <>;
> open(OUTPUTFILE, "> /tmp/output.file") or die "$!";
> print OUTPUTFILE "lead_parse ran";
> close(OUTPUTFILE);
> >>>>>
>
> The user account I am dealing with is "admission". The details of it
> at below. I did set the maildeliveryoption and mailprogramdeliveryinfo
> options.
>
> >>>>>
> bash-2.05# ./commadmin user search -l admission
> OK
> dn: uid=admission,ou=People,o=crowncollege.edu,dc=crowncollege,dc=edu
> objectclass: userpresenceprofile
> objectclass: top
> objectclass: iplanet-am-managed-person
> objectclass: iplanet-am-user-service
> objectclass: inetadmin
> objectclass: organizationalperson
> objectclass: person
> objectclass: inetuser
> objectclass: inetlocalmailrecipient
> objectclass: iplanetpreferences
> objectclass: ipuser
> objectclass: inetorgperson
> objectclass: inetsubscriber
> objectclass: inetmailuser
> uid: admission
> mail: admission@crowncollege.edu
> givenname: Admission
> mailuserstatus: active
> mailprogramdeliveryinfo: lead_parse
> sn: Account
> cn: Admission Account
> maildeliveryoption: mailbox
> maildeliveryoption: program
> nswmextendeduserprefs: meDraftFolder=Drafts
> nswmextendeduserprefs: meTrashFolder=Trash
> nswmextendeduserprefs: meSentFolder=Sent
> nswmextendeduserprefs: meInitialized=true
> mailhost: mail.crowncollege.edu
> paburi:
ldap://mail.crowncollege.edu:389/ou=admission,ou=People,o=crowncollege.edu,dc
=crowncollege,dc=edu,o=pab
> inetuserstatus: Active
> >>>>>
>
> I can see that there are two maildeliveryoption's listed. I tried to
> delete the mailbox entry but I get an error
>
> >>>>>
> bash-2.05# ./commadmin user modify -l admission -A
\\-maildeliveryoption:mailbox
> FAIL
> com.iplanet.am.sdk.AMException: Data validation failed service
UserMailService
> >>>>>
>
> If I run the script by hand, it waits until it receives and EOF and
> then I can see the sample line I'm having it put in the file for
> testing. I can't find in a log anywhere where this is failing. Does
> anyone have any ideas? It looks like the mail service isn't calling
> the script at all when mail comes in, just delivering it to the
> mailbox.
>
> Also, if the script returns 0, according to the docs, the message
> should be deqeued and not appear in the Inbox. Is that correct?
>
> Help is very much appreciated and I will summarize back to the list
> once I get this solved.
>
> --
> Thanks,
>    -Aaron Taylor
>


--
Thanks,
   -Aaron Taylor
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Sun Jun 19 15:24:41 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:48 EST