trouble sending email by php

I have thunderbird working, set up to send out by smtp through my ISP using my ‘standard’ everyday email address.

I have a php script in the webserver that should also send out an email but is not. The final php script is hosted on my ISP and works, but for development I want my local server to be able to send out the email also.

Question1: this local server is on my local network and doesn’t actually have a domain name. I have the hostname setup through yast as the name of the machine, no real .com domain address. Is a real domain address required? If I am on my local network, talking through my isp as a ‘consumer’, shouldn’t this still work.

Question 2: I have run mail setup through yast and confiogured it for the same smtp info as thunderbird uses.

This is a piece of the log showing the last 2 tries to send email.

2016-07-06T20:54:54.166788-04:00 gdssrvr postfix/pickup[3625]: 28AEE1A20D86: uid=30 from=<wwwrun>
2016-07-06T20:54:54.243044-04:00 gdssrvr postfix/cleanup[4164]: 28AEE1A20D86: message-id=<20160707005454.28AEE1A20D86@gdssrvr.gdssrvr>
2016-07-06T20:54:54.291062-04:00 gdssrvr postfix/qmgr[3626]: 28AEE1A20D86: from=<wwwrun@gdssrvr.gdssrvr>, size=542, nrcpt=1 (queue active)
2016-07-06T20:54:54.732935-04:00 gdssrvr postfix/smtp[4166]: 28AEE1A20D86: to=<>,[]:25, delay=0.58, delays=0.23/0.02/0.21/0.12, dsn=5.1.8, status=bounced (host[] said: 554 5.1.8 - Domain of sender address does not exist [R0107008] (in reply to MAIL FROM command))
2016-07-06T20:54:54.782468-04:00 gdssrvr postfix/cleanup[4164]: BE9C61A20D87: message-id=<20160707005454.BE9C61A20D87@gdssrvr.gdssrvr>
2016-07-06T20:54:54.808270-04:00 gdssrvr postfix/bounce[4167]: 28AEE1A20D86: sender non-delivery notification: BE9C61A20D87
2016-07-06T20:54:54.808633-04:00 gdssrvr postfix/qmgr[3626]: BE9C61A20D87: from=<>, size=2499, nrcpt=1 (queue active)
2016-07-06T20:54:54.808832-04:00 gdssrvr postfix/qmgr[3626]: 28AEE1A20D86: removed
2016-07-06T20:54:54.875503-04:00 gdssrvr postfix/local[4168]: BE9C61A20D87: to=<root@gdssrvr.gdssrvr>, orig_to=<wwwrun@gdssrvr.gdssrvr>, relay=local, delay=0.09, delays=0.03/0.01/0/0.06, dsn=2.0.0, status=sent (delivered to mailbox)
2016-07-06T20:54:54.875839-04:00 gdssrvr postfix/qmgr[3626]: BE9C61A20D87: removed

