Postfix: connection to mail server REFUSED

Discussion in 'Server Operation' started by sramdane, May 22, 2006.

  1. sramdane

    sramdane New Member

    Hi all,

    Please, can you help me? I am having problem to receive mail and I am not that much knowledgeable with postfix mail server. Following are output of the problem and different informations:

    cansado postfix/postfix-script starting the Postfix mail system
    cansado postfix/master[12691] daemon started -- version 2.2.5, configuration /etc/postfix
    cansado postfix/qmgr[12693] 74A6420047: from=<[email protected]>, size=687681, nrcpt=1 (queue active)
    cansado postfix/smtp[12731] connect to mail.elmouritania.com[82.127.33.113]: Connection refused (port 25)
    cansado postfix/smtp[12731] 74A6420047: to=<[email protected]>, orig_to=<root>, relay=none, delay=33904, status=deferred (connect to mail.elmouritania.com[82.127.33.113]: Connection refused)

    cansado:~ # postconf -d | grep mail_version
    mail_version = 2.2.5

    cansado:~ # netstat -tap

    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 localhost:cadlock *:* LISTEN 5258/fam
    tcp 0 0 localhost:10024 *:* LISTEN 12618/amavisd (mast
    tcp 0 0 *:5801 *:* LISTEN 5338/xinetd
    tcp 0 0 *:mysql *:* LISTEN 4938/mysqld
    tcp 0 0 *:5901 *:* LISTEN 5338/xinetd
    tcp 0 0 *:sunrpc *:* LISTEN 4630/portmap
    tcp 0 0 *:hosts2-ns *:* LISTEN 7407/ispconfig_http
    tcp 0 0 *:ftp *:* LISTEN 7754/proftpd: (acce
    tcp 0 0 cansado.elmourit:domain *:* LISTEN 7737/named
    tcp 0 0 localhost:domain *:* LISTEN 7737/named
    tcp 0 0 *:ipp *:* LISTEN 5038/cupsd
    tcp 0 0 *:smtp *:* LISTEN 13091/master
    tcp 0 0 localhost:953 *:* LISTEN 7737/named
    tcp 0 0 *:pop3 *:* LISTEN 4836/couriertcpd
    tcp 0 0 *:imap *:* LISTEN 4829/couriertcpd
    tcp 0 0 *:www-http *:* LISTEN 7585/httpd2-prefork
    tcp 0 0 *:domain *:* LISTEN 7737/named
    tcp 0 0 *:ssh *:* LISTEN 5019/sshd
    tcp 0 0 *:smtp *:* LISTEN 13091/master
    tcp 0 0 localhost:953 *:* LISTEN 7737/named
    tcp 0 0 *:https *:* LISTEN 7585/httpd2-prefork
    cansado:~ #

    cansado:~ # postconf -n

    alias_maps = hash:/etc/aliases
    biff = no
    broken_sasl_auth_clients = yes
    canonical_maps = hash:/etc/postfix/canonical
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/lib/postfix
    debug_peer_level = 2
    defer_transports =
    disable_dns_lookups = no
    disable_mime_output_conversion = no
    html_directory = /usr/share/doc/packages/postfix/html
    inet_interfaces = all
    inet_protocols = all
    mail_owner = postfix
    mail_spool_directory = /var/mail
    mailbox_command =
    mailbox_size_limit = 0
    mailbox_transport =
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    masquerade_classes = envelope_sender, header_sender, header_recipient
    masquerade_domains =
    masquerade_exceptions = root
    message_size_limit = 10240000
    mydestination = /etc/postfix/local-host-names
    mydomain = elmouritania.com
    myhostname = cansado.$mydomain
    mynetworks = 192.168.50.0/24, 127.0.0.0/8
    myorigin = $mydomain
    newaliases_path = /usr/bin/newaliases
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/packages/postfix/README_FILES
    relay_domains =
    relayhost =
    relocated_maps = hash:/etc/postfix/relocated
    sample_directory = /usr/share/doc/packages/postfix/samples
    sender_canonical_maps = hash:/etc/postfix/sender_canonical
    sendmail_path = /usr/sbin/sendmail
    setgid_group = maildrop
    smtp_sasl_auth_enable = no
    smtp_tls_note_starttls_offer = yes
    smtp_use_tls = yes
    smtpd_client_restrictions =
    smtpd_helo_required = no
    smtpd_helo_restrictions =
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_relay_domains
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    smtpd_sender_restrictions = hash:/etc/postfix/access
    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_timeout = 3600s
    smtpd_use_tls = yes
    strict_8bitmime = no
    strict_rfc821_envelopes = no
    tls_random_source = dev:/dev/urandom
    transport_maps = hash:/etc/postfix/transport
    unknown_local_recipient_reject_code = 550


    cansado:~ # cat /etc/postfix/master.cf | grep -v '#'

    smtp inet n - n - - smtpd
    pickup fifo n - n 60 1 pickup
    cleanup unix n - n - 0 cleanup
    qmgr fifo n - n 300 1 qmgr
    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
    relay unix - - n - - smtp
    -o fallback_relay=
    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
    scache unix - - n - 1 scache
    maildrop unix - n n - - pipe
    flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
    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
    procmail unix - n n - - pipe
    flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}

    Thanks in advance for your help.

    Kind regards
     
  2. sramdane

    sramdane New Member

    Re install without ISPconfig

    Since no one wanted to react for my problem and since I was in rush I have re-installed my server but now without the ISPconfig, which was something very new for me.

    Thanks anyway for those who have looked at my message:)

    Kind regards
     
  3. falko

    falko Super Moderator ISPConfig Developer

    Might have been a firewall problem.
     
  4. sramdane

    sramdane New Member

    Thanks

    I agree! however, related to ISPconfig where it was activated. I will let you know when I re enable my server tonight or tomorrow.

    Anyway it was Suse 10.0 and I followed exact. the perfect setup doc you have on howto forge, which worked seemeless but left the postfix refusing mail.

    Thanks!

    Kind regards
     
  5. falko

    falko Super Moderator ISPConfig Developer

    But did you enable the ISPConfig firewall before the problem occurred?
    Might also be a problem with wrong DNS records.
     
  6. sramdane

    sramdane New Member

    It was because of amavis

    I activated firewall after installation of ISPConfig. For this I repead I have followed the perfect setup for Suse 10.0.

    However I have found the reason of this:

    cansado postfix/postfix-script starting the Postfix mail system
    cansado postfix/master[12691] daemon started -- version 2.2.5, configuration /etc/postfix
    cansado postfix/qmgr[12693] 74A6420047: from=<[email protected]>, size=687681, nrcpt=1 (queue active)
    cansado postfix/smtp[12731] connect to mail.elmouritania.com[82.127.33.113]: Connection refused (port 25)
    cansado postfix/smtp[12731] 74A6420047: to=<[email protected]>, orig_to=<root>, relay=none, delay=33904, status=deferred (connect to mail.elmouritania.com[82.127.33.113]: Connection refused)

    This simply was because of amavis, which was not started for a strange reason in Suse 10.0 and 10.1. It complained of not FQN. So I had to refer $myhostname in /etc/amavisd.conf.

    So this was nothing to do with ISPConfig - I repeat which is new for me.

    So, I guess, Falko, you win some euros here - look for future comm when I will get some time to clean the 10.1 I have installed.

    Thanks again

    Kind regards
     

Share This Page