Solved

Configuring Sendmail in Solaris for viewing incoming mails

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
linux  centos   virtualization network quetion 6 84
Linux : can't create transaction lock error 1 86
spectrum scale snapshot  resotre/mount 1 34
lunix and unix command 21 120
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 …
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…
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…
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…

733 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