Problem with mail

Discussion in 'ISPConfig 3 Priority Support' started by Lucav87, Dec 26, 2015.

  1. Lucav87

    Lucav87 New Member

    Hello,
    I have a problem with sending emails via a form .. a domain on my server, use the external mail server (only website hosting on my server no email), and when a customer sends an email from his website, the mail It comes to him ...

    This is a log:
    Code:
    Dec 26 16:18:28 srv2 postfix/pickup[16590]: D837961E3D: uid=5010 from=<[email protected]>
    Dec 26 16:18:28 srv2 postfix/cleanup[16595]: D837961E3D: message-id=<[email protected]>
    Dec 26 16:18:28 srv2 postfix/qmgr[16591]: D837961E3D: from=<[email protected]>, size=476, nrcpt=1 (queue active)
    Dec 26 16:18:29 srv2 postfix/smtpd[16603]: connect from srv2.lucavasini.it[127.0.0.1]
    Dec 26 16:18:29 srv2 postfix/smtpd[16603]: 4C9136070C: client=srv2.lucavasini.it[127.0.0.1]
    Dec 26 16:18:29 srv2 postfix/cleanup[16595]: 4C9136070C: message-id=<[email protected]>
    Dec 26 16:18:29 srv2 postfix/qmgr[16591]: 4C9136070C: from=<[email protected]>, size=961, nrcpt=1 (queue active)
    Dec 26 16:18:29 srv2 postfix/smtpd[16603]: disconnect from srv2.lucavasini.it[127.0.0.1]
    Dec 26 16:18:29 srv2 amavis[1984]: (01984-16) Passed CLEAN {RelayedInternal}, LOCAL [127.0.0.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: rg_3ktTU_cuB, Hits: 0.009, size: 476, queued_as: 4C9136070C, 410 ms
    Dec 26 16:18:29 srv2 postfix/smtp[16599]: D837961E3D: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.46, delays=0.03/0.02/0.01/0.41, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 4C9136070C)
    Dec 26 16:18:29 srv2 postfix/qmgr[16591]: D837961E3D: removed
    Dec 26 16:18:29 srv2 postfix/pipe[16607]: 4C9136070C: to=<[email protected]>, relay=dovecot, delay=0.05, delays=0.01/0.01/0/0.03, dsn=5.1.1, status=bounced (user unknown)
    Dec 26 16:18:29 srv2 postfix/cleanup[16595]: 589E761E44: message-id=<[email protected]>
    Dec 26 16:18:29 srv2 postfix/qmgr[16591]: 589E761E44: from=<>, size=2832, nrcpt=1 (queue active)
    Dec 26 16:18:29 srv2 postfix/bounce[16611]: 4C9136070C: sender non-delivery notification: 589E761E44
    Dec 26 16:18:29 srv2 postfix/qmgr[16591]: 4C9136070C: removed
    Dec 26 16:18:29 srv2 postfix/pipe[16607]: 589E761E44: to=<[email protected]>, relay=dovecot, delay=0.02, delays=0/0/0/0.01, dsn=5.1.1, status=bounced (user unknown)
    Dec 26 16:18:29 srv2 postfix/qmgr[16591]: 589E761E44: removed
    sori for my bad english...
    thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The "To" email address does not exist on the server.

    a) If you use this server for webhosting only, then ensure that you do not add the domain as email domain in the mail module.
    b) If this server is the email server for the domain, then add the missing address or send the email to another, existing email address.
     
  3. Lucav87

    Lucav87 New Member

    Hello,
    I removed domain zavatta.it to mail module and a tried to send a email from contact form..
    if I enter a different email address is not @ zavatta.it the email I get

    Code:
    Dec 26 16:41:42 srv2 postfix/pickup[16590]: DD14561E1E: uid=5010 from=<[email protected]>
    Dec 26 16:41:42 srv2 postfix/cleanup[20911]: DD14561E1E: message-id=<[email protected]>
    Dec 26 16:41:42 srv2 postfix/qmgr[16591]: DD14561E1E: from=<[email protected]>, size=458, nrcpt=1 (queue active)
    Dec 26 16:41:43 srv2 postfix/smtpd[20917]: connect from srv2.lucavasini.it[127.0.0.1]
    Dec 26 16:41:43 srv2 postfix/smtpd[20917]: A3792606EB: client=srv2.lucavasini.it[127.0.0.1]
    Dec 26 16:41:43 srv2 postfix/cleanup[20911]: A3792606EB: message-id=<[email protected]>
    Dec 26 16:41:43 srv2 postfix/qmgr[16591]: A3792606EB: from=<[email protected]>, size=943, nrcpt=1 (queue active)
    Dec 26 16:41:43 srv2 postfix/smtpd[20917]: disconnect from srv2.lucavasini.it[127.0.0.1]
    Dec 26 16:41:43 srv2 amavis[1986]: (01986-17) Passed CLEAN {RelayedInternal}, LOCAL [127.0.0.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: ugr-MoQCUZ4R, Hits: 0.009, size: 458, queued_as: A3792606EB, 751 ms
    Dec 26 16:41:43 srv2 postfix/smtp[20914]: DD14561E1E: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.79, delays=0.02/0.01/0.01/0.75, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as A3792606EB)
    Dec 26 16:41:43 srv2 postfix/qmgr[16591]: DD14561E1E: removed
    Dec 26 16:41:45 srv2 postfix/smtp[20919]: A3792606EB: to=<[email protected]>, relay=mail.zavatta.it[86.110.157.210]:25, delay=1.6, delays=0.01/0.02/0.74/0.82, dsn=5.0.0, status=bounced (host mail.zavatta.it[86.110.157.210] said: 550 <[email protected]>, Sender unknown (in reply to MAIL FROM command))
    Dec 26 16:41:45 srv2 postfix/cleanup[20911]: 6515C61E45: message-id=<[email protected]>
    Dec 26 16:41:45 srv2 postfix/qmgr[16591]: 6515C61E45: from=<>, size=2986, nrcpt=1 (queue active)
    Dec 26 16:41:45 srv2 postfix/bounce[20920]: A3792606EB: sender non-delivery notification: 6515C61E45
    Dec 26 16:41:45 srv2 postfix/qmgr[16591]: A3792606EB: removed
    Dec 26 16:41:46 srv2 postfix/smtp[20919]: 6515C61E45: to=<[email protected]>, relay=mail.zavatta.it[86.110.157.210]:25, delay=0.61, delays=0/0/0.35/0.24, dsn=5.0.0, status=bounced (host mail.zavatta.it[86.110.157.210] said: 550 Backscatter Protection detected an invalid bounce address (in reply to RCPT TO command))
    Dec 26 16:41:46 srv2 postfix/qmgr[16591]: 6515C61E45: removed
    
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ensure that you added a webmaster email address on the mail server of this domain.
     
  5. Lucav87

    Lucav87 New Member

    the mail server is not managed by me :(
    i send an email address: [email protected]
    do you think is this the problem? why if I send an email to another adress this not happens?
     
    Last edited: Dec 26, 2015
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The recipient server tries to verify that the webmaster@ address exists, such a check is not common, but it can happen. so you have to ensure that the webmaster@ address exists if you want to send an email to this address.
     
  7. Lucav87

    Lucav87 New Member

    Hello,
    thanks for the reply... do you think is a problem contact form? (PHP)?
    I also see from the warm-log:

    thanks!
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The log warnings are not from the contact for script. The problem that you have occurs because the recipient does an extended sender check and the webmaster@ address which should exist is not there, so either add it for this domain or use another recipient that does not check for its existence.
     
  9. Lucav87

    Lucav87 New Member

    Hello..
    mail webmaster@ created but the email do not come...

    Code:
    Dec 28 16:40:01 srv2 postfix/smtpd[10683]: connect from srv2.lucavasini.it[127.0.0.1]
    Dec 28 16:40:01 srv2 postfix/smtpd[10683]: lost connection after CONNECT from srv2.lucavasini.it[127.0.0.1]
    Dec 28 16:40:01 srv2 postfix/smtpd[10683]: disconnect from srv2.lucavasini.it[127.0.0.1]
    Dec 28 16:40:34 srv2 postfix/pickup[30815]: 7D7C861E91: uid=5010 from=<[email protected]>
    Dec 28 16:40:34 srv2 postfix/cleanup[11453]: 7D7C861E91: message-id=<[email protected]>
    Dec 28 16:40:34 srv2 postfix/qmgr[1678]: 7D7C861E91: from=<[email protected]>, size=468, nrcpt=1 (queue active)
    Dec 28 16:40:34 srv2 postfix/smtpd[11459]: connect from srv2.lucavasini.it[127.0.0.1]
    Dec 28 16:40:34 srv2 postfix/smtpd[11459]: D03325FA47: client=srv2.lucavasini.it[127.0.0.1]
    Dec 28 16:40:34 srv2 postfix/cleanup[11453]: D03325FA47: message-id=<[email protected]>
    Dec 28 16:40:34 srv2 postfix/qmgr[1678]: D03325FA47: from=<[email protected]>, size=953, nrcpt=1 (queue active)
    Dec 28 16:40:34 srv2 postfix/smtpd[11459]: disconnect from srv2.lucavasini.it[127.0.0.1]
    Dec 28 16:40:34 srv2 amavis[31735]: (31735-08) Passed CLEAN {RelayedOutbound}, LOCAL [127.0.0.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: 5qMzN9lZXU7C, Hits: 0.009, size: 468, queued_as: D03325FA47, 332 ms
    Dec 28 16:40:34 srv2 postfix/smtp[11456]: 7D7C861E91: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.36, delays=0.02/0.01/0/0.33, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as D03325FA47)
    Dec 28 16:40:34 srv2 postfix/qmgr[1678]: 7D7C861E91: removed
    Dec 28 16:40:42 srv2 postfix/smtp[11461]: D03325FA47: to=<[email protected]>, relay=mail.zavatta.it[86.110.157.210]:25, delay=7.7, delays=0.01/0.01/2.1/5.6, dsn=5.0.0, status=bounced (host mail.zavatta.it[86.110.157.210] said: 530 Authentication required (in reply to RCPT TO command))
    Dec 28 16:40:42 srv2 postfix/cleanup[11453]: 9425761F4C: message-id=<[email protected]>
    Dec 28 16:40:42 srv2 postfix/qmgr[1678]: 9425761F4C: from=<>, size=2964, nrcpt=1 (queue active)
    Dec 28 16:40:42 srv2 postfix/bounce[11462]: D03325FA47: sender non-delivery notification: 9425761F4C
    Dec 28 16:40:42 srv2 postfix/qmgr[1678]: D03325FA47: removed
    Dec 28 16:40:43 srv2 postfix/smtp[11461]: 9425761F4C: to=<[email protected]>, relay=mail.zavatta.it[86.110.157.210]:25, delay=0.53, delays=0/0/0.41/0.12, dsn=5.0.0, status=bounced (host mail.zavatta.it[86.110.157.210] said: 550 Backscatter Protection detected an invalid bounce address (in reply to RCPT TO command))
    Dec 28 16:40:43 srv2 postfix/qmgr[1678]: 9425761F4C: removed
    my php file:

    PHP:
    <?php

    include dirname(dirname(__FILE__)).'/mail.php';

    error_reporting (E_ALL E_NOTICE);

    $post = (!empty($_POST)) ? true false;

    if(
    $post)
    {
    include 
    'email_validation.php';

    $name stripslashes($_POST['name']);
    $email trim($_POST['email']);
    $subject stripslashes($_POST['subject']);
    $message stripslashes($_POST['message']);


    $error '';

    // Check name

    if(!$name)
    {
    $error .= 'Perfavore inserisci il tuo nome.<br />';
    }

    // Check email

    if(!$email)
    {
    $error .= 'Perfavore inserisci un indirizzo email.<br />';
    }

    if(
    $email && !ValidateEmail($email))
    {
    $error .= '550 Backscatter Protection detected an invalid bounce address.<br />';
    }

    // Check message (length)

    if(!$message || strlen($message) < 10)
    {
    $error .= "Perfavore inserisci il tuo messaggio. Lunghezza minima 10 caratteri.<br />";
    }


    if(!
    $error)
    {
    $mail mail(CONTACT_FORM$subject$message,
         
    "From: ".$email." <".$email.">\r\n"
        
    // ."Reply-To: ".$email."\r\n"
        
    ."X-Mailer: PHP/" phpversion());


    if(
    $mail)
    {
    echo 
    'OK';
    }

    }
    else
    {
    echo 
    '<div class="notification_error">'.$error.'</div>';
    }

    }
    ?>

    email_validation.php
    PHP:
    <?php
    function ValidateEmail($value)
    {
        
    $regex '/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i';

        if(
    $value == '') {
            return 
    false;
        } else {
            
    $string preg_replace($regex''$value);
        }

        return empty(
    $string) ? true false;
    }
    ?>
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The log is a bit strange as it says that the recipient address requires smtp authentication. Please ensure that you have no email accounts and no mail domain for this domain on your web server. the webmaster@ address has to be created on the mail server that is responsible for the email of this domain, not on the web server.
     

Share This Page