Help: Postfix receiving mail, /dev/null

Discussion in 'Server Operation' started by mushie, Apr 20, 2008.

  1. mushie

    mushie New Member

    Hi, please excuse my noobness, I was able to setup my server and ispconfig with this excellent guide: http://www.howtoforge.com/perfect_setup_centos5.0

    I can't get Postfix to receive email but sending is fine. When i send an email to my gmail account it works great, when I send an email FROM gmail to an email user on the server, the email is returned with this message:

    Code:
    Delivery to the following recipient failed permanently:
    
        [email protected]
    
    Technical details of permanent failure:
    PERM_FAILURE: Gmail tried to deliver your message, but it was rejected by the recipient domain. The error that the other server returned was: 550 550 5.1.1 <[email protected]>: 
    Recipient address rejected: User unknown in local recipient table.
    If i email web24_android @ phoneandroid.co.uk (same user) I get a different error:

    Code:
    The mail system
    <[email protected]>: critical OS file missing. 
    Command output: procmail: Error while writing to "/dev/null"
    I tried to fix this (oops) by updating ispconfig and also
    rm /dev/null
    mknod /dev/null c 1 3
    but i still get the same error, if im logged in to the shell it also tells me:
    Message from syslogd@ at Sun Apr 20 18:11:44 2008 ...
    base procmail[25303]: Error while writing to "/dev/null"
    when i send the email.
    I was also getting problems with relay denied message until I explicitly put the server name at mydestination in postfix/main.cf


    postconf -n
    Code:
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    debug_peer_level = 2
    home_mailbox = Maildir/
    html_directory = no
    inet_interfaces = all
    mail_owner = postfix
    mailbox_command =
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    mydestination = $myhostname, localhost.$mydomain, localhost,phoneandroid.co.uk,base.phoneandroid.co.uk
    mynetworks = 127.0.0.0/8
    newaliases_path = /usr/bin/newaliases.postfix
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtp_tls_note_starttls_offer = yes
    smtp_use_tls = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    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_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom
    unknown_local_recipient_reject_code = 550
    some maillog output:
    Code:
    Apr 20 18:03:11 base postfix/smtpd[25178]: connect from rv-out-0708.google.com[209.85.198.240]
    Apr 20 18:03:12 base postfix/smtpd[25178]: NOQUEUE: reject: RCPT from rv-out-0708.google.com[209.85.198.240]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<rv-out-0506.google.com>
    Apr 20 18:03:12 base postfix/smtpd[25178]: disconnect from rv-out-0708.google.com[209.85.198.240]
    Apr 20 18:06:32 base postfix/anvil[25181]: statistics: max connection rate 1/60s for (smtp:209.85.198.240) at Apr 20 18:03:11
    Apr 20 18:06:32 base postfix/anvil[25181]: statistics: max connection count 1 for (smtp:209.85.198.240) at Apr 20 18:03:11
    Apr 20 18:06:32 base postfix/anvil[25181]: statistics: max cache size 1 at Apr 20 18:03:11
    Apr 20 18:11:43 base postfix/smtpd[25297]: connect from rv-out-0708.google.com[209.85.198.246]
    Apr 20 18:11:43 base postfix/smtpd[25297]: B383658D56: client=rv-out-0708.google.com[209.85.198.246]
    Apr 20 18:11:44 base postfix/cleanup[25301]: B383658D56: message-id=<[email protected]>
    Apr 20 18:11:44 base postfix/qmgr[24810]: B383658D56: from=<[email protected]>, size=2017, nrcpt=1 (queue active)
    Apr 20 18:11:44 base procmail[25303]: Error while writing to "/dev/null"
    Apr 20 18:11:44 base postfix/local[25302]: B383658D56: to=<[email protected]>, relay=local, delay=0.85, delays=0.54/0.01/0/0.3, dsn=5.3.0, status=bounced (critical OS file missing. Command output: procmail: Error while writing to "/dev/null" )
    Apr 20 18:11:44 base postfix/cleanup[25301]: 5BF2158D67: message-id=<[email protected]>
    Apr 20 18:11:44 base postfix/qmgr[24810]: 5BF2158D67: from=<>, size=3957, nrcpt=1 (queue active)
    Apr 20 18:11:44 base postfix/bounce[25306]: B383658D56: sender non-delivery notification: 5BF2158D67
    Apr 20 18:11:44 base postfix/qmgr[24810]: B383658D56: removed
    Apr 20 18:11:45 base postfix/smtp[25307]: 5BF2158D67: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[209.85.135.27]:25, delay=1.3, delays=0.01/0.14/0.09/1.1, dsn=2.0.0, status=sent (250 2.0.0 OK 1208714961 g1si10037515muf.5)
    Apr 20 18:11:45 base postfix/qmgr[24810]: 5BF2158D67: removed
    Apr 20 18:12:14 base postfix/smtpd[25297]: disconnect from rv-out-0708.google.com[209.85.198.246]
    Apr 20 18:15:34 base postfix/anvil[25299]: statistics: max connection rate 1/60s for (smtp:209.85.198.246) at Apr 20 18:11:43
    Apr 20 18:15:34 base postfix/anvil[25299]: statistics: max connection count 1 for (smtp:209.85.198.246) at Apr 20 18:11:43
    Apr 20 18:15:34 base postfix/anvil[25299]: statistics: max cache size 1 at Apr 20 18:11:43

    I've read lots of threads and tried lots of things, but I can't fix it, thank you for your help! :)
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /dev/null
    ? What's in /etc/postfix/master.cf?
     
  3. mushie

    mushie New Member

    #ls -la /dev/null
    Code:
    crw-r--r-- 1 root root 1, 3 Apr 20 17:43 /dev/null
    /etc/postfix/master.cf
    Code:
    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       n       -       -       smtpd
    #submission inet n       -       n       -       -       smtpd
    #  -o smtpd_enforce_tls=yes
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #smtps     inet  n       -       n       -       -       smtpd
    #  -o smtpd_tls_wrappermode=yes
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #628      inet  n       -       n       -       -       qmqpd
    pickup    fifo  n       -       n       60      1       pickup
    cleanup   unix  n       -       n       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    #qmgr     fifo  n       -       n       300     1       oqmgr
    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
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay     unix  -       -       n       -       -       smtp
            -o fallback_relay=
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    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
    #
    # ====================================================================
    # 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/local/bin/maildrop -d ${recipient}
    #
    # The Cyrus deliver program has changed incompatibly, multiple times.
    #
    old-cyrus unix  -       n       n       -       -       pipe
      flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    cyrus     unix  -       n       n       -       -       pipe
      user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
    
    Thank you very much for trying to help :)
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Run
    Code:
    chmod 666 /dev/null
     

Share This Page