osx - Php mail() on OS X localhost keeps getting rejected as spam -
i send mails little php script on os x 10.9.
mail($_post['to'], $_post['subject'], $_post['message'], "from: " . $_post['from']);
the method returns true message never arrives @ inbox :( i've locked @ error messages postfix , tell me it's blocked because of spam.
mar 6 11:30:38 xxxs-macbook-pro.local postfix/pickup[69960]: bb98e14dd64a: uid=70 from=<_www> mar 6 11:30:38 xxxs-macbook-pro.local postfix/cleanup[70313]: bb98e14dd64a: message-id=<20140306103038.bb98e14dd64a@xxxs- macbook-pro.local> mar 6 11:30:38 xxxs-macbook-pro.local postfix/qmgr[69961]: bb98e14dd64a: from=<_www@xxxs-macbook-pro.local>, size=384, nrcpt=1 (queue active) mar 6 11:30:39 xxxs-macbook-pro.local postfix/smtp[70315]: bb98e14dd64a: to=<xxx@xxx.com>, relay=mx3.me.com.akadns.net[17.172. 34.65]:25, delay=0.67, delays=0/0/0.53/0.14, dsn=5.7.1, status=bounced (host mx3.me.com.akadns.net[17.172.34.65] said: 550 5.7.1 mail ip 95.91.221.96 rejected due listing in spamhaus pbl. details please see http://www.spamhaus.org/query/bl?ip=95. 91.221.96 : xxx@xxx.com (in reply rcpt command)) mar 6 11:30:39 xxxs-macbook-pro.local postfix/cleanup[70313]: 8c52414dd64d: message-id=<20140306103039.8c52414dd64d@xxxs- macbook-pro.local> mar 6 11:30:39 xxxs-macbook-pro.local postfix/bounce[70316]: bb98e14dd64a: sender non-delivery notification: 8c52414dd64d mar 6 11:30:39 xxxs-macbook-pro.local postfix/qmgr[69961]: 8c52414dd64d: from=<>, size=2669, nrcpt=1 (queue active) mar 6 11:30:39 xxxs-macbook-pro.local postfix/qmgr[69961]: bb98e14dd64a: removed mar 6 11:30:39 xxxs-macbook-pro.local postfix/local[70317]: 8c52414dd64d: to=<_www@xxxs-macbook-pro.local>, relay=local, delay=0, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered mailbox) mar 6 11:30:39 xxxs-macbook-pro.local postfix/qmgr[69961]: 8c52414dd64d: removed
how can circumvent this?
cheers daniel
the ip listed in spamhaus:
mail ip 95.91.221.96 rejected due listing in spamhaus pbl.
the spamhaus pbl dnsbl database of end-user ip address ranges should not delivering unauthenticated smtp email internet mail server except provided isp customer's use. pbl helps networks enforce acceptable use policy dynamic , non-mta customer ip ranges.
this means using ip isp delivering e-mail. isp actively prohibits prevent customers sending spam. simple solution use smtp server provided isp. can configure in php.ini default server instead of localhost:
[mail function] ; win32 only. ; http://php.net/smtp smtp = mail.yourisp.com ; http://php.net/smtp-port smtp_port = 25
there number of reasons not use local mail() function php sending mail. best known alternative phpmailer. code has it's own built-in smtp client sending mail in proper way. can integrate in software furthermore prevent mail being marked spam.
Comments
Post a Comment