Currently I have a mail server configured (a real one from my ISP) and mail internal and external works on the command line. In PHP only external users work.
For testing I would like to send to internal users only.
( Ideally I would like to set up lots of aliases that point to one user so mail to:
tom@localhost.com, dick@localhost.com, harry@localhost.com end up in /var/mail/johnsmith )
I’d be greatful if someone could help here. I’m hesitant to edit the postfix config files…
On the command line johnsmith@localhost works but not in PHP. It’s using cakePHP and I checked the value of $email-addr just before the send ($this->Email->send();) and the value is johnsmith@localhost. I’m not that familiar with cakePHP yet. The var/log/mail shows nothing, only external email addresses.
(server is Suse linux)
In /etc/postfix/main.cf add localhost.com:
This allows sending on “localuser@localhost.com” via command line. I loaded up a test php mail form script in a browser and it works, sending mail through to /var/mail/localuser.
At the moment it means I have to check each local users /var/mail file. I’m working on the alias. My first attempt at that failed.