[SOLVED] Problem with outgoing mail from server

Discussion in 'Server Operation' started by pattone, Aug 26, 2011.

  1. pattone

    pattone New Member

    Hello, I'm from Argentine and my english is a little poor. I have a debian server that I had setup with the perfect server guide (lenny + Ispconfig 3 + BInd +Dovecot + postfix) http://www.howtoforge.com/perfect-server-debian-lenny-debian-5.0-with-bind-and-dovecot-ispconfig-3
    But this is not a question about ISPconfig since everything is working ok. My problem is that my ISP blocks port 25 but for outgoing mail. I had modify my master.cf from my postfix 2.5.5 for use the submission port (587) and my clients can connect to my server via smtp but the mails are getting queued in my server because it still sending the mails through the port 25. Is there any way to change the outgoing port for sending mail ??

    Sorry If my english is not the best, thanks in advance guys
     
  2. falko

    falko Super Moderator ISPConfig Developer

  3. pattone

    pattone New Member

    cannot authenticate to server smtp

    Hi falko, first of all thanks very much for your help. I follow that guide (http://www.howtoforge.com/postfix_relaying_through_another_mailserver) and I still can't send mail from my server.
    The log for the error is:
    (SASL authentication failed; cannot authenticate to server smtp.ejemplo.com[xxx.xxx.xxx.xxx]: no mechanism available)

    I have found a guide that says: "you have probably forgotten the smtp_sasl_security_options line in /etc/postfix/main.cf." but (https://help.ubuntu.com/community/GmailPostfixFetchmail)

    That line is in my main.cf after follow the guide for relaying, at the end of my main.cf I have:

    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options =

    Any Idea??

    Thanks in advance
     
    Last edited: Aug 27, 2011
  4. falko

    falko Super Moderator ISPConfig Developer

    Can you send mails through smtp.ejemplo.com with a normal email client like Thunderbird or Outlook? If not, your login details are probably wrong.
     
  5. pattone

    pattone New Member

    yes, actually is configured in a mail client and I can send mails without problems
     
  6. dipeshmehta

    dipeshmehta New Member

    Try changing following line in main.cf
    Code:
    smtp_sasl_security_options = noanonymous
    Hope this works.

    Dipesh
     
  7. pattone

    pattone New Member

    Hi dipeshmehta, thanks for your reply.
    I saw that on another post and I try it but still the same error "(SASL authentication failed; cannot authenticate to server smtp.ejemplo.com[xxx.xxx.xxx.xxx]: no mechanism available)"

    thanks anyway
     
  8. dipeshmehta

    dipeshmehta New Member

    Please post your main.cf here
     
  9. pattone

    pattone New Member

    Hi dipeshmehta, this is my main.cf:



    # See /usr/share/postfix/main.cf.dist for a commented, more complete version


    # Debian specific: Specifying a file name will cause the first
    # line of that file to be used as the name. The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname

    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no

    # appending .domain is the MUA's job.
    append_dot_mydomain = no

    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h

    readme_directory = /usr/share/doc/postfix

    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.

    myhostname = server01.myserver.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = server01.myserver.com, localhost, localhost.localdomain
    relayhost = smtp.myisp.com
    mynetworks = 127.0.0.0/8 [::1]/128
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
    smtpd_tls_security_level = may
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = dovecot
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    dovecot_destination_recipient_limit = 1
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    message_size_limit = 0
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options =
     
  10. pattone

    pattone New Member

    I try with:


    smtp_sasl_security_options = noanonymous
    smtp_always_send_ehlo = yes

    at the end of the file but still te same error:


    Aug 31 11:25:13 server01 postfix/smtp[24449]: E68A51FEC: to=, relay=smtp.myisp.com[xxx.xxx.xxx.xxx]:25, delay=349882, delays=349879/0.06/3.1/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.myisp.com[xxx.xxx.xxx.xxx]: no mechanism available)

    any idea??
     
  11. pattone

    pattone New Member

    Hi again, in my mail.warn log file I have "server01 postfix/smtp[11312]: warning: SASL authentication failure: No worthy mechs found".... after a google search I found that the reason for this error could be that I don't have the cyrus-sasl packages. Could be?? In that case, what packages should I have to install in debian lenny? I have installed libsasl2-modules but still the same error. Any ideas??

    Thanks in advance
     
    Last edited: Sep 19, 2011
  12. pattone

    pattone New Member

    Hi again... seems that the libsasl2-modules did the job; I forgot to restart postfix after install that package. When I reload it the mails go outside throw the smtp of mi ISP.:):)

    Thanks a lot for the help
     
  13. pattone

    pattone New Member

    I don't know how to mark this post as SOLVED
     
  14. falko

    falko Super Moderator ISPConfig Developer

    I've done that for you. Just put "[Solved]" in front of the thread title. :)
     

Share This Page