LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 07-09-2008, 12:00 AM   #1
syok
LQ Newbie
 
Registered: Jan 2006
Posts: 25

Rep: Reputation: 15
mail sent to internet fail using php


hello there ,
i'm using mail($to,$subj,$mes); /($to,$subj,$mes,$header); to send out mail to gmail(for example).

This is mesej from /var/log/mail.info

Jul 9 12:49:42 ekl03yy postfix/pickup[11194]: 36F0F18DD5: uid=30 from=<wwwrun>
Jul 9 12:49:42 ekl03yy postfix/cleanup[11394]: 36F0F18DD5: message-id=<20080709044942.36F0F18DD5@ekl03yy.zz.gov.my>
Jul 9 12:49:42 ekl03yy postfix/qmgr[11198]: 36F0F18DD5: from=<wwwrun@ekl03yy.zz.gov.my>, size=429, nrcpt=1 (queue active)
Jul 9 12:50:06 ekl03yy postfix/smtp[11396]: 36F0F18DD5: to=<xxx@gmail.com>, relay=192.168.240.25[192.168.240.25], delay=24, status=sent (250 Message accepted for delivery)
Jul 9 12:50:06 ekl03yy postfix/qmgr[11198]: 36F0F18DD5: removed


i'm not allow to use user wwwrun.it should be another user.

1) how to change user from wwwrun@ekl03yy.zz.gov.my to userok@zz,gov.my


tq
 
Old 07-09-2008, 06:38 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
gmail *accepted* your email. That is what status=sent (250 ...) means.

You can change the envelope sender by adding a 5th argument to mail():

"-f userok@zz,gov.my".

This argument is passed to sendmail, the actual program that places the mail in the postfix queue.

man sendmail for more info.
 
Old 07-09-2008, 11:18 PM   #3
syok
LQ Newbie
 
Registered: Jan 2006
Posts: 25

Original Poster
Rep: Reputation: 15
Thank you for help
Found the solution....

change user in /etc/postfix/sender_canonicle and update sender_canonicle.db

i did try the fifth arg but still not working...
 
Old 07-09-2008, 11:19 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Use a generics table instead of sender_canonical.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cluster POSTFIX mail server(fail over) SlackKernel Linux - Server 3 09-24-2007 03:43 PM
Browser(s) Fail to Connect to Internet OldBob Linux - Networking 10 04-13-2007 08:36 AM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 06:06 PM
postfix outgoing mail fail from outlook express importboy03 Linux - Networking 0 02-20-2003 02:54 PM
mail server fail to send out and receive, help!! littlelittle Linux - Networking 7 03-14-2002 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 03:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration