Postfix problem

Discussion in 'HOWTO-Related Questions' started by paul31, Aug 27, 2013.

  1. paul31

    paul31 New Member

    Hi
    I'm very new to linux so would be greatful if someone could help me resolve this Postfix problem.

    I'm trying to configure Postfix to just send externally (not receive). I'm able to send the messages to postfix however they are stuck in the deferred mail queue.

    When checking with pfqueue, the status of each mail is either "No route to host" or "Connection timed out"
    I've not included a relay host as was trying to send direct, however when I input a relay host, the problem is still the same as being "No route to host" or "Connection timed out".

    I have spoken with my ISP who told me they don't block any ports at all.

    traceroute -p 25 mail.google.com
    traceroute to mail.google.com (173.194.34.118), 30 hops max, 60 byte packets
    1 lns1.uan.the.uk.murphx.net (94.30.127.72) 32.387 ms 33.085 ms 34.085 ms
    2 er1.uan.the.uk.murphx.net (94.30.127.65) 35.758 ms 36.695 ms 37.419 ms
    3 ge2-6-1.crs1.core.the.uk.murphx.net (94.30.127.225) 38.426 ms 40.109 ms 40.552 ms
    4 * * *
    5 * * *
    6 * * *
    7 * * *
    8 * * *
    9 * * *
    10 * * *
    11 * * *
    12 * * *
    13 * * *
    14 * * *
    15 * * *
    16 * * *
    17 * * *
    18 * * *
    19 * * *
    20 * * *
    21 * * *
    22 * * *
    23 * * *
    24 * * *
    25 * * *
    26 * * *
    27 * * *
    28 * * *
    29 * * *
    30 * * *
    root@NCserver:~#


    telnet localhost 25
    Trying ::1...
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 test.newworldenergy.co.uk ESMTP Postfix


    netstat -alnp | grep :25
    tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 32421/master

    ==== Main.cf ====

    smtpd_banner = $myhostname ESMTP $mail_name
    biff = no
    mailbox_size_limit = 0
    recipient_delimiter = +
    append_dot_mydomain = no
    mail_spool_directory = /var/mail
    relayhost =
    mynetworks = 127.0.0.1/32 192.168.1.1 #This is the machine i'm sending the mail to the server from
    inet_interfaces = all
    myhostname = test.newworldenergy.co.uk
    mydomain = newworldenergy.co.uk
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    mydestination = $mydomain $myhostname localhost.localdomain localhost
    default_process_limit = 100
    smtpd_client_connection_count_limit = 10
    smtpd_client_connection_rate_limit = 30
    header_size_limit = 51200
    smtp_recipient_limit = 100

    ==== Master.cf====

    #
    # Postfix master process configuration file. For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ==========================================================================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (yes) (never) (100)
    # ==========================================================================
    smtp inet n - - - - smtpd
    #submission inet n - - - - smtpd
    # -o smtpd_tls_security_level=encrypt
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    # -o milter_macro_daemon_name=ORIGINATING
    #smtps inet n - - - - smtpd
    # -o smtpd_tls_wrappermode=yes
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    # -o milter_macro_daemon_name=ORIGINATING
    #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
    proxywrite unix - - n - 1 proxymap
    smtp unix - - - - - smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay unix - - - - - smtp
    -o smtp_fallback_relay=
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - - - - showq
    error unix - - - - - error
    retry 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
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent. See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop unix - n n - - pipe
    flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
    #
    # ====================================================================
    #
    # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
    #
    # Specify in cyrus.conf:
    # lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
    #
    # Specify in main.cf one or more of the following:
    # mailbox_transport = lmtp:inet:localhost
    # virtual_transport = lmtp:inet:localhost
    #
    # ====================================================================
    #
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    #
    #cyrus unix - n n - - pipe
    # user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # ====================================================================
    # Old example of delivery via Cyrus.
    #
    #old-cyrus unix - n n - - pipe
    # flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    #
    # ====================================================================
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp unix - n n - - pipe
    flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    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}


    Thanks

    Paul

    Sorry, just realised posted in wrong thread, not sure how to move
     
    Last edited: Aug 27, 2013
  2. biggdog

    biggdog Member

    Who is your ISP.
    Most if not all "JMO" do not allow us to send out emails because they think we do not know what we are doing or they think we are spammers.
     
  3. Quaxth

    Quaxth Member

    Have you checked that the SMTP of your ISP is an Open Relay? If not, go to: http://www.mydnstools.info/smtprelay key in your ISP's SMTP Server Name like: mail.domain.com and run the check.

    Also, have you set the nameservers for your domain correctly? Keep in mind, if you use your own nameserver, you will need 2 public/static IP's because you need to set 2 nameserver ns1.xxxxx.xxx and ns2.xxxxx.xxx and each need it's own public/static IP! you could use the nameserver from your domain registra, which are mainly free to use and just create an A Record for to point to your single public/static IP.
     

Share This Page