Solved

Auto Telnet session to POP3 mail drop

Posted on 1998-04-01
2
286 Views
Last Modified: 2013-12-26
Hello:
I actually have two questions rolled into one situation.

I need to automate a telnet connection from a UNIX box to a POP3 compliant mail server.

Obviously, I need to pass a username:password pair to the Mail daemon.. but how?  Then I need to have the mail deamon send all messages to the UNIX box from which I'm invoking this capability.

I was hoping a meta-character coupled with the RETR command would work (RETR *)... but it does not. <duh>

Can anyone offer assistance?

Thanks.

0
Comment
Question by:xtian120897
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
seedy earned 120 total points
ID: 1296221
There is no straight forward shell script based solution
for this - atleast in my opinion.    The reason being
you cannot redirect input to commands like telent from normal
files are pipes - they do a lot of ioctl calls that fail on the
normal files.

You could write a small 'c' program that
  1. open pty (read man pages for more details)
  2. fork and exec telnet
  3. communicate to the telnet thru the pty
  4. send USER, PASS commands to the authenticate
  5. send RETR command to retrieve.

One more point, you cannot use RETR *.  You must sepcify
a message/mail number.  You normally would use LIST and then
RETR for the messages 'listed'.
Hope this helps.
-Seedy-
 
0
 
LVL 2

Expert Comment

by:seedy
ID: 1296222
Sorry, I lost the big picture here.  Your intention is to get
all the mails down to your UNIX box.  It is rather
easily done through making a socket connection than
through the 'pty' and telnet.
Cheers,
-Chellah-
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

705 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

12 Experts available now in Live!

Get 1:1 Help Now