Using pipe channel to reach an external program in JESMS

From: Aaron Taylor (kusoneko@gmail.com)
Date: Thu Jun 16 2005 - 13:37:45 EDT


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
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:30:55 EDT