Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th April 2010, 15:44
bozo bozo is offline
Junior Member
 
Join Date: Apr 2010
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default Configuring postfix to only send email

Hi,
I've a web server running multiple PHP sites. I only need to send emails for subscriptions or other site related stuff. This server doesn't get any incoming mail.

I use Postfix on Debian. Now my SMTP port (25) is open. And I get lots of relay attempts. Is it possible to configure postfix for only sending emails? I want to close port 25 and get rid off relay attempts but I'm not sure sending mail will be possible that way.
Reply With Quote
Sponsored Links
  #2  
Old 14th April 2010, 17:04
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

Code:
postconf -e inet_interfaces=loopback-only
then restart postfix ..

Port 25 will still be open, but only on the loopback interface, so your php scripts can still use it to poke mails in the queue.
Reply With Quote
The Following User Says Thank You to Mark_NL For This Useful Post:
bozo (15th April 2010)
  #3  
Old 15th April 2010, 07:49
fzhan fzhan is offline
Junior Member
 
Join Date: Jan 2010
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Does this affect the receving of bounce messages? Say if Return-Path is the same as your sending domain?
Reply With Quote
  #4  
Old 15th April 2010, 08:33
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

no, because mydestinations will be containing localhost, hostname (and mostlikely also your domain.tld) .. the machine will handle those mails as local mail.
Reply With Quote
  #5  
Old 15th April 2010, 08:43
fzhan fzhan is offline
Junior Member
 
Join Date: Jan 2010
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default

interesting, say the hostname is mymda.com, all mails can go out internally (eg sender@mymda.com) and receive bounce@mymda.com for bounce messages, but does not receive mail on sender@mymda.com?
Reply With Quote
  #6  
Old 15th April 2010, 09:08
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
 
Default

yes, yes and yes
Reply With Quote
Reply

Bookmarks

Tags
outgoing mail only, postfix

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Catchall and Forwarding not working simmo General 6 22nd March 2014 00:54
Configure postfix for 1 external ip to send email Roland Megens Installation/Configuration 10 17th September 2009 00:09
Postfix not responding to telnet CarbonCopy Server Operation 6 8th May 2009 05:39
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36


All times are GMT +2. The time now is 07:25.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.