Slackware :: Automatically Send Mail When Have Errors?

Jan 27, 2010

I have installed slack 13 and I want to configure the sistem to send automaticaly an email to an gmail account when I have some errors like power down for some minutes or a program crash. Can some one tell me exactly what i must do ?

I recently purchased a domain and I have setup what I believe are correct dns records from the domain companies control panel. I have the domain pointing to my server and that's working fine. I also have an MX record for my domain. Now, I can send emails from my email account just fine however I cannot receive any emails coming in to my account. Heres an example:

I have several computers at work running Fedora 12. From time to time I need to remotely connect to them, usually via ssh. Each computer is assigned an IP number automatically upon startup, however due to circumstances beyond my control they are not recognized by host name by the domain server. Therefore I require the IP addresses in order to connect rather than the host names. I have no way at present to rectify this situation.

When there is a reboot, I am not always guaranteed that the IP address will be the same as before, although in practice this is usually the case. If the IP address is changed and I am logging on remotely, I am unable to connect! I can't know the number until I am again physically sitting at the computer.

As a solution, I would like each computer to e-mail me its IP address each time it boots. My first attempt was to run a script at the end of /etc/rc.d/rc.local that runs ifconfig and places the output into a file. This file is then sent to my address using sendmail. The script works fine, but I note that the output from ifconfig at this boot stage does not contain an IP address! Obviously, it is being assigned later on in the startup process. Either that or the command ifconfig does not work the same at this stage as it does once I am logged in. I require somebody with more expertise than I to comment on that.

Finally then, my question is, at what point in the startup process is an IP address assigned and the output from ifconfig would contain this address? Is there a more appropriate place rather than rc.local in which I should run my script? Is there a more appropriate command rather than ifconfig that ought to be used instead?

Let me show you my attempted solution in more detail in case you're interested. The script is called .SendIP.bash and is located in my home directory. Here's what it looks like (with some censoring to protect me from public ridicule):

How to send mail using sendmail on slackware? Can you show me a simple bash program that sends a message to an email? I am new to slackware and I can't send my email using sendmail command. I checked my mail queue on my Webmin and i see this status "access map: lookup [URL]..

In my continuing quest to live without X most of the time, I am trying to set up fetchmail and Mutt to get and send mail. I only want to be able to send and receive text based mail, and so far I am running into trouble with what I think should be pretty simple. For receiving my mail, I believe I only need to create a .fetchmailrc file in my home directory with the entry:

It appears to me that it is finding mail but does not know where to deliver it and is refused a connection to my machine. Also, I cannot figure out how to set up my SMTP for my ISP in Mutt to send mail. Can someone point me to a simple tutuorial on how to do these things. I really only want to do what you would with Thunderbird, but from the command line.

I have got a nagios server running on my network, The configuration seems to be okay but each time there is a service alert notification, and an e-mail is sent to the contact group, Nagios continuously sends e-mail over and over again. Do anyone know of a way to set Nagios directives to only send one e-mail per alert without it flooding mail boxes.

I had configured sendmail on linux 5.2, Iam using public ip and my domain is registered[linuxforfreshers.info]. I am facing a issue that when I mail with the user sumit@linuxforfreshers.info then I am able to do it. But if somebody tries to send mail to the same user then it bounce backs. I had made the entry of domain in /etc/mail/local-host-name and also I put ok in /etc/mail/access.The mails are working properly with in LAN. But not able to work on WAN only I can send mail but not able to recieve mail.What else I need to do.

I have set up postfix and dovecot as per the Ubuntu anual and appear to have a functioning mail server.Using the sendmail command I can send mail and I receive mail in ~/Maildir. Using Thunderbird I can read any mails received but I can't send any mail from Thunderbird. I have tried with both STARTTLS and SSL/TLS and whilst I get the prompt for a password I keep getting the message my password for my server is wrong.I have ports 25, 465, 587 and 993. Is that all the right ports?When I ping my domain name it resolves to my router name whereas I believe it should resolve to my IP. Could there be a problem with my host file? I've had a play but to no avail.Here's the error in mail.log.

I'm running SUSE linux Server version 11. I want to configure mail server with postfix & cyrus-imap. For that, i have read many documents in Internet by i met issues. I'm running DNS in this server & it's ok Now I cannont send mail through command line.

I set up my mail server using the guide here: [URL] I am able to receive mail, I can send mail locally, but I can't send to external addresses. This is in my mail.log: Quote: Jun 30 14:40:43 Server postfix/smtp[10725]: 2FD9322015BF: to=<myemail@gmail.com>, relay=none, delay=1634, delays=1484/0.02/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[74.125.65.27]:25: Connection timed out)

That all i can say about the configurations becuase thats as much as i understand it.The problem now is that we are not able to send or recieve emails from both internal and external.I tried to send mail to a collegue in the office who is on our local LAN,Roundcube says sent successfully but the person does not recieve the mail.i tried to send to my yahoo address but nothing.I dont know where these mails have been trapped.

I am trying to do something really simple with Exim. I have two machine connected together via a hub. They can ping each other. They each are running openSuse 11.2 and have Exim installed. On each machine from the command line in start Exim as a daemon by typing: sudo /usr/sbin/exim -bd -d and each machine runs through some output and sits there "Listening". Then on either machine I try to send a mail message of the form mail

(or mailx) <user>@<other node> some textEOT

and absolutly nothing happens! I must be doing something wrong or daft which is very basic, but I have searched all over and cannot get it to work.

I have configured fetchmail, sendmail/postfix and mutt to act as a relay to receive mail. I can receive mail fine but I cannot send mail. Its working fine on my one box but on the one acting as a nat I am having issues. This is my mail log from the nat box.

I have been able to use the mail program on my old Ubuntu instasll which I found quite handy. However, it isn't functioning "out of the box" like I expected. I've tried to configure it as mail was in Ubuntu to no avail.

I have a bit of problem setting up sendmail on my server. I've gotten so far that I can send mail from my mail server and relay mail from my LAN computers through it. Also, local delivery seems to be working.The problem is receiving mail from other domains. When I send mail from my gmail account to any user in my domain the mail gets delivered back to gmail as it exceeds the max hop count.The mail gets bounced between my ISP mailserver which I use as smart host and between my server.The problem seems to be that my mail server won't accept any mail it is supposed to receive.

Postfix in Webserver is using Postfix as relay, next, Mailserver is sending emails ok when I use phpmail in any "virtual domain", but I have a few problems that I don't know how to fix...

1) If I send a phpmail from the "default domain", it is not working (no Postfix has log acitivity).

2) If I send an email using phpmail function without a from, the from will be www-data@w1.domain.com. Because I am hosting lots of virtual domains, I really need to use as "sender (From)" a mailbox named: whatever@hostedvirtualdomain.com.

I am trying to send e-mail from command line by using "mail" in fedora. It goes to e-mail server in the same network but it is refused by other outside this network with message: "..... Connection refused by name@yahoo.com ......

There is an requirement, intranet people they may not have internet access but they want to send mail to external domain(internet),but in that intranet network one machine can have internet access. Is there any solution for this requirement.

I use my university email account and i want to save a backup of my sent emails in other account (gmail). So, is there any way to configure kmail to send automatically a BCC to my gmail account everytime i send an email, i mean, without having to write it everytime cause i forgot to do it sometimes.