Sponsored Content
Full Discussion: Need to check POP3 email
Top Forums Shell Programming and Scripting Need to check POP3 email Post 302479034 by ghorkov on Thursday 9th of December 2010 01:32:23 PM
Old 12-09-2010
Need to check POP3 email

Hey there!

I have this problem: i'm in need to check the subject from e-mails from some generic account. This subjects are used as parameters for some program.
The thing is, i can do the second, but not the first. I don't know how to handle POP3 accounts from shell. Is there an application that could use this kind of email accounts, or some configuration to replace the common shell mail account (that one which is managed by the command "mail" and the messages are saved in the /var/mail) for a POP3 one?

Thanks in advance!

And sorry for my bad english!
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

HELP: check if website is on, if not email

if {ping -c 1 www || { "Destination Host Unreachable" ; }} then { echo "neveikia senas-pastas, web serveris" | mailx -s "Senas web serveris" mail } endif; this is my script but it does not work... :confused: this script will be used to check if website is online if not then sends an... (7 Replies)
Discussion started by: big_nobody
7 Replies

2. Shell Programming and Scripting

how to check body of the email

Dears, i have user called dellsh i hope to make this script when this user recieve email check the budy of the email about (StatusRequest) when i find this email contain this subject run crontab do this job (create file in my home directory called index) thanks for your attention (1 Reply)
Discussion started by: dellsh
1 Replies

3. Shell Programming and Scripting

perl check email script not seeing attachment

The following script does pull the sender and Subject of the email but it is not seeing the attachment name. I know there is an attachment. I line in red SHOULD pull the filename out. this line is in the message: Content-Disposition: attachment; filename="Picture 243.jpg" ... (1 Reply)
Discussion started by: Ikon
1 Replies

4. Shell Programming and Scripting

Check email and download attachment

Hi, I had search the web for a script to download email, but failed to found one. I need a bash or perl script that will check for email originating from an address such as john@rambo.com and download the .zip attachment into a specified folder. Anyone could assist or give me some... (1 Reply)
Discussion started by: mynullvoid
1 Replies

5. Shell Programming and Scripting

Check Date Format And Email Out

Hello All, I have a requirement where i need to get the EXTRACT_DATE from a file and check if the date is of valid format or not and then mail it if it is not valid. Appreciate if you can help me with this. I did the following so far. awk '{for(i=1;i++<=NF;)if($i~/^EXTRACT_DATE/) print $i}'... (11 Replies)
Discussion started by: Ariean
11 Replies

6. Shell Programming and Scripting

Help....script check status if see something then send email

autorep -m bogus Machine Name Max Load Current Load Factor O/S Status ___________ ________ ___________ ______ ________ ______ bogus --- --- 1.00 Sys Agent Online Status ______ Online Offline Missing Unqualified The "Status" always "Online". I like create a script execute run... (6 Replies)
Discussion started by: dotran
6 Replies

7. UNIX for Dummies Questions & Answers

Download email with pop3 commands

Hi! i have bash script in witch I connect to my gmail account with openssl s_client -connect pop.gmail.com:995 then using pop 3 command I view my emails (with retr ). But problem is I don't find sollution to how I can write output of command to a file when using retr. Command logsave doesn't... (1 Reply)
Discussion started by: Akyloji
1 Replies

8. Shell Programming and Scripting

Check Directory for files & Email

I'm working on a bash script to move files from one location, to two. The first part of my challenge is intended to check a particular directory for contents (e.g. files or other items in it), if files exists, then send the list of names to a txt file and email me the text file. If files do not... (4 Replies)
Discussion started by: Nvizn
4 Replies

9. Shell Programming and Scripting

Check email successful sent and receive

We have a unix/linux server , that send mass email from it , the emails will pass the smtp gateway , email server and sent to the client , but sometimes the client do not receive the mail , we do not know the reason and when it will happen . We would like to have a script that check when the... (2 Replies)
Discussion started by: ust4
2 Replies
MAILCHECK(1)						      General Commands Manual						      MAILCHECK(1)

