?
Solved

Configuring Sendmail in Solaris for viewing incoming mails

Posted on 2004-10-05
6
Medium Priority
?
345 Views
Last Modified: 2013-12-27
Configuring Sendmail in Solaris
We have to write a Java program to read Emails from a solaris box that is configured with send mail.
Do We need to setup pop3 on this box (if yes does anyone have any documents on this?)
0
Comment
Question by:hn9636
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 34

Expert Comment

by:PsiCop
ID: 12229425
sendmail and pop3 are not related.

sendmail is Message Transfer Agent (MTA). Its job is to get E-Mail from point A to point B. It does not provide an interface to retrieve E-Mail from a mailbox.

POP3 is a mailbox access protocol. It is designed to allow a client to access E-Mail in a mailbox.

If your intention is to have E-mail enter a mailbox and a Java program read that mailbox and act upon those messages, then sendmail is not really involved. The only role that sendmail has in that situation is to accept the E-mails from wherever and to hand them off to a Local Delivery Agent (LDA), such as mail or ProcMail.

To achieve what you want, you need to run a POP or IMAP server daemon on that box as well. Personally, I prefer IMAP, as it gives you more control. But POP can do just as well in your situation. Both sorts of daemons are included with the PINE E-Mail package from University of Washington. There is also the popular Cyrus IMAP daemon.

Frankly, I think you're going about this a bit clumsily. Sure, it'll work, but why not simply have sendmail hand the E-Mail directly to the Java program, using mailertable or perhaps a Milter interface? Why bother having the E-Mail delivered to a local mailbox and running another daemon to facilitate the Java program getting the E-Mail?
0
 

Author Comment

by:hn9636
ID: 12229710
Thanks for your response,
   Could you please let me know how mailertable a Milter interface can be used
  I really appreciate if you have any code or where I can start.
Thanks
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 12236332
These are really complex subjects, especially the MILTER interface. I recommend that you step down to your fave local bookstore and grad a copy of the O'reilly text _Sendmail_3rd_edition_ by Brian Costales, ISBN 1-56592-839-3. This is a detailed reference on sendmail and how it works - its also a large book that will take some time to absorb, so don't be intimidated.

Another way to get the E-Mail into the hands of the Java program would be to use an alias. In /etc/mail/aliases, put in something like this:

program: "|/path/to/some/program"

This will tell sendmail that when E-Mail arrives for "program@yourdomain.com", it should be piped to your program. The popular mailing list management software Majordomo works like this. Your program must. of course, be constructed to use this, and I'm not sure if a Java program can - I'm not a Java programmer.
0
 
LVL 2

Expert Comment

by:Matt_Avery
ID: 12257019
I'm not sure exactly what the question means...

Do you mean

1. "our e-mail is delivered to a Solaris box, and I want to run a java application on a different box and look at my e-mail"?

If so, then yes, the best way would probably be to install a POP3 server on the solaris box and turn your java app into a bog standard POP3 e-mail client.

or 2. "our e-mail is delivered to a Solaris box, and I want to run a java application on the Solaris box to read my e-mail"?

In that case, you don't need to do anything. Sendmail is configured by default to deliver mail to /var/mail, so write a program to look in that directory.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12581888
PAQed with no points refunded (of 125)

modulo
Community Support Moderator
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question