Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Oct 05, 2011 6:38 pm 
Offline
Junior Member

Joined: Mon Oct 03, 2011 1:09 pm
Posts: 29
Ok, tried searching for answers to this one, but no go so....

Setup Send-only Mail Server with Exim on Ubuntu 10.04 LTS and it seems to only send to emails outside of our domain.

For example:

$to='INSERT-EMAIL';
$subject='testing the subject';
$message='hello, looks like it works';
mail($to, $subject, $message, $headers);

INSERT-EMAIL=me@yahoo.com - check
INSERT-EMAIL=me@non-linode-site.com - check

INSERT-EMAIL=me@linode-site.com - nothing

What do I gotta do?


Top
   
 Post subject:
PostPosted: Fri Oct 07, 2011 10:10 am 
Offline
Junior Member

Joined: Mon Oct 03, 2011 1:09 pm
Posts: 29
Nothing, eh?

Maybe I can explain it better. In short:

mail() sending to me@some-other-site.com - works great

mail() sending to me@linode-site.com - does not work

I just don't get it.


Top
   
 Post subject:
PostPosted: Fri Oct 07, 2011 10:30 am 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
josh-chs wrote:
mail() sending to me@linode-site.com - does not work

What exactly would you expect to happen to local mail from a "Send-Only Mail Server"?


Top
   
 Post subject:
PostPosted: Fri Oct 07, 2011 10:45 am 
Offline
Junior Member

Joined: Mon Oct 03, 2011 1:09 pm
Posts: 29
Stever wrote:
josh-chs wrote:
mail() sending to me@linode-site.com - does not work

What exactly would you expect to happen to local mail from a "Send-Only Mail Server"?


*sigh* :oops:

Right, on to the next possible solution then.


Top
   
 Post subject:
PostPosted: Mon Oct 10, 2011 12:45 am 
Offline
Senior Newbie

Joined: Thu Feb 28, 2008 1:29 pm
Posts: 19
So you want to be able to send mail locally, and from localhost to the world, but not accept any mail from the world?

If so, Postfix out of the box on many distros will already be configured to do exactly that. You will simply need to configure your domain(s) and confirm what interfaces your instance of Postfix will bind to.

Configure Postfix to only accept inbound relaying to the loopback interface(s):


for IPv4 only:

Code:
inet_interfaces = 127.0.0.1
inet_protocols = ipv4



for IPv4 and IPv6:
Code:
inet_interfaces = 127.0.0.1, [::1]
inet_protocols = all



From there, just configure the following values with your domain (read the comments in the main.cf file for help in knowing what to configure these with), and restart Postfix:
Code:
myhostname
mydomain
myorigin
mydestination


For mydestination, I would recommend the following once you've configured myhostname and mydomain (plus any other domains you want to be aliases locally):
Code:
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost


That's pretty much the bare minimum that will get you up and running. Local mail to local users will be delivered to the mail spool file or user maildir as configured in main.cf (review the comments to see to configure this -- they are very straight-forward), Postfix won't even bind to any public interface, and mail sent from the local machine to the world will be relayed out from whatever domain you have myorigin configured as.

HTH


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group