#1  
Old 8th December 2005, 10:21
rosa hsiao rosa hsiao is offline
Member
 
Join Date: Oct 2005
Posts: 93
Thanks: 0
Thanked 1 Time in 1 Post
Default php mail error

The following php function works fine in another RedHat 9 server using sendmain without ISPConfig.

<?
(mail ("sales01@test2.com", "PHP mail Testing....", "How are you?"));
?>

"test2.com" is another domain hosted in RedHat 9 server.

but the above php function doesn' t work in Fedora 3 using postfix with ISPConfig installed in domain "test.com".
There is no problem receiving or sending emails with webmail using "sales01@test.com" (web07_sales01) account.

I have the following lines in main.cf:

mydomain = test.com
myorgin = $mydomain
inet_interfaces = all
# local_recipient_maps =
#local_recipient_maps =
mynetworks_style = subnet
#relayhost = $mydomain
#relay_recipient_maps = hash:/etc/postfix/relay_recipients
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
mail.$mydomain, www.$mydomain, ftp.$mydomain
mydestination = /etc/postfix/local-host-names
virtual_maps = hash:/etc/postfix/virtusertable
virtual_mailbox_domains = hash:/etc/postfix/vmaildomains
relay_domains = $#mydestination
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_ relay_domains
home_mailbox = Mailbox
virtual_mailbox_base = /var/spool/virtual
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_mailbox_domains = hash:/etc/postfix/vmaildomains
virtual_uid_maps = static:200
virtual_gid_maps = static:200
virtual_mailbox_lock = dotlock
virtual_minimum_uid = 200

But when I run

telnet localhost 25
and then issue
ehlo localhost

I don't see a line starting with 250-AUTH.


Any suggestion?
Reply With Quote
Sponsored Links
  #2  
Old 8th December 2005, 11:03
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,177
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

Please check your maillog for errors. Can you send emails to other domains outside this server with the php mail function?

Last edited by till; 8th December 2005 at 11:54.
Reply With Quote
  #3  
Old 8th December 2005, 11:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Please post the exact output of
Code:
telnet localhost 25
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 8th December 2005, 13:39
rosa hsiao rosa hsiao is offline
Member
 
Join Date: Oct 2005
Posts: 93
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till
Please check your maillog for errors. Can you send emails to other domains outside this server with the php mail function?
No. I can't send emails to other domains outside this server (e.g. bytelib@ms2.hinet.net) with the php mail function. When I run the function in the browser,nothing happens at all.

But,when I use webmail to send email with pink@test.com to bytelib@ms2.hinet.net,it can send out the mail and receive reply from bytelib@ms2.hinet.net.

Here is the telnet message:

[root@server1~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1)
Escape character is '^]'.
220 server1.test.com ESMTP Postfix
ehlo localhost
250-server1.test.com
250-PIPELINING
250-VRFY
250-ETRN
250-8BITMIME

Here is the /var/log/maillog message:

