Solved

Configuring Sendmail in Solaris for viewing incoming mails

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

816 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

11 Experts available now in Live!

Get 1:1 Help Now