2016-07-06T21:19:24.807833-04:00 gdssrvr postfix/pickup[3625]: C533A1A20D87: uid=30 from=<wwwrun>
2016-07-06T21:19:24.810584-04:00 gdssrvr postfix/cleanup[5240]: C533A1A20D87: message-id=<20160707011924.C533A1A20D87@gdssrvr.gdssrvr>
2016-07-06T21:19:24.872733-04:00 gdssrvr postfix/qmgr[3626]: C533A1A20D87: from=<wwwrun@gdssrvr.gdssrvr>, size=544, nrcpt=1 (queue active)
2016-07-06T21:19:25.239921-04:00 gdssrvr postfix/smtp[5242]: C533A1A20D87: to=<>,[]:25, delay=0.49, delays=0.16/0/0.25/0.07, dsn=5.1.8, status=bounced (host[] said: 554 5.1.8 - Domain of sender address does not exist [R0107008] (in reply to MAIL FROM command))
2016-07-06T21:19:25.334311-04:00 gdssrvr postfix/cleanup[5240]: 5130D1A20D88: message-id=<20160707011925.5130D1A20D88@gdssrvr.gdssrvr>
2016-07-06T21:19:25.356773-04:00 gdssrvr postfix/bounce[5243]: C533A1A20D87: sender non-delivery notification: 5130D1A20D88
2016-07-06T21:19:25.357047-04:00 gdssrvr postfix/qmgr[3626]: 5130D1A20D88: from=<>, size=2501, nrcpt=1 (queue active)
2016-07-06T21:19:25.357255-04:00 gdssrvr postfix/qmgr[3626]: C533A1A20D87: removed
2016-07-06T21:19:25.390503-04:00 gdssrvr postfix/local[5244]: 5130D1A20D88: to=<root@gdssrvr.gdssrvr>, orig_to=<wwwrun@gdssrvr.gdssrvr>, relay=local, delay=0.06, delays=0.02/0/0/0.03, dsn=2.0.0, status=sent (delivered to mailbox)
2016-07-06T21:19:25.390759-04:00 gdssrvr postfix/qmgr[3626]: 5130D1A20D88: removed

Apparently its not using the isp smtp settings? I think?
Can someone help me in making sure that the hostname/domain is what needs fixing? Or do I need to setup yast mail server differently?

Whenever you send e-mail you are subject to the recipient’s e-mail
server’s restrictions, and those restrictions usually include verifying
that the sender is actually where they claim they are via reverse DNS
lookup (take their IP, look for NS records, see that they match the FROM
address claimed by the sender) to avoid relaying which is the easiest way
for spam to get around.

In your case, the sender provided this bit of helpful error feedback:

host[] said: 554 5.1.8 - Domain
of sender address does not exist [R0107008]

If you look up a wee bit in the output, the FROM looks like this:


This is not a valid DNS name, so it cannot exist, which you are told.

If I were you I would probably have all of my dev systems just mail a
local user account (root, wwwrun, whatever) and check the e-mail locally
to ensure it looks close-enough before going to Prod, or else setup a QA
environment with valid DNS for testing prior to Prod. You could also work
with your systems, or your ISP, to eventually get mail working, but ISPs
are used to end users being compromised and as a result they often block
SMTP, or will not relay it without authentication (which you could setup),
to avoid becoming spam sources themselves.

Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

Besides what ab posted,

  • Agreed that the specific error your test mail is being bounced is that the email domain you are specifying in your email is not resolvable.


  • You can set the “Reply-from” (or similar field) in your testmail to be a real email domain. This works only if the mailserver isn’t also doing an SPF secondary check. SPF is primarily used by Yahoo mail servers that requuire an SPF public DNS record that lists authorized IP addresses for authorized SMTP mail servers.

  • Besides setting the “Reply-from” field, if you’re sending to a “real” mailserver you should ordinarily route your outbound mail through an authorized SMTP server. When you set up a real mailserver, you ordinarily need to notify your ISP so that <the ISP DNS records" contain your MX address, it’s not ordinarily sufficient for you to announce to the world your mailserver by creating only the MX record in your own Primary DNS servers.

  • As ab suggests, you may set up a temporary mailserver internally. When you set up your own mailserver, you can configure it to receive “any” email from “anywhere” without the normal anti-spam requirements, able to accept mail directly from your own clients. When you set up a mailserver using YAST, you’re doing this. You will still need to configure your “Reply-from” field as well as valid accounts to be accepted by the mailserver. Note that although the accounts must specify an email domain (which can be your own internal and not a public name), you should be able to send email to your private mailserver using an IP address if you don’t want to also set up a supporting name resolution system (which can be as simple as a hosts file entry).

HTH, Any further Q just post again,

If you’re testing an email system, I’d highly recommend you do your initial testing sending email using the command line instead of using an email client.

Besides being simpler and able to bypass any possible coding errors, each configuration field becomes completely clear because you have to manually set each one. There won’t be any question whether any fields aren’t set or set correctly.