Dec 8 20:07:31 server1 postfix/postfix-script: starting the Postfix mail system
Dec 8 20:07:31 server1 postfix/master[3429]: daemon started -- version 2.1.5
Dec 8 20:07:31 server1 postfix/qmgr[3440]: C6C391268059: from=<apache@server1.test.com>, size=559, nrcpt=1 (queue active)
Dec 8 20:07:31 server1 postfix/qmgr[3440]: 87E34126805B: from=<apache@server1.test.com>, size=559, nrcpt=1 (queue active)
Dec 8 20:07:31 server1 postfix/qmgr[3440]: 3A53B126805A: from=<apache@server1.test.com>, size=559, nrcpt=1 (queue active)
Dec 8 20:07:31 server1 postfix/qmgr[3440]: 437C7126804F: from=<apache@server1.test.com>, size=559, nrcpt=1 (queue active)
Dec 8 20:07:34 server1 postfix/smtp[3443]: connect to ms2a.hinet.net[168.95.5.2]: Connection refused (port 25)
Dec 8 20:07:34 server1 postfix/smtp[3445]: connect to ms2a.hinet.net[168.95.5.2]: Connection refused (port 25)
Dec 8 20:07:34 server1 postfix/smtp[3444]: connect to ms2a.hinet.net[168.95.5.2]: Connection refused (port 25)
Dec 8 20:07:34 server1 postfix/smtp[3442]: connect to ms2a.hinet.net[168.95.5.2]: Connection refused (port 25)
Dec 8 20:07:34 server1 postfix/smtp[3443]: 87E34126805B: to=<bytelib@ms2.hinet.net>, relay=none, delay=1190, status=deferred (connect to ms2a.hinet.net[168.95.5.2]: Connection refused)
Dec 8 20:07:34 server1 postfix/smtp[3445]: 437C7126804F: to=<bytelib@ms2.hinet.net>, relay=none, delay=1405, status=deferred (connect to ms2a.hinet.net[168.95.5.2]: Connection refused)
Dec 8 20:07:34 server1 postfix/smtp[3444]: 3A53B126805A: to=<bytelib@ms2.hinet.net>, relay=none, delay=1194, status=deferred (connect to ms2a.hinet.net[168.95.5.2]: Connection refused)
Dec 8 20:07:34 server1 postfix/smtp[3442]: C6C391268059: to=<bytelib@ms2.hinet.net>, relay=none, delay=1232, status=deferred (connect to ms2a.hinet.net[168.95.5.2]: Connection refused)
Dec 8 20:07:49 server1 postfix/postfix-script: stopping the Postfix mail system
Dec 8 20:07:49 server1 postfix/master[3429]: terminating on signal 15
Dec 8 20:07:49 server1 postfix/postfix-script: starting the Postfix mail system
Dec 8 20:07:49 server1 postfix/master[4010]: daemon started -- version 2.1.5
Dec 8 20:09:35 server1 ipop3d[4861]: pop3 service init from 127.0.0.1
Dec 8 20:09:35 server1 ipop3d[4861]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Dec 8 20:09:35 server1 ipop3d[4861]: Login user=web1_pink host=server1.test.com [127.0.0.1] nmsgs=0/0
Dec 8 20:09:35 server1 ipop3d[4861]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Dec 8 20:09:35 server1 ipop3d[4861]: Logout user=web1_pink host=server1.test.com [127.0.0.1] nmsgs=0 ndele=0
Dec 8 20:10:06 server1 postfix/smtpd[4868]: connect from server1.test.com[127.0.0.1]
Dec 8 20:10:06 server1 postfix/smtpd[4868]: 55591126805C: client=server1.test.com[127.0.0.1]
Dec 8 20:10:06 server1 postfix/cleanup[4871]: 55591126805C: message-id=<20051208121006.55591126805C@server1.test.com>
Dec 8 20:10:06 server1 postfix/qmgr[4014]: 55591126805C: from=<pink@test.com>, size=768, nrcpt=1 (queue active)
Dec 8 20:10:06 server1 postfix/smtpd[4868]: disconnect from server1.test.com[127.0.0.1]
Dec 8 20:10:06 server1 ipop3d[4872]: pop3 service init from 127.0.0.1
Dec 8 20:10:06 server1 ipop3d[4872]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Dec 8 20:10:06 server1 ipop3d[4872]: Login user=web1_pink host=server1.test.com [127.0.0.1] nmsgs=0/0
Dec 8 20:10:06 server1 ipop3d[4872]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Dec 8 20:10:06 server1 ipop3d[4872]: Logout user=web1_pink host=server1.test.com [127.0.0.1] nmsgs=0 ndele=0
Dec 8 20:10:15 server1 ipop3d[4878]: pop3 service init from 127.0.0.1
Dec 8 20:10:15 server1 ipop3d[4878]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Dec 8 20:10:15 server1 ipop3d[4878]: Login user=web1_pink host=server1.test.com [127.0.0.1] nmsgs=0/0
Dec 8 20:10:15 server1 ipop3d[4878]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Dec 8 20:10:15 server1 ipop3d[4878]: Logout user=web1_pink host=server1.test.com [127.0.0.1] nmsgs=0 ndele=0
Dec 8 20:10:23 server1 postfix/smtp[4873]: 55591126805C: to=<bytelib@ms2.hinet.net>, relay=ms2a.hinet.net[168.95.5.2], delay=17, status=sent (250 UAA01375 Message accepted for delivery)
Dec 8 20:10:23 server1 postfix/qmgr[4014]: 55591126805C: removed
Reply With Quote
  #5  
Old 8th December 2005, 16:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Seems to be a problem with ms2a.hinet.net. I also get "Connection refused":

Quote:
# telnet ms2a.hinet.net 25
Trying 168.95.5.2...
telnet: Unable to connect to remote host: Connection refused
Maybe you should contact them and ask why this happens...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 9th December 2005, 02:19
rosa hsiao rosa hsiao is offline
Member
 
Join Date: Oct 2005
Posts: 93
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko
Seems to be a problem with ms2a.hinet.net. I also get "Connection refused":



Maybe you should contact them and ask why this happens...
I don't think it as a problem of ms2a.hinet.net,because I can send and receive emails for bytelib@ms2.hinet.net and I can also send and receive emails to bytelib@ms2.hinet.net using web1_pink@test.com via ISPConfig's Webmail.

If I change the php mail function to another email address outside of ISPConfig Server,the result is still the same.

<?
(mail ("bytemall@mail.apol.com.tw", "PHP mail Testing....", "How are you?"));
?>

Nothing was added to maillog and there is no action at all,nor did I receive any error message on the screen.

Do I need to modify main.cf to other value as below?

mynetworks = 127.0.0.0/8
or
mynetworks = 192.168.1.0/24


mynetworks_style = subnet
or
mynetworks_style = host
Reply With Quote
  #7  
Old 9th December 2005, 10:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

I really think you should contact the maintainer/administrator/ISP of ms2a.hinet.net. I guess they're having some kind of policy the restricts access to that mail server...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 9th December 2005, 13:33
rosa hsiao rosa hsiao is offline
Member
 
Join Date: Oct 2005
Posts: 93
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Quote:
Originally Posted by falko
I really think you should contact the maintainer/administrator/ISP of ms2a.hinet.net. I guess they're having some kind of policy the restricts access to that mail server...
The problem is smtp authentication. Now I can use php mail funtion without fail. Thanks for your help.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filtering emails using Spamassassin and Clamav for Exchange 2000 Server Rocky Server Operation 19 11th March 2008 08:27
PHP form mail error.... pjm2211 Installation/Configuration 5 3rd November 2005 18:20
Could not make OpenSSL yontengyatso Installation/Configuration 3 3rd November 2005 10:50
internal domain error with mail matehortua Installation/Configuration 5 16th October 2005 18:31
Install stop at uuwish, UUDeview SeaWolf Installation/Configuration 6 4th October 2005 23:53


All times are GMT +2. The time now is 08:25.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.