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
Solved

Configuring Sendmail in Solaris for viewing incoming mails

Posted on 2004-10-05
6
340 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
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 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.

856 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