Re: php mail() function
| From: | Paul M Foster | Date: | Sat, 24 Oct 2009 04:51:44 +0000 |
| Subject: | Re: php mail() function | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299281@lists.php.net to get a copy of this message | ||
On Fri, Oct 23, 2009 at 09:11:25PM -0700, James Prentice wrote:
> I found the mail server for my ISP (shawmail.vc.shawcable.net) and
> edited main.cf in the following manner:
>
> myhostname = shawcable.net
> relayhost = [shawmail.vc.shawcable.net]
>
> I still don't receive the mail from the PHP script though. The error
> log from /var/log/mail.log is this:
>
> Oct 23 21:00:31 homemade postfix/pickup[7044]: 6CA44A70109: uid=33
> from=<www-data>
> Oct 23 21:00:31 homemade postfix/cleanup[7107]: 6CA44A70109:
> message-id=<20091024040031.6CA44A70109@shawcable.net>
> Oct 23 21:00:31 homemade postfix/qmgr[7045]: 6CA44A70109:
> from=<www-data@shawcable.net>, size=527, nrcpt=1 (queue active)
> Oct 23 21:00:31 homemade postfix/error[7109]: 6CA44A70109:
> to=<xxx@gmail.com>, relay=none, delay=0.04, delays=0.03/0/0/0.01,
> dsn=5.0.0, status=bounced ([shawmail.vc.shawcable.net])
> Oct 23 21:00:31 homemade postfix/cleanup[7107]: 75517A7010A:
> message-id=<20091024040031.75517A7010A@shawcable.net>
> Oct 23 21:00:31 homemade postfix/bounce[7110]: 6CA44A70109: sender
> non-delivery notification: 75517A7010A
> Oct 23 21:00:31 homemade postfix/qmgr[7045]: 75517A7010A: from=<>,
> size=2219, nrcpt=1 (queue active)
> Oct 23 21:00:31 homemade postfix/qmgr[7045]: 6CA44A70109: removed
> Oct 23 21:00:31 homemade postfix/error[7109]: 75517A7010A:
> to=<www-data@shawcable.net>, relay=none, delay=0.03,
> delays=0.02/0/0/0.01, dsn=5.0.0, status=bounced
> ([shawmail.vc.shawcable.net])
> Oct 23 21:00:31 homemade postfix/qmgr[7045]: 75517A7010A: removed
>
> Have I edited main.cf incorrectly, or are there other values that need
> to be edited?
1. Not sure why you have square brackets around the relayhost value.
2. You're getting a bounce from the ISP's mail server, one indicating it
still won't allow relay.
3. I suspect the relayhost name is wrong. This may be the name you find
in the mail headers on messages relayed to you, but I doubt it's the one
you should use to post to. I could be wrong, though.
4. All due respect to Kranthi, but I believe he's wrong about relaying
mail from your webserver to the ISP's mailserver. I believe the ISP's
mailserver doesn't care, as long as the mail comes from your "pipe". You
could probably call yourself "pizza@pepperoni.com" and your ISP would
accept it. It's just the From:. Again, I could be wrong.
5. This would be a lot simpler if you just call Shaw and ask them for
the name of the mailserver, and ask them if it's a problem for you to
post mail from your internal webserver to their mailserver. Then ask
them why such posts might bounce with a 5XX error.
Paul
Paul
--
Paul M. Foster