Problems with postfix vs IMAP / POP3

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

  1. MiniMe

    MiniMe 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 Howtoforge Staff

    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 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 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. MiniMe

    MiniMe Member


    thanks for your help !

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

    falko Super Moderator Howtoforge Staff

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

    MiniMe 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
  8. MiniMe

    MiniMe 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 !
     
  9. MiniMe

    MiniMe Member

  10. MiniMe

    MiniMe Member

  11. MiniMe

    MiniMe 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 ?
     
  12. falko

    falko Super Moderator Howtoforge Staff

    That sounds as if the account [email protected] doesn't exist. What's in /etc/postfix/main.cf?
     
  13. MiniMe

    MiniMe Member

    there is a lot there ...

    Do you want me to make the main.cf file avi via link ?

    If the account didnt exist, should i NOT be able to login ?
    I mean, i can perfectly login with the account ...

    Regards
     
  14. falko

    falko Super Moderator Howtoforge Staff

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

    MiniMe 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
    
     
  16. MiniMe

    MiniMe Member

    Falko, any news regarding the conf file i posted ?

    regards,
     
  17. falko

    falko Super Moderator Howtoforge Staff

  18. MiniMe

    MiniMe Member

    hi Falko

    thanks for your reply.

    I have followed those steps, but something does bother me ...

    I notice in SuSe 11, when you create a user with yast, it does not create a Maildir folder, but a Mail folder instead ....

    I manually created these folders for all users involved, but i was wondering, wat subfolders do they need ? ( i read there is a cur folder , which i already created )

    But i dunno if i miss any other subfolders ?

    Regards,
     
  19. falko

    falko Super Moderator Howtoforge Staff

    Maildir is created automatically when the first email for the user arrives.
     
  20. MiniMe

    MiniMe Member

    Thanks a million man, everything works like a sweet cake now ...

    But, i do have one final question remaining ( i also created another thread in some other forum )

    Is there a guide for suse on how to install the antispam & antivirus ?
    I have followed the debian one, but yast cant find those 3 tools used ... ( razor, pyzor and dcc-client )

    Regards,
     

Share This Page