Problems with postfix vs IMAP / POP3

Discussion in 'Server Operation' started by MiniMe, Oct 21, 2008.

  1. MiniMe

    MiniMe New Member

    Hi All,

    ihave found the following howto page : http://www.howtoforge.net/perfect-server-opensuse11

    I have followed this howto for installing my own mailserver system.

    However, i cannot login via POP3 to my mailbox.

    I use the defailt mailbox delivery method ( so /var/mail/user ).

    My question to you is: How do i now add a mailuser ?

    In my mail client i get the following errors :

    Account: 'mail.evil-hannie.eu', Server: 'mail.evil-hannie.eu', Protocol: POP3, Response from server: '-ERR chdir Maildir failed', Port: 995, Secured(SSL): Yes, Servererror: 0x800CCC90, Errornumber: 0x800CCC92

    The server has closed the connection unexpectedly. Possible causes could be problems with the server, network issues or long inactivity. Account: 'mail.evil-hannie.eu', Server: 'mail.evil-hannie.eu', Protocol: POP3, Port: 995, Secured(SSL): Yes, Errornumber: 0x800CCC0F

    If you can, please point me in the right direction, i would appreciate it a lot !
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You must configure Postfix to deliver mails to Maildir because your POP3/IMAP daemon is using Maildir:

    Code:
    postconf -e 'home_mailbox = Maildir/'
    postconf -e 'mailbox_command ='
    /etc/init.d/postfix restart
     
  3. MiniMe

    MiniMe New Member

    Hey, thanks for your help.

    I will try this right now.

    But if i change it like that, does a shell user have to have a Mail dir or what directory should a shell user have, in order to be able to sent / receive emails ?
     
  4. MiniMe

    MiniMe New Member

    PS a small bit out of the mail logs :

    Code:
    Oct 16 18:08:20 openSUSE-110-64-minimal postfix/bounce[10556]: 74DECAEC660: sender non-delivery notification: 88D1FAEC661
    Oct 16 18:08:20 openSUSE-110-64-minimal postfix/qmgr[7740]: 74DECAEC660: removed
    Oct 16 18:08:20 openSUSE-110-64-minimal postfix/smtp[10550]: 88D1FAEC661: to=<[email protected]>, relay=none, delay=0.03, delays=0.03/0/0/0, dsn=5.4.6, status=bounced (mail f$
    Oct 16 18:08:20 openSUSE-110-64-minimal postfix/qmgr[7740]: 88D1FAEC661: removed
    Oct 16 18:09:35 openSUSE-110-64-minimal imapd: Connection, ip=[::ffff:213.133.113.83]
    Oct 16 18:09:35 openSUSE-110-64-minimal pop3d: Connection, ip=[::ffff:213.133.113.83]
    Oct 16 18:09:35 openSUSE-110-64-minimal imapd: Connection, ip=[::ffff:213.133.113.83]
    Oct 16 18:09:35 openSUSE-110-64-minimal pop3d: Connection, ip=[::ffff:213.133.113.83]
    Oct 16 18:09:35 openSUSE-110-64-minimal postfix/smtpd[10571]: connect from worker1.sysmon.hetzner.de[213.133.113.83]
    Oct 16 18:09:36 openSUSE-110-64-minimal pop3d: chdir Maildir: No such file or directory
    Oct 16 18:09:36 openSUSE-110-64-minimal imapd: chdir Maildir: No such file or directory
    Oct 16 18:09:36 openSUSE-110-64-minimal pop3d: chdir Maildir: No such file or directory
    Oct 16 18:09:36 openSUSE-110-64-minimal imapd: chdir Maildir: No such file or directory
    
    
    Update : I can send emails from within the shell ( as root for instance ) to any external mailaddress, but i cannot send mail back ...
     
    Last edited: Oct 23, 2008
  5. marpada

    marpada New Member

    You are not using virtual users (that is, users created in a MySQL table) but system users, so you have to create them using useradd.

    Home directory shoud be /home/$USER. Profile settings set variable MAIL to /var/mail/$USER (check /etc/profile)
    ________
    Bondage Porn
    ________
    BMW F800S HISTORY
     
    Last edited: May 13, 2011
  6. MiniMe

    MiniMe New Member


    thanks for your help !

    How do i use virtual users then ? it would indeed be easier then using system users :p
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Can you post the full line? Are there any other errors in your mail log?
     
  8. MiniMe

    MiniMe New Member

    Falko, i bet there are other errors yes, i will post them shortly, give me 2 minutes ! ( i'll update this post in 2 minutes )

    Update, last 50 lines of /var/log/mail can be found here : http://www1.evil-hannie.eu/mail.log
     
    Last edited: Oct 23, 2008
  9. marpada

    marpada New Member

    Check other guides in this site (in fact I though all falko's guides were using virtual users :) )

    Keep in mind virtual users are only for mail, those users won't work for ftp or other services.
    ________
    Body Science
    ________
    Kitchen Measures
     
    Last edited: May 13, 2011
  10. MiniMe

    MiniMe New Member

    Thanks, thats no prob, buut is that guide also available in the Suse 11 section ? I dont remember it was in the actual server setup guide :(

    I'll look for it though, thx !
     
  11. marpada

    marpada New Member

    Not for SuSE but you may take a look to the CentOS guide, I don't think you have problem doing it in SuSE.
    ________
    GRANNY OLD
    ________
    PrettySonya
     
    Last edited: May 13, 2011
  12. MiniMe

    MiniMe New Member

  13. marpada

    marpada New Member

  14. MiniMe

    MiniMe New Member

  15. MiniMe

    MiniMe New Member

    Dear Falko,

    i have managed to be able to login to my email accounts from within my mail client.

    On the shell side, i can also send emails from these 2 users to the outside ( hotmail and telenet )

    But i still cannot send mail back to those accounts. I keep on getting this :

    Code:
    Oct 23 23:51:29 openSUSE-110-64-minimal postfix/smtpd[19281]: connect from harold.telenet-ops.be[195.130.133.65]
    Oct 23 23:51:29 openSUSE-110-64-minimal postfix/smtpd[19281]: NOQUEUE: reject: RCPT from harold.telenet-ops.be[195.130.133.65]: 554 5.7.1 <[email protected]>: Recipient address rejected: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<harold.telenet-ops.be>
    Oct 23 23:51:29 openSUSE-110-64-minimal postfix/smtpd[19281]: disconnect from harold.telenet-ops.be[195.130.133.65]
    
    Any idea whats going wrong ?
     
  16. falko

    falko Super Moderator ISPConfig Developer

  17. MiniMe

    MiniMe New Member

  18. falko

    falko Super Moderator ISPConfig Developer

    Please post the contents of main.cf here (please strip out the comments).
     
  19. MiniMe

    MiniMe New Member

    Its quiet a lot but here goes :

    Code:
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/lib/postfix
    data_directory = /var/lib/postfix
    mail_owner = postfix
    myhostname = mail.evil-hannie.eu
    mydomain = evil-hannie.eu
    myorigin = $mydomain
    inet_interfaces = all
    mydestination = $myhostname, localhost.$mydomain, localhost
    unknown_local_recipient_reject_code = 550
    relay_domains = $mydestination
    home_mailbox = Maildir/
    debug_peer_level = 2
    debugger_command =
    	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    	 ddd $daemon_directory/$process_name $process_id & sleep 5
    sendmail_path = /usr/sbin/sendmail
    newaliases_path = /usr/bin/newaliases
    mailq_path = /usr/bin/mailq
    setgid_group = maildrop
    html_directory = /usr/share/doc/packages/postfix/html
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/packages/postfix/samples
    readme_directory = /usr/share/doc/packages/postfix/README_FILES
    inet_protocols = all
    biff = no
    mail_spool_directory = /var/mail
    canonical_maps = hash:/etc/postfix/canonical
    relocated_maps = hash:/etc/postfix/relocated
    transport_maps = hash:/etc/postfix/transport
    sender_canonical_maps = hash:/etc/postfix/sender_canonical
    masquerade_exceptions = root
    masquerade_classes = envelope_sender, header_sender, header_recipient
    myhostname = mail
    program_directory = /usr/lib/postfix
    inet_interfaces = 78.46.206.197
    masquerade_domains = 
    mydestination = $myhostname, localhost.$mydomain, localhost
    defer_transports = 
    mynetworks = 127.0.0.0/8
    mynetworks_style = subnet
    mailbox_command =
    disable_dns_lookups = no
    relayhost =  
    mailbox_transport = 
    strict_8bitmime = no
    disable_mime_output_conversion = no
    smtpd_sender_restrictions = 
    #hash:/etc/postfix/access
    smtpd_client_restrictions = 
    smtpd_helo_required = no
    smtpd_helo_restrictions = 
    strict_rfc821_envelopes = no
    #smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
    smtp_sasl_auth_enable = no
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtdp_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
    #smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_sasl_local_domain =
    smtpd_use_tls = yes
    smtp_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
    alias_maps = hash:/etc/aliases
    mailbox_size_limit = 0
    message_size_limit = 10240000
    
     
  20. MiniMe

    MiniMe New Member

    Falko, any news regarding the conf file i posted ?

    regards,
     

Share This Page