LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-29-2008, 09:37 AM   #1
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Linux Mint 13 Maya
Posts: 729

Rep: Reputation: 32
mail server details


I am not 100% sure this is the right forum - apologies if not.

I am trying to write a python script to automate some things at work.

However I do not have access to root - how can I find our mail server's address? So I can use that to send emails?
 
Old 09-29-2008, 10:05 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,520

Rep: Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944
Quote:
Originally Posted by davholla View Post
I am not 100% sure this is the right forum - apologies if not.

I am trying to write a python script to automate some things at work.

However I do not have access to root - how can I find our mail server's address? So I can use that to send emails?
Not to be a twit, but if this is for your work environment, you should be able to ask your systems admins for that information, and they'll be happy to provide it.

On a non-twit related note, you can try to look into the /etc/mail/sendmail.cf or submit.cf files (may be different for Postfix, but sendmail uses those), and see where things are relayed (look for the Smarthost line). It should have an address or host name in there, but that will just tell you the next server upstream. Depending on how the mail system is set up, your program may need to be 'allowed' to relay mail through, or you may have other hoops to jump through. Your mail admins should be able to give you all the details...hate to be vague, but mail in a corporate environment can get very convoluted.
 
Old 09-29-2008, 10:07 AM   #3
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Linux Mint 13 Maya
Posts: 729

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by TB0ne View Post
Not to be a twit, but if this is for your work environment, you should be able to ask your systems admins for that information, and they'll be happy to provide it.
Good idea - sorry lack of sleep.
 
Old 09-29-2008, 12:13 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,520

Rep: Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944Reputation: 7944
Quote:
Originally Posted by davholla View Post
Good idea - sorry lack of sleep.
No worries....been there several times myself.
 
Old 09-29-2008, 12:32 PM   #5
Carl Filby
Member
 
Registered: Aug 2008
Location: Deep East Texas
Distribution: Debian,Ubuntu
Posts: 36

Rep: Reputation: 15
launch nslookup from CLI
enter "set type=mx"
enter "yourdomainname.com"

this will give the fqdn of that domain's mx servers, if listed in DNS records of course.
This will work if trying to find out public mail server BUT NOT an internally used mail server.

Last edited by Carl Filby; 09-29-2008 at 12:34 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to check server/computer details? CPU, HD? newlinuxnewbie Linux - Software 2 09-12-2006 07:42 AM
How to get Session Details on server ashishkabra Linux - Security 1 04-05-2005 04:58 PM
Server Details !!! ptreves Linux - Hardware 1 06-17-2004 07:50 PM
I get all my DHCP details through, but can't ping the server palpatine Linux - Networking 0 01-17-2002 06:17 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:41 AM.

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