Linode Forum
https://forum.linode.com/

php mail question re default smtp server
https://forum.linode.com/viewtopic.php?f=11&t=9846
Page 1 of 1

Author:  markunit [ Tue Mar 05, 2013 4:31 am ]
Post subject:  php mail question re default smtp server

For my main domain email I have setup the MX Records to point to a Google Mail account and all works prefect.

I have NOT installed any other email software on my server except the standard Ubuntu image which I understand include simple Postfox. I have also NOT added or configured any email settings in any ini files.

I have a PHP script that uses simple PHP mail to send me notifications and this works great.

But what smtp server is it using to send the emails ?

Is it using my gmail account from the MX Records or something else ?

The reason for my questions is Im looking at upgrading my notifications to also notify others and this may create lots of emails and gmail limit the number of emails you can send per 24 hours. We will upgrade our code to use something else as we understand PHP Mail is not very efficient but for the initial tests its working fine.

Any feedback will be great.

Author:  obs [ Tue Mar 05, 2013 5:33 am ]
Post subject:  Re: php mail question re default smtp server

If you've installed postfix then it's sending via that, gmail's quotas won't be a problem.

Author:  markunit [ Tue Mar 05, 2013 5:38 am ]
Post subject:  Re: php mail question re default smtp server

Thanks obs,

I have not installed Postfix, but assumed this was included as default in the Ubuntu image and used by PHP Mail(). Sorry, maybe my assumption is wrong. I have not installed any additional email software/modules.

Author:  obs [ Tue Mar 05, 2013 6:10 am ]
Post subject:  Re: php mail question re default smtp server

You probably have some mail server running on there possibly sendmail run
Code:
dpkg -l | grep mail
and it'll list all pages with 'mail' in the name/description, you'll be looking for sendmail, postfix or exim.

Author:  markunit [ Tue Mar 05, 2013 6:17 am ]
Post subject:  Re: php mail question re default smtp server

Thanks again...

libmailtools-perl 2.05-1 Manipulate email in perl programs
mime-support 3.48-1ubuntu1 MIME files 'mime.types' & 'mailcap', and sup
postfix 2.7.0-1ubuntu0.2 High-performance mail transport agent

Postfix is added as standard and being used for email sending.

So does this means my Google account is not being used in any way to send email when PHP Mail is used ?

Author:  BerenErchamion [ Tue Mar 05, 2013 12:59 pm ]
Post subject:  Re: php mail question re default smtp server

That's correct.

On Unix-like systems, mail just calls the local "sendmail" binary or equivalent and passes the data to be mailed to it.

Only on Windows does it connect to an external server via SMTP to send out the mail.

Author:  obs [ Tue Mar 05, 2013 3:53 pm ]
Post subject:  Re: php mail question re default smtp server

Heh that's new I wonder when postfix got snuck into the images by default.

Author:  markunit [ Wed Mar 06, 2013 9:29 am ]
Post subject:  Re: php mail question re default smtp server

Thanks for all the help.

No Gmail limitions is good.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/