Sponsored Content
Full Discussion: Sending email
Top Forums UNIX for Dummies Questions & Answers Sending email Post 62892 by RTM on Monday 21st of February 2005 09:56:36 AM
Old 02-21-2005
What happens to the mail? Check /var/adm/messages (or check your /etc/syslog.conf for where email errors are logged to - look for mail) for the errors if any.

% grep mail /etc/syslog.conf
daemon.none,cron.info,user.info,mail.none /var/logs/messages
kern.info,cron.info,auth.info,mail.none /var/logs/syslog
mail.info /var/logs/maillog

In this example, you would look for the messages in /var/logs/maillog - messages will look something like this:


Feb 21 09:50:43 console2 sendmail[12716]: j1LEodnO012713: to=<john.smith@mydomain.com>, delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=120356, relay=p00.mydomain.com. [172.16.1.35], dsn=2.0.0, stat=Sent (Ok.)
Feb 21 09:50:43 console2 sendmail[12718]: j1LEodnO012714: to=<john.doe@mydomain.com>, delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=120358, relay=p00.mydomain.com. [172.16.1.35], dsn=2.0.0, stat=Sent (Ok.)


Also, check to see if mail is still waiting to go out - use the mailq command - it may show why the email has not gone.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sending email

hi, is there any possiblity to send email from the command prompt, for eg i want to send alert to any mail id like /data/logs is 80% to my hotmail account , xxx@hotmail.com is this really possible,, if not, then what are the prerequistes need to do this (1 Reply)
Discussion started by: vasikaran
1 Replies

2. Programming

Sending email to a User from C++

How do i send a mail to User from c++? (1 Reply)
Discussion started by: debu
1 Replies

3. Shell Programming and Scripting

sending an attachment through email

As a part of requirement I need to send out mails with attachment from UNIX. I have to take query the Oracle DB and send the result of the query in an attachment through mail. I use the following script for the same. #!/bin/csh #!/bin/bash #!/bin/ksh ATTFILE=/folder1/test.xls cd... (1 Reply)
Discussion started by: Sgiri1
1 Replies

4. Shell Programming and Scripting

Sending Email with Attachment

Hi, I want to send an email with multiple attachment using uuencode and mail command. I am able to send with one attachment Ex:uuencode abc.txt abc.txt | mail test@test.com -s "Test3" Can anyone reply with syntax. Regards BS (3 Replies)
Discussion started by: balajiora
3 Replies

5. Linux

sending an email

I have used an already-built ActiveX control to send email from my asp web pages. One of the parameters I fill is FromName which defines the tittle the recipient will see in the From entrance in his Inbox. Now Iīm trying to use mail to send an email from a Shell but I havenīt found the... (1 Reply)
Discussion started by: RandomAccess
1 Replies

6. UNIX for Advanced & Expert Users

Sending email to different domain

Hi, I am looking for info based on direct experience in using DataStage EE with Unix. A scenario in the client remote desktop I work for company Switch, my client is Master. Notification Activity Stage (IBM Asential Data Stage component) SMTP Mail server name is blank. Sender... (1 Reply)
Discussion started by: dsnaveen
1 Replies

7. Shell Programming and Scripting

sending an email with attachment

Hi, Please help me in sending an e-mail with attachment through unix mailx command is not present in our unix box. (4 Replies)
Discussion started by: dudd9
4 Replies

8. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

9. Shell Programming and Scripting

Sending HTML Email

