11-27-2004
Process mail using cron
I am looking for information on how to process mail using a cron job. The email server is a hosted ISP, so I simply have a POP connection to the mailbox.
Specifically, I want to fire a cron job at {x} time and have pine, mail, mailx, or some other suitable mail client utility process the current POP mail inbox.
Part A is my desire to automatically search for and move some log files to a specific file/folder by grepping out part of the subject line.
Part B might be solved better with some spam filtering tool, but I want to automatically delete "spam" email from the mailbox on a scheduled basis. I will be using a "friends" list to filter out any mail domain not specifically authorized to send email to this account.
So, can anyone point me in the direction of how to read / process the mail box using something like mailx in a script such that I can accomplish A & B above.
Thanks,
CM
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
I am new to this forum as well as new to shell scripting.
I have a problem here and i need someone to solve this.
Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument .
There is a... (1 Reply)
Discussion started by: Prince89
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I wrote a script which generates a mail automatically under certain condition. When i execute the script manually in unix the script is getting executed and the condition works accordingly and the mail is also generated. But when it is pu into cron the mail is not generated and the... (4 Replies)
Discussion started by: thiru_cs
4 Replies
3. Solaris
Hello All,
In SunOS 10, I have some cron jobs and it is running fine but the cron job outputs are not mailing to any acount of the system.
In other OS, we have option like MAILTO variable or /dev/null to disable but in Sun I have no idea how it is disabled by default and how do I... (13 Replies)
Discussion started by: Tlogine
13 Replies
4. Shell Programming and Scripting
I have written a number of shell scripts which I have added to cron to run on an Apple Xserve running MAc OS Server 10.4.11.
Recently I configured postfix to use one of my company's email servers as a relay so that it can send out statistics about the number of jobs my shell scripts have... (2 Replies)
Discussion started by: buzzs4w
2 Replies
5. Shell Programming and Scripting
Hello all,
I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted.
Thanks in advance
Regards,
pradeep kulkarni.
:mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies
6. Solaris
Hi All,
My current version is 5.10 Generic_127127-11,
I'm not getting mails after cron for single os user
where as for others users im getting mail after cron.
i've not found any mail file in /var/mail for that particular user, and i have created a new mail file. but no luck
please... (1 Reply)
Discussion started by: adeel_dba
1 Replies
7. Shell Programming and Scripting
Hi,
I am new to this mail concept and cran jobs,i have given with a task to send a mail for every one hour from unix to my outlook by checking some sanitry checks kindly look the below queires and help me in this
1.)How to send a mail from unix box to outlook.
2.)I assigned to check a... (4 Replies)
Discussion started by: thelakbe
4 Replies
8. Shell Programming and Scripting
i have just installed a cron job to run at 3 in the morning once a week. It's difficult for me to test if it works because the email backup program takes the email service down before running the backup. I wondered if i could ask you gurus if this would work?
0 3 * * 0 ... (1 Reply)
Discussion started by: timgolding
1 Replies
9. Shell Programming and Scripting
Hi All,
i Have An Script Which is Fetching Data From DB And sending Mail With the Data in Excel Format.
i'm Receiving Mail with Attachment when i Manually Running the script using ksh -x Scriptname or ./ Scriptname.
when i try to run it through cron i'm receiving mail only but ... (7 Replies)
Discussion started by: naveen1.kumar
7 Replies
LEARN ABOUT DEBIAN
apticron
apticron(1) General Commands Manual apticron(1)
NAME
apticron - Generate a mail listing packages which are pending an upgrade
SYNOPSIS
apticron [--cron]
DESCRIPTION
apticron is a shell script which generates a mail with a list of all packages currently pending an upgrade, as well as summary of changes -
using apt-listchanges - to a configurable Email address.
apticron is mainly intended for automatic notification of pending security updates but can also be used in many other situations where
timely updates are necessary.
The --cron option is only meant to be used when invoked by cron in order to run no more than once a day.
FILES
/etc/apticron/apticron.conf
Configuration file, Email address to mail and profile for use with apt-listchanges are configurable.
/etc/cron.d/apticron
Cron job for executing apticron daily.
/etc/cron.daily/apticron
Fallback cron script for executing apticron (if no crond running or system down at designated time).
/var/lib/misc/apticron.cron
Time stamp file used by apticron when invoked with --cron option.
SEE ALSO
apt-get(8), apt-listchanges(1), cron(8)
AUTHOR
Apticron was initially developed by Colm MacCarthaigh <colm.maccarthaigh@heanet.ie> with contributions from Marc Sherman <msherman@projec-
tile.ca>. Since 2006 it is maintained and improved by Tiago Bortoletto Vaz <tiago@debian.org>.
apticron(1)