php mail not working

  • Hi there,


    I just installed i-mscp latest stable version, however phpmail is not working.


    I can't sen any emails with php mail, but I don't know why. It doesnt write any errors for me. :-(


    How can I find the problem and solve it? Help, please!
    [hr]
    This wrote:
    [code=php]<?php
    $email = <a valid address>;
    $from = <a valid address>;


    if(!mail($email, 'Test subject', 'message', 'From: '. $from . "\r\n")) {
    echo "FAILURE";
    }
    else {
    echo "SUCCESS";
    }
    ?>[/php]
    SUCCESS... but mail wont delivered... :-(
    [hr]
    in my main config:
    [code=php]# ====================================================================
    # i-MSCP Internet - Multi Server Control Panel
    #
    # @copyright 2010-2012 by i-MSCP | http://www.i-mscp.net
    # @link http://www.i-mscp.net
    # @author i-MSCP Team


    # Postfix directory settings; These are critical for normal Postfix MTA functionallity
    command_directory = /usr/sbin
    daemon_directory = /usr/lib/postfix


    # Some common configuration parameters
    inet_protocols = ipv4, ipv6
    inet_interfaces = all
    mynetworks_style = host


    myhostname = webstar.tigyisolutions.hu
    mydomain = webstar.tigyisolutions.hu.local
    myorigin = $myhostname


    smtpd_banner = $myhostname ESMTP i-MSCP 1.1.0-beta1 Managed
    setgid_group = postdrop


    # Receiving messages parameters
    mydestination = $myhostname, $mydomain
    append_dot_mydomain = no
    append_at_myorigin = yes
    local_transport = local
    transport_maps = hash:/etc/postfix/imscp/transport
    relay_domains = hash:/etc/postfix/imscp/relay_domains
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases


    # Delivering local messages parameters
    mail_spool_directory = /var/mail


    # Mailboxquota
    # => 0 for unlimited
    # => 104857600 for 100 MB
    mailbox_size_limit = 0
    mailbox_command = procmail -a "$EXTENSION"


    # Message size limit
    # => 0 for unlimited
    # => 104857600 for 100 MB
    message_size_limit = 0


    biff = no
    recipient_delimiter = +


    local_destination_recipient_limit = 1
    local_recipient_maps = unix:passwd.byname $alias_database


    # i-MSCP Autoresponder parameters
    imscp-arpl_destination_recipient_limit = 1


    # Delivering virtual messages parameters
    virtual_mailbox_base = /var/mail/virtual
    virtual_mailbox_limit = 0


    virtual_mailbox_domains = hash:/etc/postfix/imscp/domains
    virtual_mailbox_maps = hash:/etc/postfix/imscp/mailboxes


    virtual_alias_maps = hash:/etc/postfix/imscp/aliases


    virtual_minimum_uid = 5000
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:8


    # SASL parameters
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes


    smtpd_helo_required = yes


    smtpd_helo_restrictions = permit_mynetworks,
    permit_sasl_authenticated,
    reject_invalid_helo_hostname,
    reject_non_fqdn_helo_hostname


    smtpd_sender_restrictions = reject_non_fqdn_sender,
    reject_unknown_sender_domain,
    permit_mynetworks,
    permit_sasl_authenticated


    smtpd_recipient_restrictions = reject_non_fqdn_recipient,
    reject_unknown_recipient_domain,
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unauth_destination,
    reject_unlisted_recipient,
    check_policy_service inet:127.0.0.1:12525,
    check_policy_service inet:127.0.0.1:10023,
    permit


    smtpd_data_restrictions = reject_multi_recipient_bounce,
    reject_unauth_pipelining


    # TLS parameters
    #smtpd_tls_security_level = may
    #smtpd_tls_loglevel = 2
    #smtpd_tls_cert_file = /etc/imscp/webstar.tigyisolutions.hu.pem
    #smtpd_tls_key_file = /etc/imscp/webstar.tigyisolutions.hu.pem
    #smtpd_tls_auth_only = no
    #smtpd_tls_received_header = yes


    # AMaViS parameters; activate, if available/used
    #content_filter = amavis:[127.0.0.1]:10024


    # Quota support; activate, if available/used
    #virtual_create_maildirsize = yes
    #virtual_mailbox_extended = yes
    #virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
    #virtual_mailbox_limit_override = yes
    #virtual_maildir_limit_message = "The user you're trying to reach is over mailbox quota."
    #virtual_overquota_bounce = yes



    smtpd_sasl_local_domain =
    virtual_transport = virtual


    [/php]

    Edited once, last by ttjanos ().


  • And what can you find in your logs?


    That's the funny: If I register a new user (with my reseller account) he/she got an e-mail from my server. And system mails are delivered... (orderpanel mail not delivered...)



    It looks like google banned my IP? :-o Wow... Why? How? :-D



    [hr]
    That's it. Gmail blocked my ip. Other mail systems can get my mails... :-D ... What can I do with gmail?
    [hr]
    That's it. Gmail blocked my ip. Other mail systems can get my mails... :-D ... What can I do with gmail?

    Edited once, last by ttjanos ().

  • Hi


    strange is that your IP is another than the hostname tell... but this is maybe wanted...


    "Our system has detected an unusual rate of 550-5.7.1 unsolicited mail originating from your IP address"... maybe wait some time or have a look at the link...


    And: you shold make sure there's a reverse lookup for your ip:
    127.48.199.94.in-addr.arpa. 86100 IN PTR no.reverse.


    /J

  • @ttjanos
    are you sure you don´t mix up things?
    i see in your logs a mail-adr. that is normally used with the "EHCP" control-panel. if you had installed "EHCP" before make sure you cleaned really!!!
    you may know that "EHCP" is very easy to "hack" so be aware that may your server was kompromized before.


    the best thing is to install I-MSCP on a clean server-setup. think on not to use passwords wich you may ever have used with "EHCP"


  • Yes I tried EHCP for a few hours only. I deleted it, Cos that is a poor software.


    I looked at the url, but I can find no solutions for this problem. This is a dedicated server that I wanted to use.


    Somethink wrong with my IP, cos other mail providers can receive my phpmails. omg.