Etch perfect setup - problems with SMTP

Discussion in 'HOWTO-Related Questions' started by StefanV, Oct 25, 2007.

  1. StefanV

    StefanV New Member

    First of all, hello everybody!

    Like many others on this forum, I hope that I can find someone to help me with a problem regarding a linux server. I would like say from the beginning that I'm new in linux, so please be patient with me :).

    I've followed the perfect setup tutorial for Debian Etch and I don't manage to send mails by SMTP. Can someone tell me where should I look and what should I do? I will paste below the content of my config files... If I need to paste something else, please tell me. Thanks in advance!

    My zone file:

    $ttl 30M     IN      SOA (
                            30M )     IN      NS     IN      A     IN      NS IN      CNAME IN      A IN      A        IN      A        IN      MX      1
    saslauthd file:

    # Settings for saslauthd daemon
    # Should saslauthd run automatically on startup? (default: no)
    # Which authentication mechanisms should saslauthd use? (default: pam)
    # Available options in this Debian package:
    # getpwent  -- use the getpwent() library function
    # kerberos5 -- use Kerberos 5
    # pam       -- use PAM
    # rimap     -- use a remote IMAP server
    # shadow    -- use the local shadow password file
    # sasldb    -- use the local sasldb database file
    # ldap      -- use LDAP (configuration is in /etc/saslauthd.conf)
    # Only one option may be used at a time. See the saslauthd man page
    # for more information.
    # Example: MECHANISMS="pam"
    # Additional options for this mechanism. (default: none)
    # See the saslauthd man page for information about mech-specific options.
    # How many saslauthd processes should we run? (default: 5)
    # A value of 0 will fork a new process for each connection.
    # Other options (default: -c)
    # See the saslauthd man page for information about these options.
    # Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
    # Note: See /usr/share/doc/sasl2-bin/README.Debian
    OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"

    # See /usr/share/postfix/ 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
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${queue_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 =
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination =,, localhost.localdomain, localhost
    relayhost =
    mynetworks =
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    The ip's and hostname are not real (just a precaution).. the rest of the configuration is copy/paste.

    Once again, thanks!
  2. StefanV

    StefanV New Member

  3. falko

    falko Super Moderator ISPConfig Developer

    Please check if the MX record of your domain is correct:
    dig mx
  4. StefanV

    StefanV New Member

    ; <<>> DiG 9.3.4 <<>> mx
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9721
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    ;                    IN      MX
    ;; Query time: 2 msec
    ;; SERVER:
    ;; WHEN: Fri Oct 26 08:17:56 2007
    ;; MSG SIZE  rcvd: 28
    And it seems that I was wrong... I can't get e-mails with pop, even if I send them directly from webmin. But the mails sent from another address are stored in my mailbox on the server.

    [Edit] Thanks Falko for trying to help me ... and also thanks for the great tutorials you write!
    Last edited: Oct 26, 2007
  5. StefanV

    StefanV New Member

    and this is the result of dig

    ; <<>> DiG 9.3.4 <<>> mx
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52766
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    ;               IN      MX
    ;; ANSWER SECTION:        1800    IN      MX      1
    ;; Query time: 16 msec
    ;; SERVER:
    ;; WHEN: Fri Oct 26 09:02:05 2007
    ;; MSG SIZE  rcvd: 49
    Maybe I need to change some instances of to in theconfig files?
  6. falko

    falko Super Moderator ISPConfig Developer

    You need no MX record for (unless you want to receive emails of the form user@[B]mail[/B], but an A record for, and then you create an MX record for that points to
  7. StefanV

    StefanV New Member

    I've modified the mx record and now I can receive again on pop but not send on smtp :). For both pop and smtp I use in my thunderbird config
  8. falko

    falko Super Moderator ISPConfig Developer

    Do you get any errors messages? Any errors in your logs?
  9. StefanV

    StefanV New Member

    The problem was with my ISP. They blocked the port 25.. So I made a port redirect to make it work. Thanks for everything, Falko!

Share This Page