Cannot send mail with PHP mail() command

Discussion in 'General' started by Happy_Gillmore, Jul 16, 2009.

  1. Happy_Gillmore

    Happy_Gillmore New Member

    I transfered my website to my ubuntu 8.04 server, ISPCONFIG 2.

    I had some issues with smtp authentication through email clients but at least I could email from PHP scripts.

    I re-installed the server from scratch and now smtp works fine with email clients but no longer with PHP scripts!

    Here is my /var/log/mail.log

    Code:
    Jul 16 13:06:10 server1 postfix/pickup[17858]: 043F5195A3B3: uid=33 from=<www-data>
    Jul 16 13:06:10 server1 postfix/cleanup[17951]: 043F5195A3B3: message-id=<[email protected]>
    Jul 16 13:06:10 server1 postfix/qmgr[17859]: 043F5195A3B3: from=<[email protected]>, size=936, nrcpt=1 (queue active)
    Jul 16 13:06:10 server1 postfix/smtp[17953]: 043F5195A3B3: to=<[email protected]>, relay=mx.domain.com[66.96.142.50]:25, delay=0.27, delays=0.05/0.04/0.16/0.02, dsn=5.1.0, status=bounced (host mx.domain.com[66.96.142.50] said: 550 5.1.0 error: R4.1: 70.25.41.161  (in reply to MAIL FROM command))
    Jul 16 13:06:10 server1 postfix/cleanup[17951]: 42EDB195A3B4: message-id=<[email protected]>
    Jul 16 13:06:10 server1 postfix/bounce[17955]: 043F5195A3B3: sender non-delivery notification: 42EDB195A3B4
    Jul 16 13:06:10 server1 postfix/qmgr[17859]: 42EDB195A3B4: from=<>, size=2788, nrcpt=1 (queue active)
    Jul 16 13:06:10 server1 postfix/qmgr[17859]: 043F5195A3B3: removed
    Jul 16 13:06:10 server1 postfix/local[17956]: 42EDB195A3B4: to=<[email protected]>, relay=local, delay=0.03, delays=0.02/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
    Jul 16 13:06:10 server1 postfix/qmgr[17859]: 42EDB195A3B4: removed
    

    In the log I found this:
    from=<[email protected]>
    This is not the variable being passed as the FROM email address.

    Code:
     status=bounced (host mx.domain.com[66.96.142.50] said: 550 5.1.0 error: R4.1: 70.25.41.161  (in reply to MAIL FROM command))
    
    I also made sure the FROM email alias existed on my server.


    Where does it get this weird email address from?
     
    Last edited: Jul 16, 2009
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you use mod_php or suphp?
     
  3. Mark_NL

    Mark_NL Member

    SMTP Error 550: This message indicates that the recipient specified in the RCPT command is not locally hosted on the server and relaying options prevent the message being forwarded to the recipient.

    double check the email adres you're trying to send an email to :)
     

Share This Page