04-19-2004
events send mail to admin -
Hi everybody !!
I want to do something and I can't figure out. The idea is that a script should send an email when a backup is done.
It works with a unix account (like root) but what I really want is to send that email to other account like
fede@somethig.com.
I have a mail server installed in other computer, all these boxes are running solaris 9.
I believe that I should tell the box that is running the backup script to send the email using other mail server, but I don't know how to do it.
Also, as a test, I tried: mail -t
myaccount@stuff.com, and it doesn´t work. (of course the email acount exist...)
So if someone can help me, I'll send a pack of six beers...
Thanx a lot.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi, Gurus,
I need some help with sending mail out from my UNIX server:
It is running Solaris 2.6 and the sendmail version is 8.8.
Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null
Version 8.8.8+Sun
Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET
... (5 Replies)
Discussion started by: b5fnpct
5 Replies
2. UNIX for Dummies Questions & Answers
Using Mailx command i.e
mailx -s "subject" chinni@hotmail.com < \tmp\chin
this command executed sucessfully but not able to receive the mail in chinni@hotmail.com
please help. (1 Reply)
Discussion started by: chinnigd
1 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I have a requirement to send and email of body html with an attachment.
concatinating uuencode output to the mail body with mailx command works, but as my Email body is of HTML type i use sendmail.
my command to send HTML body is as below:
export MAILTO="recipient@domain.com"... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies
4. UNIX for Dummies Questions & Answers
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
5. UNIX for Advanced & Expert Users
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
6. UNIX for Advanced & Expert Users
Hi all,
I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix.
How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies
7. Shell Programming and Scripting
Hello,
I am using centos-6.2
I have apache server,php5 on my system and I want to send mail using sendmail on my system.
when I try to send mail from shell that time mail is succesfully sent to respective address()
but when I try to send it through webbrowser I am not able to send it.... (1 Reply)
Discussion started by: Kiran ursal
1 Replies
8. Ubuntu
Hi Guys..
yesterday i purchased a VPS server and installed sendmail on ubuntu 12.4 with Webmin & Apache runing webserver
problem is..
i can send mail via webmin user interface account to anybody to out side to any domain and able to recieve any mail from any domain..
Now main... (2 Replies)
Discussion started by: cmdman
2 Replies
9. HP-UX
Hi guys,
I am currently runnig hp-ux v11.3. I have enabled auditing and I am able to send the audit events to a text file in syslog format using the following command:
audisp -r /var/.audit/audtrail/auditfile -P -o follow -O sync | audit_p2l > /var/adm/auditlog
I am required to send the... (0 Replies)
Discussion started by: peter maisiba
0 Replies
10. UNIX for Advanced & Expert Users
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
LEARN ABOUT DEBIAN
log::handler::output::email
Log::Handler::Output::Email(3pm) User Contributed Perl Documentation Log::Handler::Output::Email(3pm)
NAME
Log::Handler::Output::Email - Log messages as email (via Net::SMTP).
SYNOPSIS
use Log::Handler::Output::Email;
my $email = Log::Handler::Output::Email->new(
host => "mx.bar.example",
hello => "EHLO my.domain.example",
timeout => 120,
debug => 0,
from => 'bar@foo.example',
to => 'foo@bar.example',
subject => "your subject",
buffer => 0
);
$email->log(message => $message);
DESCRIPTION
With this output module it's possible to log messages via email and it used Net::SMTP to do it. The date for the email is generated with
"Email::Date::format_date".
Net::SMTP is from Graham Barr and it does it's job very well.
METHODS
new()
Call "new()" to create a new Log::Handler::Output::Email object.
The following opts are possible:
host
With this option you has to define the SMTP host to connect to.
host => "mx.host.com"
# or
host => [ "mx.host.example", "mx.host-backup.example" ]
hello
Identify yourself with a HELO. The default is set to "EHLO BELO".
timeout
With this option you can set the maximum time in seconds to wait for a response from the SMTP server. The default is set to 120
seconds.
from
The sender address (MAIL FROM).
to The receipient address (RCPT TO).
Additional options are cc and bcc.
subject
The subject of the mail.
The default subject is "Log message from $progname".
buffer
This opts exists only for security. The thing is that it would be very bad if something wents wrong in your program and hundreds of
mails would be send. For this reason you can set a buffer to take care.
With the buffer you can set the maximum size of the buffer in lines. If you set
buffer => 10
then 10 messages would be buffered. Set "buffer" to 0 if you want to disable the buffer.
The default buffer size is set to 20.
debug
With this option it's possible to enable debugging. The information can be intercepted with $SIG{__WARN__}.
log()
Call "log()" if you want to log a message as email.
If you set a buffer size then the message will be pushed into the buffer first.
Example:
$email->log(message => "this message will be mailed");
If you pass the level then its placed into the subject:
$email->log(message => "foo", level => "INFO");
$email->log(message => "bar", level => "ERROR");
$email->log(message => "baz", level => "DEBUG");
The lowest level is used:
Subject: ERROR: ...
You can pass the level with "Log::Handler" by setting
message_pattern => '%L'
flush()
Call "flush()" if you want to flush the buffered lines.
sendmail()
Call "sendmail()" if you want to send an email.
The difference to "log()" is that the message won't be buffered.
validate()
Validate a configuration.
reload()
Reload with a new configuration.
errstr()
This function returns the last error message.
DESTROY
"DESTROY" is defined and called "flush()".
PREREQUISITES
Carp
Email::Date
Net::SMTP
Params::Validate
EXPORTS
No exports.
REPORT BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>.
If you send me a mail then add Log::Handler into the subject.
AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>.
COPYRIGHT
Copyright (C) 2007-2009 by Jonny Schulz. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-11-21 Log::Handler::Output::Email(3pm)