SMTP not working

Discussion in 'Installation/Configuration' started by matrixn, Dec 22, 2009.

  1. matrixn

    matrixn New Member

    I have ispconfig3 on opensuse11.1 i have managed to connect via IMAP an POP but i can`t conect via smtpd.
    Here is some error log from mail when i`m trying to connect:
    Code:
    Dec 22 16:00:18 deviantway postfix/smtpd[26649]: warning: 86.126.117.7: hostname 86-126-117-7.rdsnet.ro verification failed: Name or service not known
    Dec 22 16:00:18 deviantway postfix/smtpd[26649]: connect from unknown[86.126.117.7]
    Dec 22 16:00:18 deviantway postfix/smtpd[26649]: lost connection after CONNECT from unknown[86.126.117.7]
    Dec 22 16:00:18 deviantway postfix/smtpd[26649]: disconnect from unknown[86.126.117.7]
    Dec 22 16:00:18 deviantway postfix/smtpd[26661]: warning: 86.126.117.7: hostname 86-126-117-7.rdsnet.ro verification failed: Name or service not known
    Dec 22 16:00:18 deviantway postfix/smtpd[26661]: connect from unknown[86.126.117.7]
    Dec 22 16:00:18 deviantway postfix/smtpd[26661]: lost connection after CONNECT from unknown[86.126.117.7]
    Dec 22 16:00:18 deviantway postfix/smtpd[26661]: disconnect from unknown[86.126.117.7]
    Dec 22 16:00:29 deviantway postfix/smtpd[26665]: warning: 86.126.117.7: hostname 86-126-117-7.rdsnet.ro verification failed: Name or service not known
    Dec 22 16:00:29 deviantway postfix/smtpd[26665]: connect from unknown[86.126.117.7]
    Dec 22 16:00:29 deviantway postfix/smtpd[26665]: lost connection after CONNECT from unknown[86.126.117.7]
    Dec 22 16:00:29 deviantway postfix/smtpd[26665]: disconnect from unknown[86.126.117.7]
    Dec 22 16:10:31 deviantway postfix/smtpd[27341]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
    Dec 22 16:10:42 deviantway postfix/smtpd[27353]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
    Dec 22 16:10:46 deviantway postfix/smtpd[27341]: warning: 86.126.117.7: hostname 86-126-117-7.rdsnet.ro verification failed: Name or service not known
    Dec 22 16:10:46 deviantway postfix/smtpd[27341]: connect from unknown[86.126.117.7]
    Dec 22 16:10:46 deviantway postfix/smtpd[27341]: lost connection after CONNECT from unknown[86.126.117.7]
    Dec 22 16:10:46 deviantway postfix/smtpd[27341]: disconnect from unknown[86.126.117.7]
    Dec 22 16:10:57 deviantway postfix/smtpd[27353]: warning: 86.126.117.7: hostname 86-126-117-7.rdsnet.ro verification failed: Name or service not known
    Dec 22 16:10:57 deviantway postfix/smtpd[27353]: connect from unknown[86.126.117.7]
    Dec 22 16:10:57 deviantway postfix/smtpd[27353]: lost connection after CONNECT from unknown[86.126.117.7]
    Dec 22 16:10:57 deviantway postfix/smtpd[27353]: disconnect from unknown[86.126.117.7]
    
    
    

    my main.cf
    Code:
    ############################################################
    # Start MySQL from postfixwiki.org
    ############################################################
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    #virtual_uid_maps = static:303
    #virtual_gid_maps = static:303
    #virtual_minimum_uid = 303
    #virtual_mailbox_base = /srv/maildirs
    #virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
    #virtual_mailbox_limit = 0
    #virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
    #virtual_transport = virtual
    ## Additional for quota support
    #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 = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
    #virtual_overquota_bounce = yes
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    ############################################################
    # End MySQL from postfixwiki.org
    ############################################################
    
    inet_protocols = all
    biff = no
    myhostname = deviantway.ro
    mydestination = localhost, localhost.localdomain
    mynetworks = 127.0.0.0/8 [::1]/128
    virtual_alias_domains =
    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, check_relay_domains
    smtpd_use_tls = yes
    smtpd_tls_security_level = may
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    virtual_create_maildirsize = yes
    virtual_maildir_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    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 = maildrop
    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
    inet_interfaces = all
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    relayhost =
    mailbox_size_limit = 0
    message_size_limit = 0
    
    my master.cf

    Code:
    #
    # Postfix master process configuration file.  For details on the format
    # of the file, see the Postfix master(5) manual page.
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       n       -       -       smtpd
    #amavis    unix  -       -       n       -       4       smtp
    #  -o smtp_data_done_timeout=1200
    #  -o smtp_send_xforward_command=yes
    #  -o disable_dns_lookups=yes
    #  -o max_use=20
    #submission inet n      -       n       -       -       smtpd
    #     -o smtpd_etrn_restrictions=reject
    #     -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #smtps    inet  n       -       n       -       -       smtpd
    #  -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
    #submission   inet    n       -       n       -       -       smtpd
    #  -o smtpd_etrn_restrictions=reject
    #  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
    #628      inet  n       -       n       -       -       qmqpd
    pickup    fifo  n       -       n       60      1       pickup
    cleanup   unix  n       -       n       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    #qmgr     fifo  n       -       n       300     1       oqmgr
    tlsmgr    unix  -       -       n       1000?   1       tlsmgr
    rewrite   unix  -       -       n       -       -       trivial-rewrite
    bounce    unix  -       -       n       -       0       bounce
    defer     unix  -       -       n       -       0       bounce
    trace     unix  -       -       n       -       0       bounce
    verify    unix  -       -       n       -       1       verify
    flush     unix  n       -       n       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    smtp      unix  -       -       n       -       -       smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay     unix  -       -       n       -       -       smtp
            -o fallback_relay=
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       n       -       -       showq
    error     unix  -       -       n       -       -       error
    discard   unix  -       -       n       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       n       -       -       lmtp
    anvil     unix  -       -       n       -       1       anvil
    #localhost:10025 inet   n       -       n       -       -       smtpd
    #  -o content_filter=
    #  -o smtpd_delay_reject=no
    #  -o smtpd_client_restrictions=permit_mynetworks,reject
    #  -o smtpd_helo_restrictions=
    #  -o smtpd_sender_restrictions=
    #  -o smtpd_recipient_restrictions=permit_mynetworks,reject
    #  -o smtpd_data_restrictions=reject_unauth_pipelining
    #  -o smtpd_end_of_data_restrictions=
    #  -o smtpd_restriction_classes=
    #  -o mynetworks=127.0.0.0/8
    #  -o smtpd_error_sleep_time=0
    #  -o smtpd_soft_error_limit=1001
    #  -o smtpd_hard_error_limit=1000
    #  -o smtpd_client_connection_count_limit=0
    #  -o smtpd_client_connection_rate_limit=0
    #  -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings
    #  -o local_header_rewrite_clients=
    #  -o local_recipient_maps=
    #  -o relay_recipient_maps=
    scache    unix  -       -       n       -       1       scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent.  See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender} ${extension} ${recipient} ${user} ${nexthop} ${sender} ${extension} ${recipient} ${user} ${nexthop} ${sender} ${extension} ${recipient} ${user} ${nexthop} ${sender} ${extension} ${recipient} ${user} ${nexthop} ${sender} ${extension} ${recipient} ${user} ${nexthop} ${sender} ${extension} ${recipient} ${user} ${nexthop} ${sender}
    cyrus       unix        -             n       n       -       -       pipe
      user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    uucp        unix        -             n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
    # do not filter locally delivered mail when USE_AMAVIS=yes
    #  (don't set content_filter=vscan in main.cf)
    #vscan     unix  -       n       n       -       10       pipe
    #  user=vscan argv=/usr/sbin/amavis ${sender} ${recipient}
    procmail  unix  -       n       n       -       -       pipe
      flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
    retry     unix  -       -       n       -       -       error
    proxywrite unix -       -       n       -       1       proxymap
    
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
    
    127.0.0.1:10025 inet n - - - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtpd_bind_address=127.0.0.1
    
    
     
    Last edited: Dec 22, 2009
  2. till

    till Super Moderator

    Post the output of:

    netstat -tap

    and:

    iptables -L

    You should also try to restart postfix and then check if there are any errors in the mail log.
     
  3. Mark_NL

    Mark_NL New Member

    .. and remember that you need to use SMTP authentication when you want to send email with your server. ;)
     
  4. matrixn

    matrixn New Member

    netstat -tap output:
    Code:
    deviantway:~ # netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State                                                                                                                                      PID/Program name
    tcp        0      0 *:imaps                 *:*                     LISTEN                                                                                                                                     24287/couriertcpd
    tcp        0      0 *:pop3s                 *:*                     LISTEN                                                                                                                                     24398/couriertcpd
    tcp        0      0 linux-jc1n:10024        *:*                     LISTEN                                                                                                                                     12801/amavisd (mast
    tcp        0      0 linux-jc1n:10025        *:*                     LISTEN                                                                                                                                     25475/master
    tcp        0      0 *:mysql                 *:*                     LISTEN                                                                                                                                     2844/mysqld
    tcp        0      0 *:pop3                  *:*                     LISTEN                                                                                                                                     24360/couriertcpd
    tcp        0      0 linux-jc1n:dyna-access  *:*                     LISTEN                                                                                                                                     2868/clamd
    tcp        0      0 linux-jc1n:imap         *:*                     LISTEN                                                                                                                                     24325/couriertcpd
    tcp        0      0 linux-jc1n:815          *:*                     LISTEN                                                                                                                                     2759/famd
    tcp        0      0 *:sunrpc                *:*                     LISTEN                                                                                                                                     2187/rpcbind
    tcp        0      0 *:http-alt              *:*                     LISTEN                                                                                                                                     2898/httpd2-prefork
    tcp        0      0 *:www-http              *:*                     LISTEN                                                                                                                                     2898/httpd2-prefork
    tcp        0      0 deviantway.ro:domain    *:*                     LISTEN                                                                                                                                     4221/mydns
    tcp        0      0 deviantway.devia:domain *:*                     LISTEN                                                                                                                                     4221/mydns
    tcp        0      0 linux-jc1n:domain       *:*                     LISTEN                                                                                                                                     4221/mydns
    tcp        0      0 *:ftp                   *:*                     LISTEN                                                                                                                                     3463/pure-ftpd (SER
    tcp        0      0 *:ssh                   *:*                     LISTEN                                                                                                                                     3696/sshd
    tcp        0      0 linux-jc1n:ipp          *:*                     LISTEN                                                                                                                                     2747/cupsd
    tcp        0      0 *:smtp                  *:*                     LISTEN                                                                                                                                     25475/master
    tcp        0      0 deviantway.ro:ssh       86-126-117-7.rdsn:56774 ESTABLISHED                                                                                                                                6380/2
    
    iptables -L output:
    Code:
    deviantway:~ # iptables -L
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    postfix restart log:
    Code:
    Dec 22 20:06:20 deviantway postfix/master[25475]: terminating on signal 15
    Dec 22 20:06:21 deviantway postfix/postfix-script[6760]: starting the Postfix mail system
    Dec 22 20:06:21 deviantway postfix/master[6764]: daemon started -- version 2.6.1, configuration /etc/postfix
    
    @Mark_NL: yes but.. i`m just trying to connect using thunderbird 3.0 with a created user.. but is not connecting via smtp
     
    Last edited: Dec 22, 2009
  5. matrixn

    matrixn New Member

    any ideeas on this? :confused:
     
  6. Mark_NL

    Mark_NL New Member

    What does the following command give you?

    Code:
    telnet <serverip> 25
    then type: EHLO foo.bar
    and press enter ..
     
  7. matrixn

    matrixn New Member

    thanks for the reply, here is the output of telnet deviantway.ro 25

    Code:
    deviantway:/etc/postfix # telnet deviantway.ro 25
    Trying 192.168.2.56...
    Connected to deviantway.ro.
    Escape character is '^]'.
    220 deviantway.ro ESMTP Postfix
    EHLO google.com
    250-deviantway.ro
    250-PIPELINING
    250-SIZE
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    
    
    L.E: i was unable to telnet mail.deviantway.ro so.. i have changen my hostname in main.cf to mail.deviantway.ro, now i`m able to telnet mail.deviantway.ro but connecting via smtpd using client still not working.. any ideeeas?

    output postconf -n:

    Code:
    biff = no
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = amavis:[127.0.0.1]:10024
    daemon_directory = /usr/lib/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    header_checks = regexp:/etc/postfix/header_checks
    home_mailbox = Maildir/
    html_directory = /usr/share/doc/packages/postfix-doc/html
    inet_interfaces = all
    inet_protocols = all
    mail_owner = postfix
    mailbox_size_limit = 0
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    message_size_limit = 0
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination = localhost, localhost.localdomain
    mydomain = deviantway.ro
    myhostname = mail.deviantway.ro
    mynetworks = 127.0.0.0/8 [::1]/128
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    newaliases_path = /usr/bin/newaliases
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_doma                                                                  ins $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $my                                                                  networks $virtual_mailbox_limit_maps
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
    receive_override_options = no_address_mappings
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    relayhost =
    sample_directory = /usr/share/doc/packages/postfix-doc/samples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = maildrop
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipien                                                                  t.cf, check_relay_domains
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_security_level = may
    smtpd_use_tls = yes
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /var/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_maildir_extended = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    virtual_transport = maildrop
    virtual_uid_maps = static:5000
    
    
    i have tested telnet from another server (b0x.ro) to the mail.deviantway.ro 25 and it works like a charm, but when i try to telnet from my pc to mail.deviantway.ro 25.. i only receive this 220 mail.deviantway.ro ESMTP Postfix but i`m able to send the EHLO foo.bar command and receive normal output response:

    Code:
    EHLO foo.bar
    250-mail.deviantway.ro
    250-PIPELINING
    250-SIZE
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH PLAIN LOGIN
    250-AUTH=PLAIN LOGIN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    
    
     
    Last edited: Dec 23, 2009
  8. Mark_NL

    Mark_NL New Member

    Well, you're missing an authentication mechanism. :)

    it should look something like this:
    Code:
    mark@mark-desktop:~$ telnet hosting01 25
    Trying hosting01...
    Connected to hosting01.
    Escape character is '^]'.
    220 hosting01 ESMTP Postfix (Debian/GNU)
    EHLO foo.bar
    250-hosting01
    250-PIPELINING
    250-SIZE 10240000
    250-ETRN
    250-STARTTLS
    [B]250-AUTH LOGIN PLAIN
    250-AUTH=LOGIN PLAIN[/B]
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    You're missing the bold ones .. sasl auth daemon f.e.

    check this page:
    http://www.howtoforge.com/perfect-server-opensuse-11.1-ispconfig-3-p4
     
  9. matrixn

    matrixn New Member

    you are right :) but.. it seems that saslauthd is already running on my server

    Code:
    deviantway:/etc/postfix # /etc/init.d/saslauthd status
    Checking for service saslauthd:                                                                                                                                                                     running
    
    
    i still don`t get it.. now.. every time i telnet the server i have those lines but the smtp still not working

    now i`ve receive very strange error when i call EHLO foo.bar first time (it happens only when i`m connecting from my pc
    Code:
    
    220 mail.deviantway.ro ESMTP Postfix
    [B]EHLO foo.bar
    502 5.5.2 Error: command not recognized[/B]
    EHLO foo.bar
    250-mail.deviantway.ro
    250-PIPELINING
    250-SIZE
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH PLAIN LOGIN
    250-AUTH=PLAIN LOGIN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    
    
     
    Last edited: Dec 23, 2009
  10. Mark_NL

    Mark_NL New Member

    ah, beter use EHLO localhost then or smth ..

    but i'd check the logs for that 502 error

    looks better .. tail -f /var/log/mail.log and try to sonnect with a client to your smtp daemon, see what log lines you get this time.
     
  11. matrixn

    matrixn New Member

    i dont have a mail.log (i have opensuse 11.1)

    Code:
    deviantway:/var/log # ls -l | grep mail
    drwxr-x--- 2 root   mail        4096 Dec 22 00:29 exim
    -rw-r----- 1 root   root     1951768 Dec 23 12:50 mail
    -rw-r----- 1 root   root       37533 Dec 23 12:46 mail.err
    -rw-r----- 1 root   root      934972 Dec 23 12:50 mail.info
    -rw-r----- 1 root   root      531364 Dec 23 12:50 mail.warn
    
    
    very strange thing... i made the connection manually in thunderbird 3 and aparently the smtp is working.. but the account wizard tester from Mozilla thunderbird 3 seems is not able to connect via smtp...

    here is a log from file /var/log/mail when i was sending a message via smtp with thunderbird 3

    Code:
    Dec 23 12:50:01 deviantway postfix/smtpd[31242]: disconnect from linux-jc1n[127.0.0.1]
    Dec 23 12:53:11 deviantway postfix/smtpd[31537]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
    Dec 23 12:53:22 deviantway postfix/smtpd[31161]: disconnect from unknown[86.126.112.22]
    Dec 23 12:53:23 deviantway postfix/anvil[30313]: statistics: max connection rate 2/60s for (smtp:86.126.112.22) at Dec 23 12:49:39
    Dec 23 12:53:23 deviantway postfix/anvil[30313]: statistics: max connection count 1 for (smtp:86.126.112.22) at Dec 23 12:46:10
    Dec 23 12:53:23 deviantway postfix/anvil[30313]: statistics: max cache size 3 at Dec 23 12:46:28
    Dec 23 12:53:27 deviantway postfix/smtpd[31537]: warning: 86.126.112.22: hostname 86-126-112-22.rdsnet.ro verification failed: Name or service not known
    Dec 23 12:53:27 deviantway postfix/smtpd[31537]: connect from unknown[86.126.112.22]
    Dec 23 12:53:27 deviantway postfix/smtpd[31537]: 35F755E3F4: client=unknown[86.126.112.22], sasl_method=PLAIN, sasl_username=webmaster@deviantway.ro
    Dec 23 12:53:27 deviantway postfix/cleanup[31558]: 35F755E3F4: message-id=<4B31F695.4060401@deviantway.ro>
    Dec 23 12:53:27 deviantway postfix/qmgr[29021]: 35F755E3F4: from=<webmaster@deviantway.ro>, size=638998, nrcpt=1 (queue active)
    Dec 23 12:53:27 deviantway postfix/smtpd[31537]: disconnect from unknown[86.126.112.22]
    Dec 23 12:53:28 deviantway amavis[12812]: (12812-05) (!!)WARN: all primary virus scanners failed, considering backups
    Dec 23 12:53:44 deviantway postfix/smtpd[31568]: connect from unknown[127.0.0.1]
    Dec 23 12:53:44 deviantway postfix/smtpd[31568]: 687BC5E400: client=unknown[127.0.0.1]
    Dec 23 12:53:44 deviantway postfix/cleanup[31558]: 687BC5E400: message-id=<4B31F695.4060401@deviantway.ro>
    Dec 23 12:53:44 deviantway postfix/qmgr[29021]: 687BC5E400: from=<webmaster@deviantway.ro>, size=639440, nrcpt=1 (queue active)
    Dec 23 10:53:44 deviantway postfix/smtpd[31568]: disconnect from unknown[127.0.0.1]
    Dec 23 12:53:44 deviantway amavis[12812]: (12812-05) Passed CLEAN, [86.126.112.22] [86.126.112.22] <webmaster@deviantway.ro> -> <matrixn1985@yahoo.com>, Message-ID: <4B31F695.4060401@deviantway.ro>, mail_id: hMylc+4KsYTT, Hits: 0.01, size: 638998, queued_as: 687BC5E400, 16717 ms
    Dec 23 12:53:44 deviantway postfix/smtp[31562]: 35F755E3F4: to=<matrixn1985@yahoo.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=17, delays=0.7/0.03/0/17, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 687BC5E400)
    Dec 23 12:53:44 deviantway postfix/qmgr[29021]: 35F755E3F4: removed
    
    
    the email was delivered to yahoo mailbox.. but.. it was detected as spam... any idea why?
     
    Last edited: Dec 23, 2009
  12. till

    till Super Moderator

    Make sure that you have a correct reverse dns record for the IP address of your server. Additionally, you can add SPF records for your domain.
     
  13. Mark_NL

    Mark_NL New Member

    You can tail -f /var/log/mail then :)

    (I'm using debian, there i have a /var/log/mail.log .. opensuse probably has a /var/log/mail)

    Code:
    [b]Dec 23 12:53:27 deviantway postfix/smtpd[31537]: 35F755E3F4: client=unknown[86.126.112.22], sasl_method=PLAIN, sasl_username=webmaster@deviantway.ro[/b]
    Dec 23 12:53:27 deviantway postfix/cleanup[31558]: 35F755E3F4: message-id=<4B31F695.4060401@deviantway.ro>
    Dec 23 12:53:27 deviantway postfix/qmgr[29021]: 35F755E3F4: from=<webmaster@deviantway.ro>, size=638998, nrcpt=1 (queue active)
    Dec 23 12:53:27 deviantway postfix/smtpd[31537]: disconnect from unknown[86.126.112.22]
    
    Looking good! :)

    Code:
    Dec 23 12:53:28 deviantway amavis[12812]: (12812-05) (!!)WARN: all primary virus scanners failed, considering backups
    Dec 23 12:53:44 deviantway postfix/smtpd[31568]: connect from unknown[127.0.0.1]
    
    Next step is fixing your amavisd ;-)
     
  14. matrixn

    matrixn New Member

    how to fix amavisd? i don`t know anything about amavisd.. totally n00b in this section.
     
  15. falko

    falko Super Moderator

    Is ClamAV installed? Make sure the ClamAV section in your amavisd configuration is correct (paths, etc.).
     

Share This Page