views:

80

answers:

1

I've recently setup my Ubuntu web server with exim4 so my PHP website applications can send email such as "thank you" and "confirmation" notices.

I've got it setup and working such that I can send email to gmail, Yahoo! and my work address. However, my work email gets caught up in our spam filter. I'm new to setting up mail servers so I'm not sure what I might need to look for in making this mail server more trusted, while keeping is secure.

Here are some details:

  • Server is NATed behind a firewall.
  • Firewall has port 25 open for outgoing SMTP traffic (from server to anywhere).
  • Server is virtual hosting a couple different of our websites
  • The server is running the following exim4 config:

dc_eximconfig_configtype='internet'
dc_other_hostnames='web-serv.example1.com;example2.com'
dc_local_interfacees='127.0.0.1'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets='' dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='false'

Questions:

Do I need to open port 25 to incoming SMTP mail (anywhere to server)? I wonder if other mail servers need to talk to my mail server to verify itself, in a sort of handshake attempt.

I have not created any MX records primarily because the server has different websites on it the mail server should send mail for all the websites. Do I need to pick/create a domain address and create MX records for it?

One thing of note is that the mail headers look like this:

Return-Path: <[email protected]>  
Received: from web-serv.example1.com ([Firewall public IP Address])  
Received-SPF: neutral (google.com: [Firewall public IP Address] is neither permitted nor denied by best guess record for domain of [email protected])

"web-serv" is the host name of the server, such that you get this if you type it into the command line:

$ hostname  
web-serv

and "www-data" is the account name for the Apache2 server that Ubuntu gave it as default.

Any other general advice would be appreciated. It's all new to me.

Cheers!

A: 

Hi guys, same problem with my debian.

Are there any configuration tips for setting return-path and other headers while running your server as "name-based" virtual hosts apache web-server?

Return-Path: - e.g. this is set in all email headers outgoing (especially when using PHP to send e-mails)

Thanks for replies

Vasek