an other mail problem with ISPCONFIG 3 and debain 7

Discussion in 'HOWTO-Related Questions' started by gijsjasper, Apr 23, 2014.

  1. gijsjasper

    gijsjasper New Member

    Hello,

    I'm quit new to linux. I installed debian 7 and ISPCONFIG 3 with the how to:
    http://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3

    Every seems to work fine accept the mail

    mail from server to server is no problem.
    i can also get the mail from the server in to my thunderbird.

    I can't sent mail tot the server from an other emailadres like google
    I can't receive email from google for example.

    Ports seem te be open: 25, 143 i'm not sure wich ports i also have to check.

    iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    fail2ban-dovecot-pop3imap tcp -- anywhere anywhere mu ltiport dports pop3,pop3s,imap2,imaps
    fail2ban-pureftpd tcp -- anywhere anywhere multiport dports ftp
    fail2ban-sasl tcp -- anywhere anywhere multiport dpor ts smtp
    fail2ban-ssh tcp -- anywhere anywhere multiport dport s ssh
    ACCEPT tcp -- anywhere anywhere tcp dpt:smtp

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

    Chain fail2ban-dovecot-pop3imap (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    Chain fail2ban-pureftpd (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    Chain fail2ban-sasl (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    Chain fail2ban-ssh (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere


    some of my mail log:
    Apr 23 11:17:38 server1 dovecot: imap([email protected]): Disconnected: Logged out in=79 out=711
    Apr 23 11:18:03 server1 postfix/smtp[5220]: connect to fallback01.vdx.nl[83.96.142.70]:25: Connection timed out
    Apr 23 11:18:03 server1 postfix/smtp[5220]: 1697F41990: to=<[email protected]>, relay=none, delay=1522, delays=1461/0.05/61/0, dsn=4.4.1, status=deferred (connect to fallback01.vdx.nl[83.96.142.70]:25: Connection timed out)
    Apr 23 11:20:01 server1 dovecot: imap-login: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=::1, lip=::1, secured, session=<ovbAGrj33QAAAAAAAAAAAAAAAAAAAAAB>
    Apr 23 11:20:01 server1 dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<OgXBGrj34wAAAAAAAAAAAAAAAAAAAAAB>
    Apr 23 11:20:01 server1 postfix/smtpd[5281]: warning: database /var/lib/mailman/data/virtual-mailman.db is older than source file /var/lib/mailman/data/virtual-mailman
    Apr 23 11:20:01 server1 postfix/smtpd[5281]: warning: hostname localhost does not resolve to address ::1: No address associated with hostname
    Apr 23 11:20:01 server1 postfix/smtpd[5281]: connect from unknown[::1]
    Apr 23 11:20:01 server1 postfix/smtpd[5281]: lost connection after CONNECT from unknown[::1]
    Apr 23 11:20:01 server1 postfix/smtpd[5281]: disconnect from unknown[::1]
    Apr 23 11:22:02 server1 postfix/qmgr[4532]: E571241A2C: from=<[email protected]>, size=1156, nrcpt=1 (queue active)
    Apr 23 11:22:02 server1 postfix/qmgr[4532]: 50D1A41A2D: from=<[email protected]>, size=1152, nrcpt=3 (queue active)
    Apr 23 11:22:32 server1 postfix/smtp[5330]: connect to mail.domain2.nl[85.158.248.237]:25: Connection timed out
    Apr 23 11:22:32 server1 postfix/smtp[5331]: connect to mail.domain2.nl[85.158.248.237]:25: Connection timed out
    Apr 23 11:23:02 server1 postfix/smtp[5330]: connect to fallback01.vdx.nl[83.96.142.70]:25: Connection timed out
    Apr 23 11:23:02 server1 postfix/smtp[5331]: connect to fallback01.vdx.nl[83.96.142.70]:25: Connection timed out
    Apr 23 11:23:02 server1 postfix/smtp[5331]: 50D1A41A2D: to=<[email protected]>, relay=none, delay=1487, delays=1427/0.02/60/0, dsn=4.4.1, status=deferred (connect to fallback01.vdx.nl[83.96.142.70]:25: Connection timed out)
    Apr 23 11:23:02 server1 postfix/smtp[5330]: E571241A2C: to=<[email protected]>, relay=none, delay=71864, delays=71804/0.05/60/0, dsn=4.4.1, status=deferred (connect to fallback01.vdx.nl[83.96.142.70]:25: Connection timed out)
    Apr 23 11:25:01 server1 dovecot: imap-login: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=::1, lip=::1, secured, session=<DHiaLLj37QAAAAAAAAAAAAAAAAAAAAAB>
    Apr 23 11:25:01 server1 dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<KouaLLj38wAAAAAAAAAAAAAAAAAAAAAB>
    Apr 23 11:25:01 server1 postfix/smtpd[5389]: warning: database /var/lib/mailman/data/virtual-mailman.db is older than source file /var/lib/mailman/data/virtual-mailman
    Apr 23 11:25:01 server1 postfix/smtpd[5389]: warning: hostname localhost does not resolve to address ::1: No address associated with hostname
    Apr 23 11:25:01 server1 postfix/smtpd[5389]: connect from unknown[::1]
    Apr 23 11:25:01 server1 postfix/smtpd[5389]: lost connection after CONNECT from unknown[::1]
    Apr 23 11:25:01 server1 postfix/smtpd[5389]: disconnect from unknown[::1]
    Apr 23 11:27:39 server1 dovecot: auth-worker(5435): mysql(localhost): Connected to database dbispconfig
    Apr 23 11:27:39 server1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=5437, secured, session=<CHcPNrj38AAAAAAAAAAAAAAAAAAAAAAB>
    Apr 23 11:27:39 server1 dovecot: imap([email protected]): Disconnected: Logged out in=79 out=711
    Apr 23 11:28:38 server1 dovecot: imap([email protected]): Disconnected: Logged out in=208 out=624
    Apr 23 11:29:12 server1 dovecot: imap([email protected]): Disconnected for inactivity in=200 out=617

    some of my /etc/postfix/main.cf
    # 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 = server1.domain.in
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    myorigin = /etc/mailname
    mydestination = server1.domain.in, localhost, localhost.localdomain
    relayhost =
    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, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-m$
    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
    inet_protocols = all
    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_destin$
    smtpd_tls_security_level = may
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, 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 $
    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
    smtpd_client_message_rate_limit = 100
    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
    owner_request_special = no
    dovecot_destination_recipient_limit = 1
    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_destin$
    smtpd_tls_security_level = may
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, 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 $
    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
    smtpd_client_message_rate_limit = 100
    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
    owner_request_special = no
    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


    Hope someone can help me.
    When more info is needed, please let me know (by telling which file and where i can finf it. ;)

    Thanks in advanced.
    Gijs
     
  2. srijan

    srijan New Member HowtoForge Supporter

    Hi

    Are you using Dinamic IP??
     
  3. gijsjasper

    gijsjasper New Member

    Yes. But always get the same ip. I'm not on a blacklist and opend port 25, 53, 143 and 587 for mail
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    According to your log file, port 25 outgoing is blocked. this is done as spam prevention by most internet access providers. you should contact your internet access isp and ask them if they block port 25. If thats the case, then you can not run a mailserver on that IP without using a smarthst in the internet to send outgoing emails.
     
  5. gijsjasper

    gijsjasper New Member

    Port 25 was blocked in my modem. I opend it and redirect it to my server. Can the block it also some where else?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Th setting in your modem was mots likely port 25 incoming, this has to be open and redirected as well. But I was talking about port 25 outgoing. If this is blocked in the external firewall of your isp, then you can not send emails to other servers directly.
     
  7. gijsjasper

    gijsjasper New Member

    ok, this will explain a lot of my last month struggle...
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    But you might be able to work around that if you have a smtp server login of the smtp server of your isp. set this login under System > server config > mail as relay server. your ispconfig server will then try to send out the emails by using the smtp server of your isp.
     
  9. gijsjasper

    gijsjasper New Member

    ok, i will try that. but with a outgoing block i should be able to receive email(?)
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, after you opened the port in your router and forwarded it to your server. but only, if your access provider does not block incoming traffic on that port. But you can try it, most isp's block just outgoing port 25 traffic to prevent spam, not incoming.
     
  11. gijsjasper

    gijsjasper New Member

    i put the relay host in my config an can sent to gmail or others.
    The problem now is that my server can't receive email from google or others..
    do you have a solution for that? it wil make my month very good :)
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Contact your isp, thell them that you want to run your own mailserver and ask them if they block port 25 incoming.
     
  13. gijsjasper

    gijsjasper New Member

    i contacted kpn and they tell me that it should be possible. More clients are doing mailservers. Just had to open ports in my modem.

    So i think the problem is somewhere else.. But where?

    I opened port: 22, 25, 53, 80, 110, 143, 443

    Hope someone can help me or point me in a direction
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to test your local mailserver like this:

    Login to webmail on your server. Then send yourself a email (to the address that you used to login into webmail). The email that you send should appear within one minute in your inbox.
     
  15. gijsjasper

    gijsjasper New Member

    that works. The message is deliverd directly.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, this means that the mail server itself is working. So the problem is either the router or your ISP. Do you have a dyndns hostname? If yes, please send it to me by PM. Or send me your external IP address. I will try if I can reach your server on port 25.
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    I just tested a connection to your IP on port 25 tcp and I did not got a response.

    There is one last thing that we can check on your server. Please post the output of:

    netstat -tap | grep smtp

    from your server.
     
  18. gijsjasper

    gijsjasper New Member

    i get this response:

    root@server1:~# netstat -tap | grep smtp
    tcp 0 0 *:ssmtp *:* LISTEN 5018/mas ter
    tcp 0 0 *:smtp *:* LISTEN 5018/mas ter
    tcp6 0 0 [::]:ssmtp [::]:* LISTEN 5018/mas ter
    tcp6 0 0 [::]:smtp [::]:* LISTEN 5018/mas ter
     
  19. gijsjasper

    gijsjasper New Member

    i think i made a error in my firewall. had also a trigger set up.

    When i telnet domain.com 25 i get a response. but email isn't delivered
     

Share This Page