Fedora Networking :: Automatically Send E-mail Containing IP Address?

Dec 2, 2009

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?

---------- Post added at 05:41 PM CST ---------- Previous post was at 05:30 PM CST ----------

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):

#!/bin/sh
# This script will send ifconfig information to my e-mail account.
# This allows me to have the latest IP address assigned to this computer.
cd /home/MyUserName
hostname > .IPmessage
date >> .IPmessage
ifconfig eth0 >> .IPmessage
sendmail -f$HOSTNAME MyAddress@MyCompany.com < .IPmessage

As I stated above, the output from ifconfig does not contain the IP address when my script is called from rc.local.

View 10 Replies


ADVERTISEMENT

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 ?

View 5 Replies View Related

General :: Send Gpg Encrypted Mail Automatically From The Command Line?

Sep 14, 2010

How can I send gpg encrypted mail automatically from the linux command line?

I'm a little stumped on this one, I've tried using mutt but it doesn't encrypt mail unless it's used interactively.

Does anyone know if you can use the build in mail command to do this some how?

View 1 Replies View Related

Networking :: Send E-mail From Command Line By Using "mail" In Fedora?

Jul 13, 2010

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 ......

View 1 Replies View Related

Fedora Networking :: Send Out Ip Address At Startup?

Aug 8, 2011

