Messaging
cancel
Showing results for 
Search instead for 
Did you mean: 

third party message delivery agent with sendmail

Jay Cantwell
Regular Advisor

third party message delivery agent with sendmail

My Oracle DBA wishes to read attachments received in sendmail programmatically. In other words when a message is

received in sendmail with attachments she would like a message delivery agent so she can used the data to feed into other programs and files. Anyone know how this can be done without her having to do a bunch of scripting?

1 REPLY
Matti_Kurkela
Honored Contributor

Re: third party message delivery agent with sendmail

"procmail" is an old regexp-based utility for processing emails automatically. It can be used to detect attachments in incoming emails and pass them to some script or command for further processing.

 

The configuration syntax of procmail is a bit gnarly (but not nearly as bad as sendmail.cf!), but it comes with a man page full of good examples (make sure your MANPATH includes /usr/local/man, then use "man procmailex" after installing):

http://hpux.connect.org.uk/hppd/hpux/Networking/Mail/procmail-3.22/

 

One of these utilities might be useful for extracting the attachments from the incoming messages:

http://hpux.connect.org.uk/hppd/hpux/Networking/Mail/mudecode-1.0/  (this one seems to be out of date)

http://hpux.connect.org.uk/hppd/hpux/Networking/Mail/ripmime-1.4.0.10/

http://hpux.connect.org.uk/hppd/hpux/Users/mpack-1.6/

 

Personally, I once did something similar with procmail + the munpack utility from the mpack kit, but I think the ripmime package might be even better.

 

If you cannot (or don't want to) modify the sendmail configuration, you might be able to use the .forward file to call procmail (or maybe ripmime) for the processing of incoming emails. See the NOTES section in "man procmail" for details.

MK