PIPE channel in iMS

iMS 5.x – Setting up Program Delivery through the PIPE channel

The purpose of this article is so that you will be able to send email to an script or program like procmail and do something with it.

1. Make sure that your mailsrv user has a home directory that he can write to. /tmp will work just fine. The user does not need to have a valid shell, so /bin/false will work.

2. Write the program and put it in msg-/imta/programs directory.

In my case, I will be creating symbolic link to cat.

# cd msg-/imta/programs

# ln -s /usr/bin/cat cat

3. register cat into the MTA program list.

# ./imsimta program -a -p cat -m catter -g ‘>>/tmp/alton_mails’ -e user

4. list programs to see that your program is there:

#./imsimta program -l

==================================================

Method_name : catter

Program_name : /opt/iMS5.1/msg-goofy/imta/programs/cat

Argument_list : >>/tmp/alton_mails

Execute Permission : User

==================================================

5. add program delivery attributes to your user ldap entries:

mailprogramdeliveryinfo: catter

maildeliveryoption: program

6. execute “imsimta dirsync -F” if necessary.

7. run ./imsimta test -rewrite – you should see that it will send to the pipe channel.

Submitted address list:

ims-ms

program1@ims-ms-daemon (orig [email protected], inter [email protected], host ims-ms-daemon) *NOTIFY-FAILURES* *NOTIFY-DELAYS*

pipe

[email protected]-daemon (orig [email protected], inter [email protected], host catter.pipe-daemon) *NOTIFY-FAILURES* *NOTIFY-DELAYS*

8. Send mail to the user and test it!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.