Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello
,
I'm trying to create a small program to look at my isp and pull down the messages into individual text files. This is just a read only setup. I need to pull down the message and kill it on the server.
I'm stuck here. I have experimented with a for string but it always fails. I was trying to use date-time and the text file name and end with a .txt. I could read and delete them.
Hello
,
I'm trying to create a small program to look at my isp and pull down the messages into individual text files. This is just a read only setup. I need to pull down the message and kill it on the server.
I'm stuck here. I have experimented with a for string but it always fails. I was trying to use date-time and the text file name and end with a .txt. I could read and delete them.
If I use fetchmail Then I have to use postfix or dovecot or sendmail correct ? I was trying to get arround that by just running a script that I can use on any of my machines at home or work to view my outstanding messages that I may have. one of the reasons for not deleting them from the server.
I just want to create individual emails txt files for each message. I can read and then delete them. All without having to load up software on a machine.
here is the older version of the same code. This has the for statement that doesn't work. I tried mixed versions but I only seem to get one file and its all the messages in one. The other bug is trying to run a loop based on the STAT number of messages.
sleep 2
echo USER $username
sleep 1
echo PASS $password
sleep 2
echo STAT
sleep 1
#echo RETR 1
#
for i in $(seq 1 10); do echo "RETR $i">mail.txt | sleep 2 | mv mail.txt /home/otg1017/Mail/`date '+%Y%m%d-%T'`.txt ; done
sleep 2
echo QUIT
This is the command line used
# $ ./getmail.sh | telnet mail.vabb.com 110
# I have also tried this method too.
# remove everything from >mail.txt on and use it on the outside. This only seems to give me 1 file.
# $ ./getmail.sh | telnet mail.vabb.com 110 >mail.txt | sleep 2 | mv mail.txt /home/otg1017/Mail/`date '+%Y%m%d-%T'`.txt
If I use fetchmail Then I have to use postfix or dovecot or sendmail correct ?
Wrong. Fetchmail is a client application which fetches e-mail from a pop3/imap account. It doesn't need any postfix or dovecot or sendmail because these are all server applications which are running on the server.
The idea wqas a simple program that I could put on a system and run it to collect what mail messages I have. not to respond to them. I have linux and uniz boxes both at work and at home. If I knew I was expecting an important message I could run it real quick and look thru the messages for hopefully the one that I was expecting.
I can't get away with installing packages on all these machines. I was trying to come up with a very simple solution.
Run a batch file that creates a series of text files for me to look at and then remove. but never removing them from the server until I get home.
These machines dont have wgui's they are all CLI so I can browse my mail
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.