[arch-general] packages and configuration required to send e-mails from php.
I'm setting up an apache, php, drupal 7 site and need to be able to send e-mails from the site but getting lost trying to find out what I need as far as system packages, php extensions and how to configure them all. I've tried a couple of scripts for php and they report they have succeeded but the test mail never arrives in my inbox. I suspect that php & drupal are working but I need something in the way of a mail server set up for them to work through. The Postfix was package was installed as a dependancy of something I installed but the help files seem to me to require a sound understanding of e-mail systems and their jargon which I don't have. Is there some kind soul out there who has the time and knowledge to help me get this working? mik
Fri, 10 Oct 2014 14:04:00 +1100 mick <bareman@tpg.com.au>:
I suspect that php & drupal are working but I need something in the way of a mail server set up for them to work through.
Don't "suspect". Especially when you have little to no experience with server software it's paramount to check the logs. Even when at first you don't understand what's getting logged, it's important there are logfiles in the first place.
The Postfix was package was installed as a dependancy of something I installed but the help files seem to me to require a sound understanding of e-mail systems and their jargon which I don't have.
Right, don't treat email as some minor dependency; a proper mailserver setup takes its time, probably moreso than any wiki, CMS or other web thingie. The easiest route would probably mean to install a minimal MTA providing /usr/bin/sendmail, like 'msmtp-mta' or 'nullmailer', and to configure it to forward mails through some existing mail account of yours. You might need to tweak the envelope sender address of the generated mails on your server or test with several different mail accounts as some providers don't forward mails from external domains, but all that is still way simpler than hosting your own Postfix. But in case you also need/want to _receive_ emails ... well, then there's no way around to learn at least the basics of Postfix/SMTP/DNS/etc. --byte
On 10.10.2014 06:51, Jens Adam wrote:
The easiest route would probably mean to install a minimal MTA providing /usr/bin/sendmail, like 'msmtp-mta' or 'nullmailer'
msmtp-mta simply provides a symlink from sendmail to msmtp. I believe msmtp doesn't do queueing on it's own (there's msmtpq, but that's not what the symlink points to) so unless you want to loose mail if your mailserver is temporarily overloaded, the network is down or something else is broken you shouldn't use it. That said msmtp is fine for "interactive" use. nullmailer seems to do queuing, but it doesn't seem to support bouncing when errors occur (TODO says "Generate bounces for permanently failed messages" for years now) so might not be that good a choice. Just learn and use postfix. Might take a while at first, but it supports all use cases and is well maintained.
participants (3)
-
Florian Pritz
-
Jens Adam
-
mick