Postfix Problem

Discussion in 'Installation/Configuration' started by rlhesson, Aug 9, 2006.

  1. rlhesson

    rlhesson Guest

    I am running Mandriva 2006 according to the Perfect Setup installation. I have configured postfix and also run ISPConfig. I have the Maildir option checked in ISPConfig, and have done all the requried things to setup Postfix per the installation instructions. My problem is I can send mail but I cannot receive it. Here is my main.cnf and maillog any help would be appreciated.

    # These are only the parameters changed from a default install
    # see /etc/postfix/main.cf.dist for a commented, fuller version of this file.

    # These are changed by postfix install script
    readme_directory = /usr/share/doc/postfix-2.2.5/README_FILES
    html_directory = /usr/share/doc/postfix-2.2.5/html
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    command_directory = /usr/sbin
    manpage_directory = /usr/share/man
    daemon_directory = /usr/lib/postfix
    newaliases_path = /usr/bin/newaliases
    mailq_path = /usr/bin/mailq
    queue_directory = /var/spool/postfix
    mail_owner = postfix

    # User configurable parameters

    inet_interfaces = all
    mynetworks_style = host
    delay_warning_time = 4h
    smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandriva Linux)
    unknown_local_recipient_reject_code = 450
    smtp-filter_destination_concurrency_limit = 2
    lmtp-filter_destination_concurrency_limit = 2
    smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
    recipient_delimiter = +
    owner_request_special = no
    alias_maps = hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases
    smtpd_sas1_local_domain =
    smtpd_sas1_auth_enable = yes
    smtpd_sas1_security_options = noanonymous
    broken_sas1_auth_clients = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    inet_ineterfaces = all
    mydomain = rlhesson.com
    myhostname = server1.$mydomain
    mydestination = /etc/postfix/local-host-names, localhost.rlhesson.com
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom

    virtual_maps = hash:/etc/postfix/virtusertable
    home_mailbox = Maildir/
    mailbox_command =
    -------------------------------------------------------------------------------------

    Mail log:

    Aug 7 03:27:55 server1 postfix/pickup[1206]: 418B51F51D1: uid=10001 from=<web1_rlhesson>
    Aug 7 03:27:55 server1 postfix/cleanup[1300]: 418B51F51D1: message-id=<20060807082755.418B51F51D1@server1.rlhesson.com>
    Aug 7 03:27:55 server1 postfix/local[1303]: 347B81F51B0: to=<web1_rlhesson@server1.rlhesson.com>, orig_to=<rlhesson@www.rlhesson.com>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Aug 7 03:27:55 server1 postfix/qmgr[1207]: 418B51F51D1: from=<web1_rlhesson@server1.rlhesson.com>, size=390, nrcpt=1 (queue active)
    Aug 7 03:27:55 server1 postfix/local[1303]: 418B51F51D1: to=<admispconfig@localhost.rlhesson.com>, orig_to=<admispconfig@localhost>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Aug 7 03:27:55 server1 postfix/qmgr[1207]: 418B51F51D1: removed
    Aug 7 03:27:55 server1 postfix/pickup[1206]: 48DE11F51D1: uid=10001 from=<web1_rlhesson>
    Aug 7 03:27:55 server1 postfix/cleanup[1300]: 48DE11F51D1: message-id=<20060807082755.48DE11F51D1@server1.rlhesson.com>
    Aug 7 03:27:55 server1 postfix/local[1339]: 347B81F51B0: to=<web1_rlhesson@server1.rlhesson.com>, orig_to=<rlhesson@rlhesson.com>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Aug 7 03:27:55 server1 postfix/local[1352]: 347B81F51B0: to=<web1_rlhesson@server1.rlhesson.com>, orig_to=<web1_rlhesson@rlhesson.com>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Aug 7 03:27:55 server1 postfix/qmgr[1207]: 347B81F51B0: removed
    Aug 7 03:27:55 server1 postfix/qmgr[1207]: 48DE11F51D1: from=<web1_rlhesson@server1.rlhesson.com>, size=390, nrcpt=1 (queue active)
    Aug 7 03:27:55 server1 postfix/pickup[1206]: 4A2D61F51B0: uid=10001 from=<web1_rlhesson>
    Aug 7 03:27:55 server1 postfix/cleanup[1300]: 4A2D61F51B0: message-id=<20060807082755.4A2D61F51B0@server1.rlhesson.com>
    Aug 7 03:27:55 server1 postfix/qmgr[1207]: 4A2D61F51B0: from=<web1_rlhesson@server1.rlhesson.com>, size=390, nrcpt=1 (queue active)
    Aug 7 03:27:55 server1 postfix/local[1303]: 48DE11F51D1: to=<admispconfig@localhost.rlhesson.com>, orig_to=<admispconfig@localhost>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Aug 7 03:27:55 server1 postfix/qmgr[1207]: 48DE11F51D1: removed
    Aug 7 03:27:55 server1 postfix/local[1339]: 4A2D61F51B0: to=<admispconfig@localhost.rlhesson.com>, orig_to=<admispconfig@localhost>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Aug 7 03:27:55 server1 postfix/qmgr[1207]: 4A2D61F51B0: removed
    Aug 7 03:27:58 server1 ipop3d[1388]: pop3 service init from 127.0.0.1
    Aug 7 03:27:58 server1 ipop3d[1388]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:27:58 server1 ipop3d[1388]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:27:59 server1 ipop3d[1391]: pop3 service init from 127.0.0.1
    Aug 7 03:27:59 server1 ipop3d[1391]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:27:59 server1 ipop3d[1391]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:28:02 server1 ipop3d[1398]: pop3 service init from 127.0.0.1
    Aug 7 03:28:02 server1 ipop3d[1398]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:28:02 server1 ipop3d[1398]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:28:07 server1 ipop3d[1405]: pop3 service init from 127.0.0.1
    Aug 7 03:28:07 server1 ipop3d[1405]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:28:07 server1 ipop3d[1405]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:28:09 server1 ipop3d[1408]: pop3 service init from 127.0.0.1
    Aug 7 03:28:09 server1 ipop3d[1408]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:28:09 server1 ipop3d[1408]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:28:09 server1 ipop3d[1409]: pop3 service init from 127.0.0.1
    Aug 7 03:28:09 server1 ipop3d[1409]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:28:09 server1 ipop3d[1409]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:28:11 server1 ipop3d[1410]: pop3 service init from 127.0.0.1
    Aug 7 03:28:11 server1 ipop3d[1410]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:28:11 server1 ipop3d[1410]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:28:15 server1 ipop3d[1417]: pop3 service init from 127.0.0.1
    Aug 7 03:28:15 server1 ipop3d[1417]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:28:15 server1 ipop3d[1417]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:28:15 server1 ipop3d[1418]: pop3 service init from 127.0.0.1
    Aug 7 03:28:15 server1 ipop3d[1418]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:28:15 server1 ipop3d[1418]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:28:18 server1 ipop3d[1423]: pop3 service init from 127.0.0.1
    Aug 7 03:28:18 server1 ipop3d[1423]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:28:18 server1 ipop3d[1423]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:28:19 server1 ipop3d[1426]: pop3 service init from 127.0.0.1
    Aug 7 03:28:19 server1 ipop3d[1426]: Login user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0/0
    Aug 7 03:28:19 server1 ipop3d[1426]: Logout user=web1_rlhesson host=server1.rlhesson.com [127.0.0.1] nmsgs=0 ndele=0
    Aug 7 03:31:15 server1 postfix/anvil[1217]: statistics: max connection rate 1/60s for (smtp:64.233.182.184) at Aug 7 03:24:31
    Aug 7 03:31:15 server1 postfix/anvil[1217]: statistics: max connection count 1 for (smtp:64.233.182.184) at Aug 7 03:24:31
    Aug 7 03:31:15 server1 postfix/anvil[1217]: statistics: max cache size 1 at Aug 7 03:24:31
     
  2. rlhesson

    rlhesson Guest

    Here is my master.cf and the instructions I used to setup.


    #
    # Postfix master process configuration file. For details on the format
    # of the file, see the Postfix master(5) manual page.
    #
    # The script postfix-chroot.sh can be used to set up a Postfix chroot
    # environment on your Mandrivalinux System.
    #
    # ==========================================================================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (yes) (never) (100)
    # ==========================================================================
    smtp inet n - y - - smtpd
    #submission inet n - n - - smtpd
    # -o smtpd_etrn_restrictions=reject
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #smtps inet n - n - - smtpd
    # -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
    #submission inet n - n - - smtpd
    # -o smtpd_etrn_restrictions=reject
    # -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
    #628 inet n - n - - qmqpd
    pickup fifo n - y 60 1 pickup
    -o content_filter=
    -o receive_override_options=
    cleanup unix n - y - 0 cleanup
    qmgr fifo n - y 300 1 qmgr
    #qmgr fifo n - n 300 1 oqmgr
    tlsmgr unix - - y 1000? 1 tlsmgr
    rewrite unix - - y - - trivial-rewrite
    bounce unix - - y - 0 bounce
    defer unix - - y - 0 bounce
    trace unix - - y - 0 bounce
    verify unix - - y - 1 verify
    flush unix n - y 1000? 0 flush
    proxymap unix - - n - - proxymap
    smtp unix - - y - - smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay unix - - y - - smtp
    -o fallback_relay=
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - y - - showq
    error unix - - y - - error
    discard unix - - y - - discard
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - y - - lmtp
    anvil unix - - y - 1 anvil
    scache unix - - y - 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=nobody argv=/usr/bin/maildrop -d ${recipient}
    #
    # Cyrus. Please See the Postfix CYRUS_README file for details
    #
    # deliver interface (deprecated), to use this also use
    # postconf -e cyrus-deliver_destination_recipient_limit=1
    cyrus-deliver unix - n n - - pipe
    user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # for default cyrus socket placement
    cyrus unix - n n - - lmtp
    -o lmtp_cache_connection=yes
    #
    # if you configure cyrus socket in the chroot jail
    cyrus-chroot unix - - y - - lmtp
    -o lmtp_cache_connection=yes
    #
    # for lmtp to cyrus via tcp
    cyrus-inet unix - - y - - lmtp
    -o lmtp_cache_connection=yes
    -o lmtp_sasl_auth_enable=yes
    -o lmtp_sasl_password_maps=hash:/etc/postfix/cyrus_lmtp_sasl_pass
    -o lmtp_sasl_security_options=noanonymous
    #
    # UUCP. Unix to Unix CoPy
    #
    # 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.
    # These are not distributed with Mandrivalinux
    #
    #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

    ##### START OF CONTENT FILTER CUSTOMIZATIONS #####
    # Please see the Postfix FILTER_README for details.
    # These sample entries expect your content filter to
    # listen on port 10025 and to inject mail back into
    # postfix on port 10026.
    #
    # to enable such content filter run the command
    # postconf -e content_filter=smtp-filter:127.0.0.1:10025
    # postconf -e smtp-filter_destination_concurrency_limit=2
    # or
    # postconf -e content_filter=lmtp-filter:127.0.0.1:10025
    # postconf -e lmtp-filter_destination_concurrency_limit=2
    # and the command
    # postconf -e receive_override_options=no_address_mappings
    #

    127.0.0.1:10026 inet n - y - - smtpd
    -o content_filter=
    -o smtpd_restriction_classes=
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o mynetworks=127.0.0.0/8
    -o smtpd_authorized_xforward_hosts=127.0.0.0/8
    -o strict_rfc821_envelopes=yes
    -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
    -o smtpd_client_connection_limit_exceptions=127.0.0.0/8

    lmtp-filter unix - - y - - lmtp
    -o lmtp_data_done_timeout=1200
    -o lmtp_send_xforward_command=yes

    smtp-filter unix - - y - - smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes

    ##### END OF CONTENT FILTER CUSTOMIZATIONS #####




    ----------------------------------------------------------------------------------------------

    Postfix With SMTP-AUTH And TLS

    urpmi cyrus-sasl libsasl2 libsasl2-devel libsasl2-plug-plain libsasl2-plug-anonymous libsasl2-plug-crammd5 libsasl2-plug-digestmd5 libsasl2-plug-gssapi libsasl2-plug-login postfix imap

    postconf -e 'smtpd_sasl_local_domain ='
    postconf -e 'smtpd_sasl_auth_enable = yes'
    postconf -e 'smtpd_sasl_security_options = noanonymous'
    postconf -e 'broken_sasl_auth_clients = yes'
    postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
    postconf -e 'inet_interfaces = all'
    postconf -e 'mydomain = example.com'
    postconf -e 'myhostname = server1.$mydomain'
    postconf -e 'mydestination = /etc/postfix/local-host-names, localhost.example.com'

    touch /etc/postfix/local-host-names

    Edit /etc/postfix/sasl/smtpd.conf. It should look like this:

    # SASL library configuration file for postfix
    # all parameters are documented into:
    # /usr/share/doc/cyrus-sasl-2.*/options.html

    # The mech_list parameters list the sasl mechanisms to use,
    # default being all mechs found.
    mech_list: plain login

    # To authenticate using the separate saslauthd daemon, (e.g. for
    # system or ldap users). Also see /etc/sysconfig/saslauthd.
    pwcheck_method: saslauthd
    saslauthd_path: /var/lib/sasl2/mux

    # To authenticate against users stored in sasldb.
    #pwcheck_method: auxprop
    #auxprop_plugin: sasldb
    #sasldb_path: /var/lib/sasl2/sasldb2

    mkdir /etc/postfix/ssl
    cd /etc/postfix/ssl/
    openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
    chmod 600 smtpd.key
    openssl req -new -key smtpd.key -out smtpd.csr
    openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
    openssl rsa -in smtpd.key -out smtpd.key.unencrypted
    mv -f smtpd.key.unencrypted smtpd.key
    openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650

    postconf -e 'smtpd_tls_auth_only = no'
    postconf -e 'smtp_use_tls = yes'
    postconf -e 'smtpd_use_tls = yes'
    postconf -e 'smtp_tls_note_starttls_offer = yes'
    postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key'
    postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
    postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
    postconf -e 'smtpd_tls_loglevel = 1'
    postconf -e 'smtpd_tls_received_header = yes'
    postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
    postconf -e 'tls_random_source = dev:/dev/urandom'

    Now start Postfix, saslauthd, imap and pop3:

    chkconfig imap on
    chkconfig imaps on
    chkconfig ipop3 on
    chkconfig pop3s on
    /etc/init.d/postfix restart
    /etc/init.d/saslauthd restart
    /etc/init.d/xinetd restart

    To see if SMTP-AUTH and TLS work properly now run the following command:

    telnet localhost 25

    After you have established the connection to your postfix mail server type

    ehlo localhost

    If you see the lines

    250-STARTTLS

    and

    250-AUTH

    everything is fine.
     
  3. rlhesson

    rlhesson Guest

    I resolved the problem. Must have goofed something in the postfix initial install...reinstalled and everything working fine now.
     

Share This Page