NAME
mailcheck - Check multiple mailboxes and/or Maildirs for new mail SYNOPSIS
mailcheck [-lbcsh] [-f rcfile] DESCRIPTION
mailcheck is a simple, configurable tool that allows multiple mailboxes to be checked for the existence of mail. For local mail, it sup- ports both the traditional mbox format and the newer Maildir format. Mail can also be checked for on remote servers using either the POP3 or IMAP protocol. Typically, one would invoke mailcheck in /etc/profile or a user-specific login script. E-mail junkies may also find it useful to invoke mailcheck occasionally to check for new mail in alternate mailboxes. The author uses mailcheck to keep track of messages arriving in mailboxes corresponding to several mailing lists he subscribes to. OPTIONS
-l Runs mailcheck in login mode. If a ~/.hushlogin file exists, mailcheck will exit silently. This option is intended to be used on systems that invoke mailcheck from a global login script such as /etc/profile. -b Brief mode. Produces less verbose output. If mailbox or Maildir is inside user's home direcory, only relative path is printed to output. -c Use more advanced counting method. While counting mails, mailcheck looks inside mboxes and Maildirs and count new and unread mes- sages separately. If mbox/maildir does not contain any new or unread mail, it's excluded from report. Produced output contains more valuable information, but this method is more time-consuming. -s Print "no mail" summary. If no new mail message is found, print at least "no mail message" at the end. Only makes sense in combi- nation with -c. -f Specify alternative rc file location. If provided, default locations (see FILES) are not checked. -h Print short usage information. CONFIGURATION
Configuring mailcheck is simple. Upon startup, mailcheck looks for a file called .mailcheckrc in the user's home directory. If that file does not exist, the default configuration file /etc/mailcheckrc is used instead. Lines beginning with a hash sign (#) are treated as comments and will not be processed. Lines beginning with pop3: or imap: are parsed like URLs and used to connect to network mail servers. All other lines are treated as pathnames to mailbox files or Maildir directories. Environment variables in the format $(NAME) will be expanded inline. For example: /var/spool/mail/$(USER) Will check the user's mailbox in /var/spool/mail. $(HOME)/Mailbox Will check the default mailbox used by qmail installations. When connecting to POP3 or IMAP servers, the account password is not stored in the mailcheckrc file. Instead, the .netrc file in the user's home directory is used. This file, originally intended for use with ftp(1) and later used by fetchmail(1), should be readable only by the user owning it. It stores server/user/password combinations in the form: machine servername login username password password FILES
/etc/mailcheckrc This is the site-default mailcheck configuration file. It should be edited by the system administrator to meet the needs of most users on the system. ~/.mailcheckrc This is the user-specific mailcheck configuration file. If it exists for a particular user, the site-default configuration file will not be used. ~/.netrc This tells mailcheck what password to use for a given server/user combination when checking POP3 or IMAP mail. COPYRIGHT
Copyright (C) 1996, 1997, 1998, 2001, Jefferson E. Noxon. Portions Copyright (C) 1996, Free Software Foundation, Inc. Portions Copyright (C) 1996, Gordon Matzigkeit. Portions Copyright (C) 1998, Trent Piepho. Other copyrights may apply. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. On Debian GNU/Linux see /usr/share/common-licenses/GPL AUTHOR
Mailcheck was written for Debian GNU/Linux by Jefferson E. Noxon <jeff@planetfall.com>. ACKNOWLEDGEMENTS
POP3 and IMAP support was added by Rob Funk <rfunk@funknet.net>. Several enhancements by Tomas Hoger <thoger@pobox.sk>. BUGS
It is probably not a good idea to store passwords in a .netrc file. No SSL/TLS support for POP3 and IMAP. SEE ALSO
netrc(5), mbox(5), maildir(5), login(1), fetchmail(1) 2 July 2005 MAILCHECK(1)
All times are GMT -4. The time now is 07:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy