OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: strange problems

From: Andreas Winkelmann (mlawinkelmann.de)
Date: Mon Sep 10 2007 - 15:03:23 CDT


On Monday 10 September 2007 21:35, Martin Jinnestrand wrote:

> First I have to say hello to all at this list, I am new here :)
>
> I have tryed to set up my new postfix server, but it fails totaly. I have
> reinstalled the server with Debian 4.0 etch (i386), before I used Debian
> 3.1 Sarge and there I had postfix running as it should do.
>
> The problem I have is that some mailservers on the internet just timeout
> their smtp connection. Its not all, but some. I would say about 50%.
>
> Here is the logs from a mail I can send that works:
> ------------------------------------
> Sep 10 19:06:56 server postfix/smtpd[3518]: connect from
> static-195.84.116.82.addr.tdcsong.se[195.84.116.82] Sep 10 19:06:56 server
> postfix/smtpd[3518]: F16C97B032C:
> client=static-195.84.116.82.addr.tdcsong.se[195.84.116.82] Sep 10 19:06:57
> server postfix/cleanup[3522]: F16C97B032C:
> message-id=<1E16564305E89E40A19F940CC5DFF3E62C07DDkarleroex.karlero.local>
> Sep 10 19:06:57 server postfix/qmgr[3407]: F16C97B032C:
> from=<martin.jinnestrandkarlero.se>, size=1550, nrcpt=1 (queue active) Sep
> 10 19:06:57 server postfix/smtpd[3518]: disconnect from
> static-195.84.116.82.addr.tdcsong.se[195.84.116.82] Sep 10 19:06:57 server
> postfix/pipe[3523]: F16C97B032C: to=<testjinnestrand.se>, relay=dovecot,
> delay=0.29, delays=0.12/0/0/0.17, dsn=2.0.0, status=sent (delivered via
> dovecot service) Sep 10 19:06:57 server postfix/qmgr[3407]: F16C97B032C:
> removed
> -------------------------------------
>
> Well this is nice ! But from many I just get timeouts.
>
> I really need help on this one.... I have no ideas what to do.
>
> I followed this guide when I installed.
>
> http://workaround.org/articles/ispmail-etch/
>
> Plx feel free to send mails to testjinnestrand.se.
>
> ----------------------
> Sep 10 21:25:20 server postfix/smtpd[3810]: > relay.smtp.cz[81.95.97.115]:
> 220 server.jinnestrand.se ESMTP Postfix (Debian/GNU) Sep 10 21:25:20 server
> postfix/smtpd[3810]: < relay.smtp.cz[81.95.97.115]: EHLO relay.smtp.cz Sep
> 10 21:25:20 server postfix/smtpd[3810]: > relay.smtp.cz[81.95.97.115]:
> 250-server.jinnestrand.se Sep 10 21:25:20 server postfix/smtpd[3810]: >
> relay.smtp.cz[81.95.97.115]: 250-PIPELINING Sep 10 21:25:20 server
> postfix/smtpd[3810]: > relay.smtp.cz[81.95.97.115]: 250-SIZE 10240000 Sep
> 10 21:25:20 server postfix/smtpd[3810]: > relay.smtp.cz[81.95.97.115]:
> 250-VRFY Sep 10 21:25:20 server postfix/smtpd[3810]: >
> relay.smtp.cz[81.95.97.115]: 250-ETRN Sep 10 21:25:20 server
> postfix/smtpd[3810]: > relay.smtp.cz[81.95.97.115]: 250-STARTTLS Sep 10
> 21:25:20 server postfix/smtpd[3810]: match_list_match: relay.smtp.cz: no
> match Sep 10 21:25:20 server postfix/smtpd[3810]: match_list_match:
> 81.95.97.115: no match Sep 10 21:25:20 server postfix/smtpd[3810]: >
> relay.smtp.cz[81.95.97.115]: 250-AUTH PLAIN LOGIN Sep 10 21:25:20 server
> postfix/smtpd[3810]: > relay.smtp.cz[81.95.97.115]: 250-ENHANCEDSTATUSCODES
> Sep 10 21:25:20 server postfix/smtpd[3810]: > relay.smtp.cz[81.95.97.115]:
> 250-8BITMIME
> Sep 10 21:25:20 server postfix/smtpd[3810]: > relay.smtp.cz[81.95.97.115]:
250 DSN
> Sep 10 21:30:20 server postfix/smtpd[3810]: > relay.smtp.cz[81.95.97.115]:
421 4.4.2 server.jinnestrand.se Error: timeout exceeded

Looks like the Client does not like what it sees, but instead of doing
something it just waits 5 minutes. You should check the Client why it does
nothing.

Maybe you have some sort of Firewall between the Client and your Server which
drops or fakes Data. Check with a telnet from the Client-Machine. Or use a
Sniffer on both sides, for example tcpdump.

> Sep 10 21:30:20 server postfix/smtpd[3810]: match_hostname: relay.smtp.cz ~?
127.0.0.0/8 Sep 10
> 21:30:20 server postfix/smtpd[3810]: match_hostaddr: 81.95.97.115 ~?
> 127.0.0.0/8 Sep 10 21:30:20 server postfix/smtpd[3810]: match_list_match:
> relay.smtp.cz: no match Sep 10 21:30:20 server postfix/smtpd[3810]:
> match_list_match: 81.95.97.115: no match Sep 10 21:30:20 server
> postfix/smtpd[3810]: send attr request = disconnect Sep 10 21:30:20 server
> postfix/smtpd[3810]: send attr ident = smtp:81.95.97.115 Sep 10 21:30:20
> server postfix/smtpd[3810]: private/anvil: wanted attribute: status Sep 10
> 21:30:20 server postfix/smtpd[3810]: input attribute name: status Sep 10
> 21:30:20 server postfix/smtpd[3810]: input attribute value: 0 Sep 10
> 21:30:20 server postfix/smtpd[3810]: private/anvil: wanted attribute: (list
> terminator) Sep 10 21:30:20 server postfix/smtpd[3810]: input attribute
> name: (end) Sep 10 21:30:20 server postfix/smtpd[3810]: timeout after EHLO
> from relay.smtp.cz[81.95.97.115] Sep 10 21:30:20 server
> postfix/smtpd[3810]: disconnect from relay.smtp.cz[81.95.97.115] Sep 10
> 21:30:20 server postfix/smtpd[3810]: master_notify: status 1 Sep 10
> 21:30:20 server postfix/smtpd[3810]: connection closed
> -------------------------------
>
>
>
> main.cf:
> --------------------------
> 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/ssl/certs/postfix.pem
> smtpd_tls_key_file = /etc/ssl/private/postfix.pem
> 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.jinnestrand.se
> alias_maps = hash:/etc/aliases
> alias_database = hash:/etc/aliases
> myorigin = /etc/mailname
> mydestination = localhost
> relayhost =
> mynetworks = 127.0.0.0/8
> mailbox_size_limit = 0
> recipient_delimiter = +
> inet_interfaces = all
> virtual_mailbox_domains =
> mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_uid_maps =
> static:5000
> virtual_gid_maps = static:5000
> virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
> virtual_alias_maps =
> mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-ema
>il2email.cf virtual_transport = dovecot
> dovecot_destination_recipient_limit = 1
> smtpd_sasl_type = dovecot
> smtpd_sasl_path = private/auth
> smtpd_sasl_auth_enable = yes
> smtpd_recipient_restrictions =
> permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
> --------------------
>
> master.cf
> --------------------
> smtp inet n - - - - smtpd
> #submission inet n - - - - smtpd
> # -o smtpd_enforce_tls=yes
> # -o smtpd_sasl_auth_enable=yes
> # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
> #smtps inet n - - - - smtpd
> # -o smtpd_tls_wrappermode=yes
> # -o smtpd_sasl_auth_enable=yes
> # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
> #628 inet n - - - - qmqpd
> pickup fifo n - - 60 1 pickup
> cleanup unix n - - - 0 cleanup
> qmgr fifo n - n 300 1 qmgr
> #qmgr fifo n - - 300 1 oqmgr
> tlsmgr unix - - - 1000? 1 tlsmgr
> rewrite unix - - - - - trivial-rewrite
> bounce unix - - - - 0 bounce
> defer unix - - - - 0 bounce
> trace unix - - - - 0 bounce
> verify unix - - - - 1 verify
> flush unix n - - 1000? 0 flush
> proxymap unix - - n - - proxymap
> smtp unix - - - - - smtp
> # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
> relay unix - - - - - smtp
> -o fallback_relay=
> # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
> showq unix n - - - - showq
> error unix - - - - - error
> discard unix - - - - - discard
> local unix - n n - - local
> virtual unix - n n - - virtual
> lmtp unix - - - - - lmtp
> anvil unix - - - - 1 anvil
> scache unix - - - - 1 scache
> 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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender
> $recipient scalemail-backend unix - n n - 2
> pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
> ${nexthop} ${user} ${extension} mailman unix - n n -
> - pipe
> flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
> ${nexthop} ${user}
> dovecot unix - n n - - pipe
> flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d
> ${recipient} -----------------------
>
> //JinniS

--
        Andreas