I need to send out ip address every time a machine is booted. So I have a script getting ip address through ifconfig command, parse the result (I do this with python since I'm not familiar with shell) and send out an email. I tried run it after login, and it worked. But it doesn't work if I don't login, but just call it from rc.local.

View 2 Replies View Related

Networking :: Ip Address Is Automatically Changing In Fedora?

Mar 1, 2011

in our server, Fedora 10 64 bit in this,IP Address is automatically changing Actually IP Address is 192.168.1.50 it changing frequently.if i try to edit that to normal it is not showing options. net mask is also is changing from 255.255.255.0 to 24 After reboot the system ,through LAN it is accessible .But not through the network.

View 2 Replies View Related

Ubuntu Networking :: Evolution Mail / Send Mail Saving To Current PC But Not To The Other PC?

Apr 20, 2010

I use Evolution mail and use 2 PCs When I send mail it saves it to my current PC but not to the other PC so instead i want it to save the sent to the email server i'm using.

View 3 Replies View Related

Networking :: Send Mail - Internet Mail Server Seems Not Working At All

Mar 30, 2011

i have an server which have my site on it, server have an public ip and site works fine..the thing that i done to enable mail server is :

1.select sendmail option as mail server(in joomla).
2.install and configure sendmail in server (which ubuntu installed on it )

**if i use my website locally mail server works fine i can send message and receive , but when i use web site from Internet mail server seems not working at all

View 1 Replies View Related

Networking :: How To Send Mail Using Postfix

Mar 11, 2010

recently i configure postfix on my fedora core 9 system i want to send mail from one user to another till now i did not create any user, i just configure the main,cf file with the help of some link i found on internet

here is my main.cf file

# Global Postfix configuration file. This file lists only a subset
# of all parameters. For the syntax, and for a complete parameter
# list, see the postconf(5) manual page (command: "man 5 postconf").
#
# For common configuration examples, see BASIC_CONFIGURATION_README

[Code]...

i dont know what i should write about my main.cf file so i post the whole file here.

so can anyone tell me is that the configuration is correct and and how do i create new user to my domain name and how can i send and receive mails from one user to another user using postfix

View 118 Replies View Related

Networking :: Send Mail Via Different Dedicated IPs From Same Box?

Jun 9, 2010

I have software with a newsletter system - but because I have 16 clients per server they are currently all sending emails from the same (eth0) IP address DESPITE having a DEDICATED ip address per client account for their WEB address. If one spams (or gets spam complaints) then they all suffer - and I'd love to send their email via their unique IP address to stop this problem and to make the IP match their domain which has to be better at getting through spam filters anyway I'd have thought...

View 6 Replies View Related

Networking :: Can't Bind Send Socket: Address Already In Use

Feb 23, 2009

I am currently trying to get a B.A.T.M.A.N mesh network up and running. the thing uses UDP port 4305 for broadcasting to nearby nodes and it seems this port is closed or used by something else.

now i have tried to open this port with commands like

Code:

iptables -A INPUT -p udp --dport 4305 -j ACCEPT
iptables -A OUTPUT -p udp --dport 4305 -j ACCEPT

it still gives me the same error saying the socket cannot connect.any way for me to scan that udp port, see what is blocking it and open the thing up ?

View 4 Replies View Related

Networking :: Send Local Mail From Exim4 And Other To ISP

Apr 2, 2010

(Desktop with Debian sid) How do I configure Exim4 to send local mail locally and other mail through my ISP? I just did dpkg-reconfigure exim4-config and none of the choices seemed to give me the answer. I have a lot of frozen email addressed to:
root@<My_ISP_SMTP_URL>. I also don't know what happens to regular email sent from Mutt. I have no problem sending email through my laptop on the same LAN.

View 3 Replies View Related

CentOS 5 Networking :: Sendmail Does Not Send Mail ?

Apr 30, 2009

I would like to send the logfiles and the CallDetailRecording-files of my Asterisk-server weekly to my email-address.

But I'm having some issues...

This is the command I would use in a script :

View 5 Replies View Related

Networking :: Unable To Send Mail From Server To Outside Using Sendmail?

Jun 1, 2011

I have configured Sendmail client to send mail to outside network ( Within local domain ), but i am unable to send any mail as i am getting the following error,

[root@cclx10 mail]# cat test |sendmail -v abhilash-o.padmanabhan@hp.com
abhilash-o.padmanabhan@hp.com... Connecting to [127.0.0.1] via relay...
abhilash-o.padmanabhan@hp.com... Deferred: Connection refused by [127.0.0.1]

I have the following configuration in my "/etc/sendmail.cf" file

# SMTP daemon options
O DaemonPortOptions=Port=smtp,Addr=15.146.237.113, Name=MTA

And netstat is showing that sendmail is listening on Port 25 on the IP address which is mentioned.

[root@cclx10 mail]# netstat -an |grep 25
tcp 0 0 15.146.237.113:25831 0.0.0.0:* LISTEN
tcp 0 0 15.146.237.113:25 0.0.0.0:* LISTEN

View 1 Replies View Related

Red Hat / Fedora :: How To Send Mail Via Console

Nov 12, 2010

We have RHEL linux 5.3 server.I need to send mail from console to my mail. we have proxy server in our net work. How to send mail from my server using SMTP 25 port.any configuration for sendmail client?

View 1 Replies View Related

Fedora Security :: 'send' Address Can Be Spoofed

Oct 16, 2009

I'm behind a modem router with firewall and SElinux enabled by default - but checking my mail this morning I noticed several ' delivery failures ' ( allegedly ) from hotmail referring to mail I hadn't sent. When I checked the spam folder for the on-line side of my mail account there were more failure notices. Two points that may be relevant, one is the recent Hotmail exploit, the other is that this only occurred with the address I use for railway matters, and some people cc to everybody, so it's odds on that address is on a good few computers. On one occassion when I checked my spam folder on-line I found spam which claimed to be from myself, so I know the ' send ' address can be spoofed, is this the explanation, or is it a new kind of attack linked to the Hotmail exploit?

View 13 Replies View Related

Fedora Servers :: Can't Get Php Form To Send Mail

May 7, 2009

home web server (running on port 21333). i'm running fedora 10 w/ LAMP and I can't get my php contact form on my website to send out mail. it looks like it sends but it doesn't (and I know the form works because it's the same one from my hosted web server). I've tried everything I can think of, disabled selinux, added apache to trusted mail users, changed the port to 2025 in case comcast blocks 25 (at least i think i did), added the port to the iptables and i have no idea where to go from here.

View 4 Replies View Related

Fedora Servers :: Can Send But No Receive Mail?

Jun 24, 2009

I have Linux mail server, It always encounter this problem, when i shut down or restart the server. You cannot receive mail but you can send..i use the following services:

iptables -F
service iptables restart
service sendmail restart

[code]...

View 5 Replies View Related

Fedora Servers :: User Are Not Able To Send Mail?

Jul 12, 2011

my user are not able to send mail, in my mail server this error is showing ,

[root@aloha ~]# service MailScanner restart
Shutting down MailScanner daemons:
MailScanner: [ OK ]
incoming sendmail: [ OK ]

[Code]....

Im using fedora 7 , i dono which all services has started .

View 1 Replies View Related

Red Hat / Fedora :: Capture The Line And Send It In An E-mail?

Mar 4, 2010

I am relatively new to using awk. I have a file with 10 identical lines. The last field in each line is a numeric. I want to check each of these lines and if the last field is greater than 500, I want to capture the line and send it in an e-mail. I know how to do this with a single line, but I don't know how to step through all 10 lines.

View 1 Replies View Related

Ubuntu Networking :: Cannot POST Http - Unable To Send Mail Via Squirrelmail

Nov 23, 2010

I have a really weird (but consistent) problem with my Kubuntu 10.10 install: I cannot post some HTTP forms.

First off, this is a client PC problem. My squirrelmail on the server works fine. I just use squirrelmail 1.4.17 to troubleshoot the ubuntu desktop problem

I used an old (07.04) Ubuntu install which worked fine. Then I wiped the disk and installed Kubuntu 10.10 on the same hardware. Everything works but **some** HTTP post does not work (I can log in but not send mail or save draft). I noticed I cannot log in to Yahoo, for example.

My webhosting account can display the apache access_log. When I hit the <Send> button the POST request never arrives to the web server.

I use a router (Dlink DL-604) behind a DSL modem and ooma box. There is a Windows 7 PC and a Kubuntu PC connected to the router. I can use squirrelmail just fine from the Windows PC.

I tried several steps:
- reinstalled Kubuntu
- installed Firefox and Chromium (on top of reconq)
- ran from a CD on my other (Windows 7) PC
- installed Wireshark and compared the traffic (but was unable to pinpoint a problem)

The result was the same: the <Send> button just keeps waiting; the POST request never makes it to the web server.

This sounds (and is) scary and suspect. The fact that the "demo" Kubuntu install (from the CD on my other Windows PC) using the reconq exhibits the same problem on a totally different hardware leads me to believe this may be related to Kubuntu. For example, I had to type this very message on the Windows PC as I could not post it on the forum from my Kubuntu box.

View 2 Replies View Related

Networking :: Configure An Application That Requires To Send Mail Notification On Registration?

Jan 13, 2011

I am trying to configure an application that requires to send mail notification on registration. But the application shows warning

Net::SMTP is installed in this environment, but {SMTP}{MAILHOST} is not defined, therefore the program listed at {MailProgram} will be used.

How to setup SMTP:MAILHOST

View 1 Replies View Related

Networking :: Send Mail To The Root / Any Account Of A Remote UNIX Computer?

Mar 29, 2010

Sending computer runs linux. Recieving runs OS X.

View 2 Replies View Related

Networking :: Send Email To Mail Server / Account On Local Network?

Mar 4, 2011

I'm trying to configure postfix so smart daemon can send out notifications emails. My system will need to send emails to a mail server that is on the same local network. I have not had much luck in getting this to work, and am confused on what I need to setup to do this and how to set it up. Does my system need to be apart of the same domain as the mail server? If so, how do I do this? Is there any restrictions sending emails from the command line as the root user? Do I need to configure a relayhost?

Basically all I need to do is send emails to a local mail server, i.e. a mail server on the same local network. I do not need to receive emails. I am rather clueless as to how to set this all up, and what I need for this basic email functionality. I have read and tried many postfix configuration tutorials, but when I try to send out a test email to a email address on the local network mail server I always get "Connection refused" to the server and deferred or bounced status on my test email.

View 2 Replies View Related

General :: Set Nagios Directives To Only Send One E-mail Per Alert Without It Flooding Mail Boxes?

Jul 20, 2011

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.

View 3 Replies View Related

General :: Sendmail Error / Unable To Work On WAN / Can Send Mail But Not Able To Recieve Mail?

Nov 15, 2010

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.

View 6 Replies View Related

Ubuntu :: Can't Send From Own Mail Server With Mail Client (Thunderbird Or Evolution)?

Jun 1, 2011

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.

Code:
westwood@westwood-desktop:/etc$ tailf /var/log/mail.log
Jun 1 19:00:33 westwood-desktop postfix/smtpd[2376]: warning: localhost.localdomain[127.0.0.1]: SASL LOGIN

[code]....

View 2 Replies View Related

Programming :: Basic PHP Mail Function \ Say 'and If 'email' Is Not Equal To 0 Then Send The Mail?

Sep 9, 2010

this is my code at the moment

PHP Code: <?php
if (isset($_REQUEST['email'])) && $_REQUEST['email']!='0'{
$to = "chrisathisemail";

[code]....

View 5 Replies View Related

Server :: Send Mail From Unix Mail Command To Yahoo-id With Attachment?

Feb 15, 2010

i want to send mail from unix mail command to my yahoo-id with attachment, but i want to receive it as attachment.

View 1 Replies View Related

General :: Debian Mail Server As A User Send A Mail With Attachment Maximum Wight Is 5 Mb

Jun 8, 2011

How to configure a Debian mail server as a user send a mail with attachment maximum wight is 5 Mb.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved