Problem on email server using postfix and dovecot

Discussion in 'HOWTO-Related Questions' started by beautiful, Mar 21, 2007.

  1. beautiful

    beautiful New Member

    I have followed tutorial from fedora core 5 (64bit) perfect setup. For webmail, i used squirrelmail. But, when [email protected] sending email to user2mydomain.org, was failed. No email in the inbox. What's going wrong ?? thx guys
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Did you enable Maildir in ISPConfig?
    What's in the mail log when you send a mail?
    Did you disable SELinux?
     
  3. beautiful

    beautiful New Member

    I don't install ispconfig, and my SELinux was off.
    These from my "/var/log/maillog"

    [root@server log]# cat /var/log/maillog
    Mar 23 14:11:36 server postfix/postfix-script: stopping the Postfix mail system
    Mar 23 14:11:36 server postfix/master[1568]: terminating on signal 15
    Mar 23 14:11:36 server sendmail-1586: Invoked by user 'root' uid '0'
    Mar 23 14:11:42 server sendmail-1586: Transaction aborted: no recipients specified
    Mar 23 14:11:44 server postfix/postfix-script: starting the Postfix mail system
    Mar 23 14:11:44 server postfix/master[1632]: daemon started -- version 2.2.8, configuration /etc/postfix
    Mar 23 14:12:50 server dovecot: Killed with signal 15
    Mar 23 14:12:50 server dovecot: Dovecot v1.0.beta2 starting up
    Mar 23 14:14:01 server dovecot: imap-login: Login: user=<guest>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
    Mar 23 14:14:23 server last message repeated 6 times
    Mar 23 14:14:56 server sendmail-1686: Invoked by user 'apache' uid '48'
    Mar 23 14:14:56 server sendmail-1686: Email enqueued: id 3672C7 size 656 uid 48 user apache from guest@localhost rcpts(1) [email protected]
    Mar 23 14:14:57 server dovecot: imap-login: Login: user=<guest>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
    Mar 23 14:15:00 server last message repeated 2 times
    Mar 23 14:15:18 server dovecot: imap-login: Login: user=<guest2>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
     
  4. falko

    falko Super Moderator Howtoforge Staff

    I don't see any errors in the log.
    What's the output of
    Code:
    netstat -tap
    , and what's in /etc/postfix/main.cf (please strip out the comments)?
     
  5. beautiful

    beautiful New Member

    Code:
    [root@server ~]# 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.localdomain:55555 *:*                         LISTEN      1232/avgscan
    tcp        0      0 *:swat                      *:*                         LISTEN      1182/xinetd
    tcp        0      0 *:mysql                     *:*                         LISTEN      1328/mysqld
    tcp        0      0 *:sunrpc                    *:*                         LISTEN      1119/portmap
    tcp        0      0 server.semesta.edu:domain   *:*                         LISTEN      1077/named
    tcp        0      0 localhost.localdomai:domain *:*                         LISTEN      1077/named
    tcp        0      0 *:smtp                      *:*                         LISTEN      1456/master
    tcp        0      0 localhost.localdomain:rndc  *:*                         LISTEN      1077/named
    tcp        0      0 *:imaps                     *:*                         LISTEN      1471/dovecot
    tcp        0      0 *:pop3s                     *:*                         LISTEN      1471/dovecot
    tcp        0      0 *:pop3                      *:*                         LISTEN      1471/dovecot
    tcp        0      0 *:imap                      *:*                         LISTEN      1471/dovecot
    tcp        0      0 *:http                      *:*                         LISTEN      1492/httpd
    tcp        0      0 *:ssh                       *:*                         LISTEN      1173/sshd
    tcp        0      0 *:https                     *:*                         LISTEN      1492/httpd
    tcp        0      0 server.semesta.edu:http     ::ffff:192.168.0.5:obrpd    TIME_WAIT   -
    tcp        0      0 server.semesta.edu:http     ::ffff:192.168.0.5:proofd   TIME_WAIT   -
    tcp        0      0 server.semesta.edu:http     ::ffff:192.168.0.5:rootd    TIME_WAIT   -
    tcp        0      0 server.semesta.edu:http     ::ffff:192.168.0.5:nicelink TIME_WAIT   -
    tcp        0    148 server.semesta.edu:ssh      ::ffff:192.168.0.5:netarx   ESTABLISHED 1370/0
    tcp        0      0 localhost.localdomain:imap  localhost.localdomain:39195 TIME_WAIT   -
    tcp        0      0 localhost.localdomain:imap  localhost.localdomain:39196 TIME_WAIT   -
    tcp        0      0 localhost.localdomain:imap  localhost.localdomain:39197 TIME_WAIT   -
    my postfix configuration...

    Code:
    /etc/postfix/main.cf
    
    [root@server ~]# cat /etc/postfix/main.cf
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix
    inet_interfaces = all
    mydestination = $myhostname, localhost.$mydomain, localhost
    unknown_local_recipient_reject_code = 550
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    
    debug_peer_level = 2
    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.2.8/samples
    readme_directory = /usr/share/doc/postfix-2.2.8/README_FILES
    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
    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
    home_mailbox = Maildir/
    mailbox_command =
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. I was thinking that
    Code:
    home_mailbox = Maildir/
    was missing, but it's there.

    Please run
    Code:
    tail -f /var/log/maillog
    and send a mail from [email protected] to [email protected]. What do you see in the mail log then?
     
  7. beautiful

    beautiful New Member

    "/var/log/maillog"

    Code:
    Mar 28 23:13:54 server dovecot: Dovecot v1.0.beta2 starting up
    Mar 28 23:13:54 server dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while..
    Mar 28 23:13:55 server sendmail-1397: Invoked by user 'root' uid '0'
    Mar 28 23:14:35 server dovecot: SSL parameters regeneration completed
    Mar 28 23:16:00 server sendmail-1442: Invoked by user 'root' uid '0'
    Mar 28 23:16:15 server sendmail-1442: Transaction aborted: no recipients specified
    Mar 28 23:16:17 server postfix/postfix-script: starting the Postfix mail system
    Mar 28 23:16:17 server postfix/master[1488]: daemon started -- version 2.2.8, configuration /etc/postfix
    
    After sending 2 emails from [email protected] to [email protected]

    Code:
    Mar 28 23:18:38 server dovecot: imap-login: Aborted login: user=<guest>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
    Mar 28 23:18:46 server dovecot: imap-login: Login: user=<guest>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
    Mar 28 23:18:53 server last message repeated 4 times
    Mar 28 23:19:19 server sendmail-1539: Invoked by user 'apache' uid '48'
    Mar 28 23:19:19 server sendmail-1539: Email enqueued: id 24FBAC size 658 uid 48 user apache from guest@localhost rcpts(1) [email protected]
    Mar 28 23:19:19 server dovecot: imap-login: Login: user=<guest>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
    Mar 28 23:19:27 server last message repeated 2 times
    Mar 28 23:21:21 server sendmail-1556: Invoked by user 'apache' uid '48'
    Mar 28 23:21:21 server sendmail-1556: Email enqueued: id 16052E size 649 uid 48 user apache from guest@localhost rcpts(1) guest2@localhost
    Mar 28 23:21:21 server dovecot: imap-login: Login: user=<guest>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
    Mar 28 23:21:28 server last message repeated 3 times
    Mar 28 23:23:14 server dovecot: imap-login: Login: user=<guest2>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
    
    In the /home/guest/mail/

    Code:
    [root@server mail]# cat Sent
    From MAILER_DAEMON  Wed Mar 21 07:15:18 2007
    Date: Wed, 21 Mar 2007 07:15:18 +0700
    From: Mail System Internal Data <[email protected]>
    Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
    Message-ID: <[email protected]>
    X-IMAP: 1174413518 0000000008
    Status: RO
    
    This text is part of the internal format of your mail folder, and is not
    a real message.  It is created automatically by the mail system software.
    If deleted, important folder data will be lost, and it will be re-created
    with the data reset to initial values.
    
    From [email protected]  Wed Mar 28 23:19:19 2007
    Received: from 192.168.0.5
            (SquirrelMail authenticated user guest)
            by www.semesta.edu with HTTP;
            Wed, 28 Mar 2007 23:19:19 +0700 (WIT)
    Message-ID: <[email protected]>
    Date: Wed, 28 Mar 2007 23:19:19 +0700 (WIT)
    Subject: test
    From: guest@localhost
    To: [email protected]
    User-Agent: SquirrelMail/1.4.6-3.fc5
    MIME-Version: 1.0
    Content-Type: text/plain;charset=iso-8859-1
    Content-Transfer-Encoding: 8bit
    X-Priority: 3 (Normal)
    Importance: Normal
    X-UID: 7
    Status: RO
    X-Keywords:
    Content-Length: 14
    
    isi dari test
    
    From [email protected]  Wed Mar 28 23:21:21 2007
    Received: from 192.168.0.5
            (SquirrelMail authenticated user guest)
            by www.semesta.edu with HTTP;
            Wed, 28 Mar 2007 23:21:21 +0700 (WIT)
    Message-ID: <[email protected]>
    Date: Wed, 28 Mar 2007 23:21:21 +0700 (WIT)
    Subject: test2
    From: guest@localhost
    To: guest2@localhost
    User-Agent: SquirrelMail/1.4.6-3.fc5
    MIME-Version: 1.0
    Content-Type: text/plain;charset=iso-8859-1
    Content-Transfer-Encoding: 8bit
    X-Priority: 3 (Normal)
    Importance: Normal
    X-UID: 8
    Status: RO
    X-Keywords:
    Content-Length: 6
    
    test2
    But, my /home/guest2/mail/Inbox empty. :confused:
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Is there a .procmailrc or .forward file in guest2's homedir? Is guest2 listed in /etc/aliases?
     
  9. beautiful

    beautiful New Member

    I cannot found .procmailrc/.forward file in guest/guest2 homedir. I try to add /etc/aliases, with

    Code:
    guest:     guest
    guest2:    guest2
    
    But, still doesn't work.
     
  10. beautiful

    beautiful New Member

    I have reinstalled my computer yesterday, and configured just liked "Fedora core 5 perfect setup". Then i try to send some emails from [email protected] to [email protected] or vice versa, and everything is OK.

    There are 2 folders in guest/guest2 homedir, "mail" and "Maildir". I missed folder "Maildir" in the past system. Maybe, it causes by axigen. I installed axigen, then i try to send email using postfix, and failed. Maybe axigen change the email system.

    Btw, thx for your help falko
     
  11. falko

    falko Super Moderator Howtoforge Staff

    I don't know how Axigen works, so I can't tell how it changes your system.
     

Share This Page