Solved

Configuring Sendmail in Solaris for viewing incoming mails

Posted on 2004-10-05
6
332 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
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now