LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-04-2011, 01:35 PM   #1
dbrazeau
Member
 
Registered: Aug 2009
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184

Rep: Reputation: 28
Send email to mail server/account on local network?


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 defered or bounced status on my test email.

Last edited by dbrazeau; 03-04-2011 at 01:36 PM.
 
Old 03-05-2011, 12:30 PM   #2
agentbuzz
Member
 
Registered: Oct 2010
Location: Texas
Distribution: Debian, Ubuntu, CentOS, RHEL
Posts: 131

Rep: Reputation: 25
Not knowing anything more than what you've written, I'd suggest you look at the configuration of the receiving peer server. Is it Exchange? If so, Exchange does not automatically allow messages from un-authenticated clients, even on the local LAN segment. You have to create a "Receive Connector" that will relay locally submitted messages.

Also, you must have set a smart host in Postfix. vi your /etc/postfix/main.cf and search for ^relayhost.=
If there is no such line, set it like this:

relayhost = <IP address of smarthost>

Then re-start Postfix:

sudo /etc/init.d/postfix restart
 
1 members found this post helpful.
Old 03-07-2011, 11:52 AM   #3
dbrazeau
Member
 
Registered: Aug 2009
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by agentbuzz View Post
Not knowing anything more than what you've written, I'd suggest you look at the configuration of the receiving peer server. Is it Exchange? If so, Exchange does not automatically allow messages from un-authenticated clients, even on the local LAN segment. You have to create a "Receive Connector" that will relay locally submitted messages.

Also, you must have set a smart host in Postfix. vi your /etc/postfix/main.cf and search for ^relayhost.=
If there is no such line, set it like this:

relayhost = <IP address of smarthost>

Then re-start Postfix:

sudo /etc/init.d/postfix restart
It Worked!!! Thanks so much. I have been banging my head against the wall all last week trying to figure this out. Once I set the relayhost to mail.mydomain.com it worked.
 
  


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
Mail Server with : Postfix,dovecot. (Can send email, but can't receive email from internet mail) cparapat Linux - Server 1 08-16-2010 12:57 AM
command line email client to send mail to remote mail server dhanju Linux - Software 1 03-07-2008 06:37 AM
sendmail to send all email to another mail server it@stcroixknits.com Linux - Software 2 10-27-2006 10:19 AM
unable to send email from outside of the local network Andreja Linux - Software 2 06-05-2004 10:53 AM
I can't send mail by using local mail server hus Linux - Software 0 05-10-2004 02:18 PM

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

All times are GMT -5. The time now is 08:23 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