| Author |
Message |
josh-chs
Joined: 03 Oct 2011
Posts: 9
|
| Posted: Wed Oct 05, 2011 5:38 pm Post subject: Exim sending only to non-local emails? |
|
|
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? |
|
| Back to top |
|
josh-chs
Joined: 03 Oct 2011
Posts: 9
|
| Posted: Fri Oct 07, 2011 9:10 am Post subject: |
|
|
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. |
|
| Back to top |
|
Stever
Joined: 07 Dec 2007
Posts: 337
Location: NC, USA
|
| Posted: Fri Oct 07, 2011 9:30 am Post subject: |
|
|
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"? |
|
| Back to top |
|
josh-chs
Joined: 03 Oct 2011
Posts: 9
|
| Posted: Fri Oct 07, 2011 9:45 am Post subject: |
|
|
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. |
|
| Back to top |
|
skavoovie
Joined: 28 Feb 2008
Posts: 19
|
| Posted: Sun Oct 09, 2011 11:45 pm Post subject: |
|
|
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 |
|
| Back to top |
|
| |