Sponsored Content
Full Discussion: mail from Cronjob
Top Forums UNIX for Advanced & Expert Users mail from Cronjob Post 31959 by roden on Friday 15th of November 2002 10:38:07 AM
Old 11-15-2002
The following sends email to a loguser with the output from the "command".


crontab entry for the user:
* * * * * /path/command 2>&1 | mail -s "command report rc=4?" logmaster

/etc/aliases file directing email to root at the local host:
logmaster: root@localhost

compile the aliases file with sendmail -bi
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cronjob

Please can someone help me. I need to set up a cron job to measure CPU usage, Disk I/O and memory usage over a period of 1 minute along with the number of users logged into the system. I also need to send it to another user besides myself every hour. Please can someone help me! Thanks. (4 Replies)
Discussion started by: gerwhelan
4 Replies

2. UNIX for Dummies Questions & Answers

mail problem (NOT Mail or Mail.app)

When I try to use the CLI mail, I get the following error. What's wrong? Welcome to Darwin! % mail root Subject: test test . EOT % /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory Do I just need to change the... (1 Reply)
Discussion started by: chenly
1 Replies

3. Shell Programming and Scripting

Cronjob - Redirect mail output to file, LINES & COLUMNS

I currently have an expect script that issues the 'mail' command and sends an 'x' when it receives the & prompt from mail to quit. The expect script is able to do stty rows 100 columns 200 < $spawn_out(slave,name) to set up the number of columns and rows. I would like to get rid of the expect... (0 Replies)
Discussion started by: jharvey
0 Replies

4. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

5. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

6. UNIX for Dummies Questions & Answers

how to cancel a cronjob if the cronjob still running

hi everyone I'm newbie in this forum hope I can get some help here :) I have a command in crontab that executed every 1 minute sometime this command need more than 1 minute to finish the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Discussion started by: 2j4h
7 Replies

7. Shell Programming and Scripting

Cronjob to notify by mail

I am planning some tasks that I need send mails regularly to my team members. I think to use cronjob with script to do it. Two init files are prepared, I can change the format if you ask for. name.txt: Bill bill@xxx.com Peter peter@xxx.com James james@xxx.com Tasks_list.txt ... (4 Replies)
Discussion started by: newoz
4 Replies

8. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

9. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies
ALIASES(5)							File Formats Manual							ALIASES(5)

NAME
aliases - aliases file for sendmail SYNOPSIS
aliases DESCRIPTION
This file describes user ID aliases used by sendmail. The file resides in /etc and is formatted as a series of lines of the form name: addr_1, addr_2, addr_3, . . . The name is the name to alias, and the addr_n are the aliases for that name. addr_n can be another alias, a local username, a local file- name, a command, an include file, or an external address. Local Username username The username must be available via getpwnam(3). Local Filename /path/name Messages are appended to the file specified by the full pathname (starting with a slash (/)) Command |command A command starts with a pipe symbol (|), it receives messages via standard input. Include File :include: /path/name The aliases in pathname are added to the aliases for name. E-Mail Address user@domain An e-mail address in RFC 822 format. Lines beginning with white space are continuation lines. Another way to continue lines is by placing a backslash directly before a new- line. Lines beginning with # are comments. Aliasing occurs only on local names. Loops can not occur, since no message will be sent to any person more than once. If an alias is found for name, sendmail then checks for an alias for owner-name. If it is found and the result of the lookup expands to a single address, the envelope sender address of the message is rewritten to that address. If it is found and the result expands to more than one address, the envelope sender address is changed to owner-name. After aliasing has been done, local and valid recipients who have a ``.forward'' file in their home directory have messages forwarded to the list of users defined in that file. This is only the raw data file; the actual aliasing information is placed into a binary format in the file /etc/aliases.db using the pro- gram newaliases(1). A newaliases command should be executed each time the aliases file is changed for the change to take effect. SEE ALSO
newaliases(1), dbm(3), dbopen(3), db_open(3), sendmail(8) SENDMAIL Installation and Operation Guide. SENDMAIL An Internetwork Mail Router. BUGS
If you have compiled sendmail with DBM support instead of NEWDB, you may have encountered problems in dbm(3) restricting a single alias to about 1000 bytes of information. You can get longer aliases by ``chaining''; that is, make the last name in the alias be a dummy name which is a continuation alias. HISTORY
The aliases file format appeared in 4.0BSD. $Date: 2004/07/12 05:39:21 $ ALIASES(5)
All times are GMT -4. The time now is 02:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy