Find the answer to your Linux question:
Results 1 to 2 of 2
Hi people. I staring to learn postfix, at the wiki of centos exist some tutorials but I need a more deep setup. I read the book of postfix, try to ...
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    6

    Question Postfix configuration problems. Cannot receive emails

    Hi people.

    I staring to learn postfix, at the wiki of centos exist some tutorials but I need a more deep setup. I read the book of postfix, try to setup but I still cannot receive emails, I want to setup this with dovecot but that is other history.

    Right I test with telnet and everything works, I see that I can login with a user and send a test mail with telnet, but I check the user that supposes that will receive the mail but I don't see any new email.

    This is my current settings on main.cf, is the only setup I had touch of postfix.

    ********main.conf***********
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix
    myhostname = mail.my-domain
    mydomain = my-domain
    myorigin = $mydomain
    inet_interfaces = all
    mydestination = $myhostname, localhost.$mydomain, $mydomain
    unknown_local_recipient_reject_code = 550
    mynetworks = 192.168.50.0/24, 127.0.0.0/8
    relay_domains = $mydestination
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    local_recipient_maps = unixasswd.byname $alias_maps
    home_mailbox = Maildir/
    mailbox_command = /usr/bin/procmail
    smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
    local_destination_concurrency_limit = 1
    debug_peer_level = 5
    debug_peer_list = 127.0.0.1
    debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    xxgdb $daemon_directory/$process_name $process_id & sleep 5

    sendmail_path = /usr/sbin/sendmail.postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    setgid_group = postdrop
    html_directory = no
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES

    I don't want to use virtual users, I want to use the real /home folder for each user, because this is a domain with PDC+LDAP. Reading about I see that the only way to achieve this is to setup a procmailrc file inside /etc, this way will be a global setup, this is my procmailrc file:

    ****procmailrc******
    MAILDIR=$HOME/Maildir
    DEFAULT=$HOME/Maildir
    LOGFILE=$HOME/pm.log
    VERBOSE=on
    TMP=/tmp

    Dovecot is not yet ready, I don't this for test right?

    I even increase the debug level in postfix as u can see, because it looks like postfix is sending the test mail but the users Mailbox is empty. The log is to large, but this is a part of it:

    Dec 5 00:12:17 mail postfix/smtpd[6547]: resolve_clnt: `' -> `user1*XXX.dyndns.org' -> transp=`local' host=`mail.XXX.dyndns.org' rcpt=`user1*XXX.dyndns.org' flags= class=local
    Dec 5 00:12:17 mail postfix/smtpd[6547]: ctable_locate: install entry key user1*XXX.dyndns.org
    Dec 5 00:12:17 mail postfix/smtpd[6547]: extract_addr: in: <XXX*XXX.dyndns.org>, result: XXX*XXX.dyndns.org
    Dec 5 00:12:17 mail postfix/smtpd[6547]: fsspace: .: block size 4096, blocks free 3816770
    Dec 5 00:12:17 mail postfix/smtpd[6547]: smtpd_check_queue: blocks 4096 avail 3816770 min_free 0 msg_size_limit 10240000
    Dec 5 00:12:17 mail postfix/smtpd[6547]: > mail.XXX.dyndns.org[192.168.50.140]: 250 2.1.0 Ok
    Dec 5 00:12:17 mail postfix/smtpd[6547]: watchdog_pat: 0x819ae78
    Dec 5 00:12:17 mail postfix/smtpd[6547]: vstream_fflush_some: fd 9 flush 14
    Dec 5 00:12:30 mail postfix/smtpd[6547]: vstream_buf_get_ready: fd 9 got 39
    Dec 5 00:12:30 mail postfix/smtpd[6547]: < mail.XXX.dyndns.org[192.168.50.140]: rcpt to:<user2*XXX.dyndns.org>
    Dec 5 00:12:30 mail postfix/smtpd[6547]: extract_addr: input: <user2*XXX.dyndns.org>
    Dec 5 00:12:30 mail postfix/smtpd[6547]: smtpd_check_addr: addr=user2*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: event_request_timer: reset 0x59a310 0x81a8e70 100
    Dec 5 00:12:30 mail postfix/smtpd[6547]: send attr request = rewrite
    Dec 5 00:12:30 mail postfix/smtpd[6547]: send attr rule = local
    Dec 5 00:12:30 mail postfix/smtpd[6547]: send attr address = user2*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: vstream_fflush_some: fd 12 flush 64
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: flags
    Dec 5 00:12:30 mail postfix/smtpd[6547]: vstream_buf_get_ready: fd 12 got 45
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: flags
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute value: 0
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: address
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: address
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute value: user2*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: (list terminator)
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: (end)
    Dec 5 00:12:30 mail postfix/smtpd[6547]: rewrite_clnt: local: user2*XXX.dyndns.org -> user2*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: event_request_timer: reset 0x59a310 0x81a8e70 100
    Dec 5 00:12:30 mail postfix/smtpd[6547]: send attr request = resolve
    Dec 5 00:12:30 mail postfix/smtpd[6547]: send attr sender =
    Dec 5 00:12:30 mail postfix/smtpd[6547]: send attr address = user2*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: vstream_fflush_some: fd 12 flush 61
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: flags
    Dec 5 00:12:30 mail postfix/smtpd[6547]: vstream_buf_get_ready: fd 12 got 105
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: flags
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute value: 0
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: transport
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: transport
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute value: local
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: nexthop
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: nexthop
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute value: mail.XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: recipient
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: recipient
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute value: user2*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: flags
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: flags
    Dec 5 00:12:30 mail postfix/smtpd[6547]: resolve_clnt: `' -> `user2*XXX.dyndns.org' -> transp=`local' host=`mail.XXX.dyndns.org' rcpt=`user2*XXX.dyndns.org' flags= class=local
    Dec 5 00:12:30 mail postfix/smtpd[6547]: ctable_locate: install entry key user2*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: extract_addr: in: <user2*XXX.dyndns.org>, result: user2*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: event_request_timer: reset 0x59a310 0x81a8e70 100
    Dec 5 00:12:30 mail postfix/smtpd[6547]: send attr request = rewrite
    Dec 5 00:12:30 mail postfix/smtpd[6547]: send attr rule = local
    Dec 5 00:12:30 mail postfix/smtpd[6547]: send attr address = postmaster
    Dec 5 00:12:30 mail postfix/smtpd[6547]: vstream_fflush_some: fd 12 flush 47
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: flags
    Dec 5 00:12:30 mail postfix/smtpd[6547]: vstream_buf_get_ready: fd 12 got 47
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: flags
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute value: 0
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: address
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: address
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute value: postmaster*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: private/rewrite socket: wanted attribute: (list terminator)
    Dec 5 00:12:30 mail postfix/smtpd[6547]: input attribute name: (end)
    Dec 5 00:12:30 mail postfix/smtpd[6547]: rewrite_clnt: local: postmaster -> postmaster*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: >>> START Recipient address RESTRICTIONS <<<
    Dec 5 00:12:30 mail postfix/smtpd[6547]: generic_checks: name=permit_mynetworks
    Dec 5 00:12:30 mail postfix/smtpd[6547]: permit_mynetworks: mail.XXX.dyndns.org 192.168.50.140
    Dec 5 00:12:30 mail postfix/smtpd[6547]: match_hostname: mail.XXX.dyndns.org ~? 192.168.50.0/24
    Dec 5 00:12:30 mail postfix/smtpd[6547]: match_hostaddr: 192.168.50.140 ~? 192.168.50.0/24
    Dec 5 00:12:30 mail postfix/smtpd[6547]: generic_checks: name=permit_mynetworks status=1
    Dec 5 00:12:30 mail postfix/smtpd[6547]: >>> CHECKING RECIPIENT MAPS <<<
    Dec 5 00:12:30 mail postfix/smtpd[6547]: ctable_locate: leave existing entry key user2*XXX.dyndns.org
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: recipient_canonical_maps: user2*XXX.dyndns.org: not found
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: recipient_canonical_maps: user2: not found
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: recipient_canonical_maps: *XXX.dyndns.org: not found
    Dec 5 00:12:30 mail postfix/smtpd[6547]: mail_addr_find: user2*XXX.dyndns.org -> (not found)
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: canonical_maps: user2*XXX.dyndns.org: not found
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: canonical_maps: user2: not found
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: canonical_maps: *XXX.dyndns.org: not found
    Dec 5 00:12:30 mail postfix/smtpd[6547]: mail_addr_find: user2*XXX.dyndns.org -> (not found)
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: virtual_alias_maps: user2*XXX.dyndns.org: not found
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: virtual_alias_maps: user2: not found
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: virtual_alias_maps: *XXX.dyndns.org: not found
    Dec 5 00:12:30 mail postfix/smtpd[6547]: mail_addr_find: user2*XXX.dyndns.org -> (not found)
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: local_recipient_maps: user2*XXX.dyndns.org: not found
    Dec 5 00:12:30 mail postfix/smtpd[6547]: maps_find: local_recipient_maps: unixasswd.byname(0,lock|fold_fix): user2 = user2:1001:513:System User:/home/user2:/sbin/nologin
    Dec 5 00:12:30 mail postfix/smtpd[6547]: mail_addr_find: user2*XXX.dyndns.org -> user2:1001:513:System User:/home/user2:/sbin/nologin
    Dec 5 00:12:30 mail postfix/smtpd[6547]: smtpd_check_rewrite: trying: permit_inet_interfaces
    Dec 5 00:12:30 mail postfix/smtpd[6547]: permit_inet_interfaces: mail.XXX.dyndns.org 192.168.50.140
    Dec 5 00:12:30 mail postfix/smtpd[6547]: before input_transp_cleanup: cleanup flags = enable_header_body_filter enable_automatic_bcc enable_address_mapping enable_milters
    Dec 5 00:12:30 mail postfix/smtpd[6547]: after input_transp_cleanup: cleanup flags = enable_header_body_filter enable_automatic_bcc enable_address_mapping
    Dec 5 00:12:30 mail postfix/smtpd[6547]: connect to subsystem public/cleanup
    Dec 5 00:12:30 mail postfix/smtpd[6547]: > mail.XXX.dyndns.org[192.168.50.140]: 250 2.1.5 Ok
    Dec 5 00:12:30 mail postfix/smtpd[6547]: watchdog_pat: 0x819ae78
    Dec 5 00:12:30 mail postfix/smtpd[6547]: vstream_fflush_some: fd 9 flush 14
    Dec 5 00:12:32 mail postfix/smtpd[6547]: vstream_buf_get_ready: fd 9 got 6
    Dec 5 00:12:32 mail postfix/smtpd[6547]: < mail.XXX.dyndns.org[192.168.50.140]: data
    Dec 5 00:12:32 mail postfix/smtpd[6547]: rec_put: type M len 0 data
    Dec 5 00:12:32 mail postfix/smtpd[6547]: rec_put: type N len 81 data Received:
    Dec 5 00:12:32 mail postfix/smtpd[6547]: rec_put: type N len 62 data ?by mail.p
    Dec 5 00:12:32 mail postfix/smtpd[6547]: rec_put: type N len 73 data ?for <eque
    Dec 5 00:12:32 mail postfix/smtpd[6547]: > mail.XXX.dyndns.org[192.168.50.140]: 354 End data with <CR><LF>.<CR><LF>
    Dec 5 00:12:32 mail postfix/smtpd[6547]: vstream_fflush_some: fd 9 flush 37
    Dec 5 00:12:39 mail postfix/smtpd[6547]: vstream_buf_get_ready: fd 9 got 7
    Dec 5 00:12:39 mail postfix/smtpd[6547]: rec_put: type N len 5 data test.
    Dec 5 00:12:39 mail postfix/smtpd[6547]: vstream_buf_get_ready: fd 9 got 3
    Dec 5 00:12:39 mail postfix/smtpd[6547]: rec_put: type X len 0 data
    Dec 5 00:12:39 mail postfix/smtpd[6547]: rec_put: type E len 0 data
    Dec 5 00:12:39 mail postfix/smtpd[6547]: vstream_fflush_some: fd 14 flush 235
    Dec 5 00:12:39 mail postfix/smtpd[6547]: public/cleanup socket: wanted attribute: status
    Dec 5 00:12:39 mail postfix/cleanup[6551]: 6B6CC18FA01: message-id=<20091205081230.6B6CC18FA01*mail.XXX.dyndns.org >
    Dec 5 00:12:39 mail postfix/smtpd[6547]: vstream_buf_get_ready: fd 14 got 18
    Dec 5 00:12:39 mail postfix/smtpd[6547]: input attribute name: status
    Dec 5 00:12:39 mail postfix/smtpd[6547]: input attribute value: 0
    Dec 5 00:12:39 mail postfix/smtpd[6547]: public/cleanup socket: wanted attribute: reason
    Dec 5 00:12:39 mail postfix/smtpd[6547]: input attribute name: reason
    Dec 5 00:12:39 mail postfix/smtpd[6547]: input attribute value: (end)
    Dec 5 00:12:39 mail postfix/smtpd[6547]: public/cleanup socket: wanted attribute: (list terminator)
    Dec 5 00:12:39 mail postfix/smtpd[6547]: input attribute name: (end)
    Dec 5 00:12:39 mail postfix/smtpd[6547]: > mail.XXX.dyndns.org[192.168.50.140]: 250 2.0.0 Ok: queued as 6B6CC18FA01
    Dec 5 00:12:39 mail postfix/smtpd[6547]: watchdog_pat: 0x819ae78
    Dec 5 00:12:39 mail postfix/smtpd[6547]: vstream_fflush_some: fd 9 flush 37
    Dec 5 00:12:39 mail postfix/qmgr[6516]: 6B6CC18FA01: from=<user1*XXX.dyndns.org>, size=406, nrcpt=1 (queue active)
    Dec 5 00:12:39 mail postfix/local[6552]: 6B6CC18FA01: to=<user2*XXX.dyndns.org>, relay=local, delay=22, delays=22/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail)
    Dec 5 00:12:39 mail postfix/qmgr[6516]: 6B6CC18FA01: removed
    Dec 5 00:12:40 mail postfix/smtpd[6547]: vstream_buf_get_ready: fd 9 got 6
    Dec 5 00:12:40 mail postfix/smtpd[6547]: < mail.XXX.dyndns.org[192.168.50.140]: quit
    Dec 5 00:12:40 mail postfix/smtpd[6547]: > mail.XXX.dyndns.org[192.168.50.140]: 221 2.0.0 Bye
    Dec 5 00:12:40 mail postfix/smtpd[6547]: vstream_fflush_some: fd 9 flush 15
    Dec 5 00:12:40 mail postfix/smtpd[6547]: match_hostname: mail.XXX.dyndns.org ~? 192.168.50.0/24
    Dec 5 00:12:40 mail postfix/smtpd[6547]: match_hostaddr: 192.168.50.140 ~? 192.168.50.0/24
    Dec 5 00:12:40 mail postfix/smtpd[6547]: disconnect from mail.XXX.dyndns.org[192.168.50.140]
    Dec 5 00:12:40 mail postfix/smtpd[6547]: master_notify: status 1
    Dec 5 00:12:40 mail postfix/smtpd[6547]: connection closed
    Dec 5 00:12:40 mail postfix/smtpd[6547]: watchdog_stop: 0x819ae78
    Dec 5 00:12:40 mail postfix/smtpd[6547]: watchdog_start: 0x819ae78

    The procmail log:
    From XXX.dyndns.org*XXX.dyndns.org Sat Dec 5 00:04:42 2009
    Folder: /home/user2/Maildir/msg.CFHP 607
    procmail: [6553] Sat Dec 5 00:12:39 2009
    procmail: Assigning "TMP=/tmp"
    procmail: Assigning "PATH=/home/user2/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin"
    procmail: Assigning "LASTFOLDER=/home/user2/Maildir/msg.DFHP"
    procmail: Opening "/home/user2/Maildir/msg.DFHP"
    procmail: Acquiring kernel-lock
    procmail: Notified comsat: "user2*0:/home/user2/Maildir/msg.DFHP"
    From user1*XXX.dyndns.org Sat Dec 5 00:12:39 2009
    Folder: /home/user2/Maildir/msg.DFHP 583

    One of the message I have at his folder:

    cat msg.DFHP

    From user1*XXX.dyndns.org Sat Dec 5 00:12:39 2009
    Return-Path: <user1*XXX.dyndns.org>
    X-Original-To: user1*XXX.dyndns.org
    Delivered-To: user1*XXX.dyndns.org
    Received: from mail.XXX.dyndns.org (mail.XXX.dyndns.org [192.168.50.140])
    by mail.XXX.dyndns.org (Postfix) with SMTP id 6B6CC18FA01
    for <user1*XXX.dyndns.org>; Sat, 5 Dec 2009 00:12:17 -0800 (PST)
    Message-Id: <20091205081230.6B6CC18FA01*mail.XXX.dyndns.org>
    Date: Sat, 5 Dec 2009 00:12:17 -0800 (PST)
    From: user1*XXX.dyndns.org

    test.

    Why I cannot receive my test emails, did I forget something

    Using Centos 5.4 and all the from the repositories. Thanks.

  2. #2
    Just Joined!
    Join Date
    Nov 2009
    Posts
    6

    Thumbs up

    I had found the issue, the procmail command was my problem, thanks!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...