[ISPConfig] Can't send and recieve emails

Discussion in 'Installation/Configuration' started by name, Oct 7, 2007.

  1. name

    name New Member

    Hello,

    I have installed ISPConfig and it seems like everything is working.

    But I can't send (and receive) mails.

    //edit: Update: now I actually CAN recieve mails (the problem was that I had added the line: home_maildir = Maildir/ in the main.cf, while ISPConfig has to manage it, so after deleting this line it works... Nevertheless, I can't send mails, although it works with the webmailer(!). Look at some of the newer posts if you want to see what has been done. thx

    I tried:
    telnet MYSERVER 25
    220 MYSERVER ESMTP Postfix (Debian/GNU)
    mail from:[email protected]
    250 2.1.0 Ok
    rcpt to:[email protected]
    554 5.7.1 <[email protected]>: Relay access denied

    I also cant recieve mails.

    Here is postconf -n:

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    home_mailbox = Maildir/
    inet_interfaces = all
    inet_protocols = all
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    mydestination = /etc/postfix/local-host-names
    myhostname = server.example.de
    mynetworks = 127.0.0.0/8
    myorigin = /etc/mailname
    recipient_delimiter = +
    relayhost =
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    smtp_use_tls = yes
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom


    this is the 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

    # 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 = server.example.de
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = /etc/postfix/local-host-names
    relayhost =
    mynetworks = 127.0.0.0/8
    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

    permit_mynetworks = yes
    permit_sasl_authenticated = yes
    reject_unauth_destination = yes

    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

    virtual_maps = hash:/etc/postfix/virtusertable

    mydestination = /etc/postfix/local-host-names
    home_mailbox = Maildir/



    The mail.err doesn't show up any errors...

    Perhaps someone can help me? Would be really great!!

    Thx,
    name
     
    Last edited: Oct 9, 2007
  2. name

    name New Member

    Just testet the following:

    telnet LOCALHOST(!) 25
    helo localhost
    .......

    and send a mail just by connecting to the server via localhost instead of using the "gloabal" server-domainname.

    This actually works and I get a mail with the correct sender ([email protected]).

    Perhaps this is a clue?

    thx,
    name
     
  3. name

    name New Member

    Can the problem be, that my Servers IP is missing a Reverse DNS Entry?

    Perhaps this would explain that it SENDS mails when connecting to "localhost" via telnet, but won't send mails (Relaya acces denied for any mail-adress I want to send a mail to) when connecting to the IP or Domain name?!


    Hope someone can help me


    thx,
    name
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Try an email client like Outlook or Thunderbird and make sure that you enable "Server requires authentication".
     
  5. name

    name New Member

    hi,

    no I also can't send mails with thunderbird. It is just saying:
    "The SMTP-Server isn't available or is refusing the connection"...

    What I have tried so far:

    Successfully sending a mail to [email protected] via telnet localhost 25:
    server:~# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    220 server.example.de ESMTP Postfix (Debian/GNU)
    helo localhost
    250 server.example.de
    mail from:[email protected]
    250 2.1.0 Ok
    rcpt to:[email protected]
    250 2.1.5 Ok
    data
    354 End data with <CR><LF>.<CR><LF>
    subject:testmail
    test
    .
    250 2.0.0 Ok: queued as 8E97E2C234
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.


    But when I try to connect to my address server.example.de nothing happens:
    server:~# telnet server.example.de 25
    Trying 0.0.0.0... (0.0.0.0 ist natürlich in Wirklichkeit die korrekte IP)
    helo server.example.de

    And it is just like halted....


    Sending a mail from [email protected] to [email protected] doesn't work and I get the following error MSG:
    Reporting-MTA: dns; server.example.de
    X-Postfix-Queue-ID: 25F252C235
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Mon, 8 Oct 2007 17:32:07 +0200 (CEST)

    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.4.6
    Diagnostic-Code: X-Postfix; mail for server.example.de loops back to myself


    Nevertheless i CAN connect to my Server via POP3 and IMAP, so when I place a "fake-mail-file" in the Maildir of mr. web7test in /var/www/web7/usr/web7user/Maildir/new/ it DOES show up in Thunderbird(!)


    I even can't send mails to myself in my network:
    server:~# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    220 server.example.de ESMTP Postfix (Debian/GNU)
    helo localhost
    250 server.example.de
    mail from:[email protected]
    250 2.1.0 Ok
    rcpt to:[email protected]
    250 2.1.5 Ok
    data
    354 End data with <CR><LF>.<CR><LF>
    subject:testmail
    leider leider
    .
    250 2.0.0 Ok: queued as 0142C2C235
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.


    Verifying to see if web7user exist is possitive:
    mache ich ein verify erscheint folgendes:
    vrfy web7test
    252 2.0.0 web7test


    Here is the maillog after sending a mail from myself via telnet localhost 25 to myself [email protected]:


    Oct 8 19:04:31 server postfix/smtpd[3960]: connect from localhost.localdomain[127.0.0.1]
    Oct 8 19:04:53 server postfix/smtpd[3960]: D6DE82C235: client=localhost.localdomain[127.0.0.1]
    Oct 8 19:04:59 server postfix/cleanup[3967]: D6DE82C235: message-id=<[email protected]>
    Oct 8 19:04:59 server postfix/qmgr[2505]: D6DE82C235: from=<[email protected]>, size=386, nrcpt=1 (queue active)
    Oct 8 19:05:00 server postfix/smtp[3968]: D6DE82C235: to=<[email protected]>, relay=none, delay=17, delays=17/0.03/0.08/0, dsn=5.4.6, status=bounced (mail for server.web$
    Oct 8 19:05:00 server postfix/cleanup[3967]: 077AB2C237: message-id=<[email protected]>
    Oct 8 19:05:00 server postfix/qmgr[2505]: 077AB2C237: from=<>, size=2254, nrcpt=1 (queue active)
    Oct 8 19:05:00 server postfix/bounce[3970]: D6DE82C235: sender non-delivery notification: 077AB2C237
    Oct 8 19:05:00 server postfix/qmgr[2505]: D6DE82C235: removed
    Oct 8 19:05:00 server postfix/smtp[3968]: 077AB2C237: to=<[email protected]>, orig_to=<[email protected]>, relay=none, delay=0.04, delays=0.02/0/0.02/0, dsn=5.4.6, stat$
    Oct 8 19:05:00 server postfix/qmgr[2505]: 077AB2C237: removed
    Oct 8 19:05:06 server postfix/smtpd[3960]: disconnect from localhost.localdomain[127.0.0.1]


    Actually I forgot to post my /etc/postfix/local-host-names last time:

    ###################################
    #
    # ISPConfig local-host-names Configuration File
    # Version 1.0
    #
    ###################################
    localhost
    localhost.localdomain
    www.example.de
    example.de
    #### MAKE MANUAL ENTRIES BELOW THIS LINE!



    I have made a little change in the main.cf and just REMOVED the last line saying home_mailbox = Maildir/
    because actually I want ISPConfig/Procmail to make all this with Maildir and now I can RECIEVE(!) Mails, but I cant send...


    Thx for reading(!), as said the problem still is, that I can't SEND mails :(

    Name
     
    Last edited: Oct 8, 2007
  6. name

    name New Member

    Ok,

    I hope this is the last "update" before everything works as it should ;)

    Because when I use the ISPConfig-Webmailer, it sends the mails as it should!!!


    Nevertheless I cant get Thunderbird (and probably also Outlook, etc.) to work.

    I have tried to send WITHOUT tls, WITH tls when its AVAILABLE, WITH tls and WITH ssl, everything brings up the same error-msg, that the SMTP either isn't available or refuses the connection.....

    Perhaps this brings enough light into the darkness?

    Hope so...

    thx,
    name
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of the command:

    iptables -L
     
  8. name

    name New Member

    The output of "iptables -L":

    server:~# 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


    There is really nothing, I don't think this is good?
     
  9. name

    name New Member

    Hi again,

    my it be, that although you can see there is no rule for the firewall, it is impossible to connect to the SMTP-Server of postfix from the OUTSIDE (you know, if it isn't a connection from localhost to localhost)?

    Because as said, I even can't connect to server.example.de with telnet (wich isn't bad).
    But if it is also impossible to get a connection to server.example.de's SMTP from e.g. Thunderbird, that would be a problem.

    I don't know how to check it and I even don't know where to change the configs (of postfix) to accept "OUTSIDE" SMTP-Connections.


    Perhaps someone can help me?

    Thx
     
  10. name

    name New Member

    Also it seems like noone can really help me and I don't want to "spam" too much, I have decided to give you a bit more info.


    I now can login via telnet to my domain:

    server:/var/log# telnet example.de smtp
    Trying 87.239.137.4...
    Connected to example.de.
    Escape character is '^]'.
    220 server.example.de ESMTP Postfix (Debian/GNU)
    ehlo example.de
    250-server.example.de
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH PLAIN LOGIN
    250-AUTH=PLAIN LOGIN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    auth login
    334 VXNlcm5hbWU6
    MIMENCODED-Username
    334 UGFzc3dvcmQ6
    MIMENCODED-Password
    235 2.0.0 Authentication successful
    mail from:[email protected]
    250 2.1.0 Ok
    rcpt to:[email protected]
    250 2.1.5 Ok
    data
    354 End data with <CR><LF>.<CR><LF>
    subject:Testmail
    testtest
    .
    250 2.0.0 Ok: queued as 211AD2C237
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.

    This mail does also arrive at [email protected]....

    So why I can't connect to the SMTP via Thunderbord, Sylpheed Claws, etc...(!!!!!!!)???

    Please please help :(

    Does it just have something to do with the mail-clients setting or something else wrong?!


    OK, i think the problem was, that thunderbird etc. was blocked by my pc :S

    thx
     
    Last edited: Oct 9, 2007

Share This Page