CyberHosting

Make notes for a Zoho


I would like to know if it is possible to change the smtp of the mail function to point to Zoho, since I am trying to send direct mail from the site, but they are not leaving. Note: I have to make this change because I am in digital ocean and smtp is blocked
Tagged:
Tagged:

Comments

  • Try to use non-standard email port: https://blog.cyberpanel.net/2018/05/30/setup-external-smtp-on-google-cloud-platform-gcp/

    This should work with DigitalOcean too.

    I am not able to open the master.cf file as requested without a tutorial
  • Try to use non-standard email port: https://blog.cyberpanel.net/2018/05/30/setup-external-smtp-on-google-cloud-platform-gcp/

    This should work with DigitalOcean too.

    I am not able to open the master.cf file as requested without a tutorial
    You have un-installed postfix?
  • Try to use non-standard email port: https://blog.cyberpanel.net/2018/05/30/setup-external-smtp-on-google-cloud-platform-gcp/

    This should work with DigitalOcean too.

    I am not able to open the master.cf file as requested without a tutorial
    You have un-installed postfix?


    Yes it is but how the colors are in the tutorials on the net

    See below:

    # Global Postfix configuration file. This file lists only a subset
    # of all parameters. For the syntax, and for a complete parameter
    # list, see the postconf(5) manual page (command: "man 5 postconf").
    #
    # For common configuration examples, see BASIC_CONFIGURATION_README
    # and STANDARD_CONFIGURATION_README. To find these documents, use
    # the command "postconf html_directory readme_directory", or go to
    # http://www.postfix.org/.
    #
    # For best results, change no more than 2-3 parameters at a time,
    # and test if Postfix still works after every change.



    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    mail_owner = postfix
    inet_protocols = all
    mydestination = localhost, localhost.localdomain
    unknown_local_recipient_reject_code = 550
    alias_maps = hash:/etc/aliases
    "/etc/postfix/main.cf" 69L, 2857C
  • I don't understand, you can submit a ticket.

    ticket?
  • I tried, but I still could not, could you help me?


    As 25 is blocked I am trying to open port 2525 but I am not getting it, I tried to use the code below:

    iptables -A INPUT -p tcp --dport 2525 -j ACCEPT

    iptables -A FORWARD -p tcp --dport 2525 -j ACCEPT


    I checked to see the doors and even then did not appear the door 2525

    netstat -ant

    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    tcp 0 0 127.0.0.1:8891 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:7080 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:5003 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
    tcp 0 0 0.0.0.0:8090 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:45434 127.0.0.1:3307 ESTABLISHED
    tcp 0 0 127.0.0.1:45230 127.0.0.1:3307 ESTABLISHED
    tcp 0 64 167.99.149.111:22 187.34.168.149:27950 ESTABLISHED
    tcp 1 0 127.0.0.1:45428 127.0.0.1:3307 CLOSE_WAIT
    tcp 1 0 127.0.0.1:45432 127.0.0.1:3307 CLOSE_WAIT
    tcp6 0 0 :::993 :::* LISTEN
    tcp6 0 0 :::995 :::* LISTEN
    tcp6 0 0 :::3306 :::* LISTEN
    tcp6 0 0 :::587 :::* LISTEN
    tcp6 0 0 :::3307 :::* LISTEN
    tcp6 0 0 :::110 :::* LISTEN
    tcp6 0 0 :::143 :::* LISTEN
    tcp6 0 0 :::111 :::* LISTEN
    tcp6 0 0 :::465 :::* LISTEN
    tcp6 0 0 :::53 :::* LISTEN
    tcp6 0 0 :::21 :::* LISTEN
    tcp6 0 0 :::22 :::* LISTEN
    tcp6 0 0 :::25 :::* LISTEN
    tcp6 0 0 127.0.0.1:3307 127.0.0.1:45434 ESTABLISHED
    tcp6 0 0 127.0.0.1:3307 127.0.0.1:45230 ESTABLISHED
  • Open /etc/postfix/master.cf, and just after : smtp inet n – n – – smtpd paste:

    2525 inet n - n - - smtpd

    The file should look like:

    https://i1.wp.com/blog.cyberpanel.net/wp-content/uploads/2018/05/open-smtp-port-2525-postfix.png?resize=604,223&ssl=1

    Then restart postfix

    systemctl restart postfix
  • I did this and I succeeded, but now my site is returning the error: Error 502

    https://snag.gy/09iAhH.jpg

    I am using this code to send:
    <?php
    require 'phpmailer/PHPMailerAutoload.php';

    $mail = new PHPMailer;

    try {
    $mail->SetLanguage('br'); // Traduzir para pt-BR

    $mail->isSMTP(); // Seta para usar SMTP
    $mail->SMTPAuth = true; // Libera a autenticação
    $mail->SMTPDebug = 2; // Debug

    $mail->SMTPSecure = 'tls'; // Acesso com TLS exigido pelo Gmail
    $mail->Host = 'smtp.zoho.com'; // SMTP Server
    $mail->Username = '[email protected]'; // Usuário SMTP
    $mail->Password = 'minhaSenha'; // Senha do usuário
    $mail->Port = 2525; // Porta do SMTP

    $mail->setFrom('[email protected]', 'Meu SIte'); // Email e nome de quem enviara o e-mail
    $mail->addReplyTo('[email protected]', 'Meu SIte'); // E-mail e nome de quem responderá o e-mail

    $mail->addAddress('[email protected]', 'Ronaldo'); // Email e nome do destino
    //$mail->addCC('[email protected]'); // Enviar cópiar do e-mail
    //$mail->addBCC('[email protected]'); // Enviar uma cópia oculta

    //$mail->addAttachment('image.jpg', 'imagem.jpg'); // Anexa um arquivo

    $mail->isHTML(true); // Seta o envio em HTML
    $mail->CharSet = 'UTF-8'; // Charset da mensagem
    $mail->Subject = 'Título da mensagem'; // Título da mensagem
    $mail->Body = 'Olá mundo!'; // Mensagem
    $mail->AltBody = 'Ative o HTML da sua conta.'; // Mensagem alternativa
    $enviar = $mail->send(); // Envia e-mail

    if($enviar):
    echo 'Mensagem enviada com sucesso!';
    else:
    echo 'Erro ao enviar mensagem!
    ';
    echo 'Erro: '.$mail->ErrorInfo;
    endif;
    }catch(Exception $e){
    echo 'Erro ao enviar mensagem!';
    echo 'Erro: '.$mail->ErrorInfo;
    }
    ?>
  • succeeded in just opening the port or sending the email as well?
  • Apparently the door is open as shown:
    https://snag.gy/09iAhH.jpg

    The email I am not able to send, it seems that it enters a loop until returning an error in the page
  • edited June 2018
    I misread your issue sorry, you are trying to connect to Zoho SMTP.

    This is what I read from Zoho site

    Sometimes, the email clients connect to the default port 25 when connecting to the SMTP server. In case of Zoho Mail, you need to connect to smtp.zoho.com in SSL or TLS ports i.e 465 or 587 respectively. Ex: In Outlook, you need to check the 'Advanced Server Settings' section.


    Zoho is using the default email ports, so I am not sure if your provider is even blocking 465 and 587 too.
  • I misread your issue sorry, you are trying to connect to Zoho SMTP.

    This is what I read from Zoho site

    Sometimes, the email clients connect to the default port 25 when connecting to the SMTP server. In case of Zoho Mail, you need to connect to smtp.zoho.com in SSL or TLS ports i.e 465 or 587 respectively. Ex: In Outlook, you need to check the 'Advanced Server Settings' section.


    Zoho is using the default email ports, so I am not sure if your provider is even blocking 465 and 587 too.

    It seems that my emails are getting there inside my server, they are in webmail and it is returning this error:
    This is the mail system at host server.example.com.

    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.

    For further assistance, please send mail to postmaster.

    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.

    The mail system

    : connect to
    alt2.gmail-smtp-in.l.google.com[209.85.202.26]:25: Connection timed out
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!