1) Can you please provide me with a best example of how to send an HTML email via mutt or mail or send email commands using bash shell. 2) I tried below but i am not able to get the variable values in the HTML email output. (cat <<-EOT <html> <head><title></title> </head> <body> <p>Hello,... (9 Replies)
Discussion started by: Ariean
9 Replies

10. Linux

Sending an email using mutt...

I wanted to send "config.log" to the usergroup that handles open source support for Octave 3.8.0, a programming language as there were build errors. In order to send an email from unix command line, I am trying to use mutt, and I need a straightforward way of sending emails, as the commands... (1 Reply)
Discussion started by: jon80
1 Replies
syslogd(8)						      System Manager's Manual							syslogd(8)

NAME
syslogd - Logs system messages SYNOPSIS
/usr/sbin/syslogd [-f config_file] [-m mark_interval] [-d] [-s] [-e] The syslogd daemon reads and logs messages to a set of files described in the /etc/syslog.conf configuration file. FLAGS
Specifies the size of the socket receive buffer. Specifies a path to an alternate configuration file. Specifies the mark_interval. Turns on the debugging feature. Specifies that events are to be posted to the Event Manager, EVM. Disables the posting of events to the con- sole. DESCRIPTION
Each message logged consists of one line. A message can contain a priority code, marked by a number in angle braces at the beginning of the line. Priorities are defined in the /usr/include/sys/syslog_pri.h file. The syslogd daemon reads from the domain socket /dev/log, from an Internet domain socket specified in /etc/services, and from the special device /dev/klog, which reads kernel messages. The syslogd daemon configures when it starts up and when it receives a hangup (SIGHUP) signal. To reconfigure the daemon, use the ps command to iden- tify the daemon's process identifier (PID) and then use the following command: # kill -HUP <pid> (The PID of the daemon is also recorded in /var/run/syslog.pid). This command causes the daemon to read the revised configuration file. The /etc/syslog.conf file contains entries that specify the facility (the part of the system that generated the error), the error message severity level, and the destination to which the syslogd daemon sends the messages. Each line of the /etc/syslog.conf file contains an entry. The following is an example of an /etc/syslog.conf file: # # syslogd config file # # facilities: kern user mail daemon auth syslog lpr binary # priorities: emerg alert crit err warning notice info debug kern.debug /var/adm/syslog/kern.log user.debug /var/adm/syslog/user.log daemon.debug /var/adm/syslog/daemon.log auth.debug /var/adm/syslog/auth.log syslog.debug /var/adm/syslog/syslog.log mail,lpr.debug /var/adm/syslog/misc.log binary.err /var/adm/binary.errlog msgbuf.err /var/adm/crash/msgbuf.savecore kern.debug /var/adm/messages kern.debug /dev/console *.emerg * The facility and its severity level must be separated by a period (.). You can specify more than one facility on a line by separating them with commas. You can specify more than one facility and severity level on a line by separating them with semicolons. The facility and its severity level must be separated from the destination by one or more tabs (spaces are not allowed). If you specify an asterisk (*) for a facility, messages generated by all parts of the system are logged. All messages of the specified level and of a greater severity are logged. Blank lines and lines beginning with # (number sign) are ignored. For example: *.emerg;mail,daemon.crit /var/adm/syslog/misc.log This line logs all facilities at the emerg level (and higher) and the mail and daemon facilities at the crit (or higher) level to the /var/adm/syslog/misc.log destination file. Known facilities and levels recognized by the syslogd daemon are those listed in /usr/include/sys/syslog_pri.h without the leading LOG_. The additional facility mark has a message at priority LOG_INFO sent to it every 20 minutes (this may be changed with the -m flag). The mark facility is not enabled by a facility field containing an * (asterisk). The level none may be used to disable a particular facility. For example: *.debug;mail.none /var/adm/syslog/misc.log The previous entry sends all messages except mail messages to the /var/adm/syslog/misc.log file. There are four possibilities for the message destination: A filename that begins with a leading / (slash). The syslogd daemon will open the file in append mode. A hostname preceded by an @ (at sign). Selected messages are forwarded to the syslogd daemon on the named host. A comma separated list of users. Selected messages are written to those users if they are logged in. An * (asterisk). Selected messages are written to all users who are logged in. For example: kern,mark.debug /dev/console *.notice;mail.info /var/adm/syslog/mail *.crit /var/adm/syslog/critical kern.err @ucbarpa *.emerg * *.alert eric,kridle *.alert;auth.warning ralph The preceding configuration file logs messages as fol- lows: Logs all kernel messages and 20 minute marks onto the system console Logs all notice (or higher) level messages and all mail system messages except debug messages into the file /var/adm/syslog/mail Logs all critical messages into the /var/adm/syslog/critical file For- wards kernel messages of error severity or higher to ucbarpa. Informs all users of any emergency messages, informs users eric and kridle of any alert messages, and informs user ralph of any alert message or any warning message (or higher) from the authorization system. Destinations for logged messages can be specified with full pathnames that begin with a leading / (slash). The syslogd daemon then opens the specified file(s) in append mode. If the pathname to a syslogd daemon log file that is specified in the syslog.conf file as a /var/adm/syslog.dated/file, the syslogd daemon inserts a date directory, and thus produces a day-by-day account of the messages received, directly above file in the directory structure. Typically, you will want to divert messages separately, according to facility, into files such as kern.log, mail.log, lpr.log, and debug.log. The file /var/adm/syslog.dated/current is a link to the most recent log file direc- tory. If some pathname other than /var/adm/syslog.dated/file is specified as the pathname to the logfile, the syslogd daemon does not create the daily date directory. For example, if you specify /var/adm/syslog/mail.log (without the .dated suffix after syslog), the syslogd daemon simply logs messages to the mail.log file and allows this file to grow indefinitely. The syslogd daemon can recover the messages in the kernel syslog buffer that were not logged to the files specified in the /etc/syslog.conf file because a system crash occurred. The savecore command copies the buffer recovered from the dump to the file specified in the "msg- buf.err" entry in the /etc/syslog.conf file. When the syslogd daemon starts up, it looks for this file and, if it exists, processes and then deletes the file. Configuration The syslogd daemon acts as a central routing facility for messages whose formats are determined by the programs that produce them. The syslogd daemon creates the /var/run/syslog.pid file if possible. The file contains a single line with its process ID. This can be used to kill or reconfigure the syslogd daemon. For example, if you modify the syslog.conf file and you want to implement the changes, use the following command: # kill -HUP 'cat /var/run/syslog.pid' If a syslog.conf configuration file does not exist, the syslogd daemon uses the following defaults: *.ERR /dev/console *.PANIC * The defaults log all error messages to the console and all panic messages (from the kernel) to all logged-in users. No files are written. To turn off printing of syslog messages to the console, please refer to the syslog(1) reference page. Remote message Forwarding The syslog has a remote message forwarding function. As a security feature, this capability is turned off by default. If you intend to con- figure other hosts to forward syslog messages to a local host, use the su command to become superuser (root) and manually create the /etc/syslog.auth file using a text editor on the local host. The /etc/syslog.auth file specifies which remote hosts are allowed to forward syslog messages to the local host. Unless the domain host name of a remote host is given in the local /etc/syslog.auth file, the local host will not log any messages from that remote host. Note that if no /etc/syslog.auth file exists on the local host, then any remote hosts that can establish a network connection will be able to log messages. See the syslog.auth(4) reference page for information. Event Management Note that syslog is also a channel that is read by the Event Management utility (EVM). Messages are also converted to EVM events and noti- fied to the EVM daemon. Refer to the EVM(8) reference page and System Administration for more information on event management. FILES
Specifies the command path Configuration file. Process ID. Specifies what remote hosts can forward messages to the local host. Contains configuration information that specifies what syslogd messages will be forwarded to the Event Manager, EVM. Enables and disables printing to the console device. The name of the domain datagram log socket. Kernel log device. The directory where daily log subdirectories reside. A link to the directory containing the most recent daily log files. RELATED INFORMATION
Commands: syslog(1), savecore(8), logger(1). Functions: syslog(3). Files: syslog.auth(4), syslog.conf(4), syslog_evm.conf(4). System Administration, Network Administration, and EVM(5) delim off syslogd(8)
All times are GMT -4. The time now is 11:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy