LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-31-2006, 03:03 PM   #1
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Rep: Reputation: 30
question about hostname and debian


hello there,
i am trying to get an email script to work in python.
the emails only fail going to certain providers.
when i look at the headers, it shows my domain as being localhost.localdomain.

in my /etc/hosts file i have this line
127.0.0.1 localhost.localdomain localhost PivServer

when i log into a terminal, it gives me username@PivServer

my question is, how do i get the mail in python to look like its being sent out from my domain name.

actually, the domain name of the web address is different than the host name on the machine. Do they need to match? The server is on an internal network with port 25, and 80, and 110 forwarded to it thru a cisco router.

any help would be ..... um.... helpful
thanks
 
Old 07-31-2006, 03:42 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Are you using python to send mail via an MTA? If so, which one are you using, as thewre will no doubt be a setting in the config.

Also, have a look at the hostname for your computer. Look for a file called "netwrok". In FC it is in /etc/sysconfig. Make sure there's a line like

HOSTNAME=your_hostname.your_domain.com


Rgds

Edit - there is no need for web address and hostname to match, but usually do. If your web address is www.example.com, it's common to use something like server1.example.com for the hostname.

Last edited by billymayday; 07-31-2006 at 03:44 PM.
 
Old 08-01-2006, 12:53 PM   #3
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Original Poster
Rep: Reputation: 30
Hey, i got it.
debian has an onboard command for setting the host name of the box.
host = whatever.whatever.com

thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian: AWStats works differently when going to IP or hostname Punkrulz Linux - Software 0 01-13-2006 12:07 PM
DHCP Hostname in Debian 3.1 VinnySem Linux - Networking 7 07-25-2005 11:54 PM
Hostname question GUIPenguin Linux - Networking 1 01-18-2005 08:59 PM
hostname question?? rnj Linux - Newbie 1 10-08-2004 07:09 AM
hostname question wendallsan Linux - Networking 4 10-16-2003 04:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration