View Full Version : Can't receive emails via POP3
ajw_doc
30th June 2008, 12:08
Hi,
Can't receive emails via POP3. I'm running Dovecot, Maildir is checked. IMAP accounts on the same domain are fine but pop3 isn't. Mail is delivered but can't be downloaded.
Last log entry for pop3 connection:
Jun 30 11:06:34 server1 dovecot: pop3-login: Login: user=<name.domain.org>, method=PLAIN, rip=::ffff:xx.xx.xxx.xxx, lip=::ffff:xx.xx.xxx.xxx
Jun 30 11:06:34 server1 dovecot: POP3(name.domain.org): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
To be on safe side I delete user and recreated them but still no joy.
Any ideas?
Thanks
AJ
till
30th June 2008, 12:56
And the login with the exact same username with IMAP works?
ajw_doc
30th June 2008, 13:09
Hi,
IMAP is the same for this account. Can connect fine and with no errors in mail log but no email downloads. There are two in new at the moment so they are getting delivered.
ajw_doc
30th June 2008, 13:28
I think I might have worked out the problem.
For other domains everything is under /home/domain/user/userid/Maildir/
but for this one it seems to create a new user thus: /home/domain/user/userid/user/userid/Maildir
The email is being delivered to /home/domain/user/userid/Maildir/new as it should be but it's connecting to the above extra directory which has nothing in. I'm not sure why this is as the other two accounts on that domain are set up properly as are the accounts on other domains.
[edit]
I've tried adding a brand new user - this is set up correctly but still can't receive email via POP or IMAP :confused:
till
30th June 2008, 13:41
Ok, I guess you dont use ISPConfig, as ISPConfig never uses these directories? I will move your post to a general forum.
ajw_doc
30th June 2008, 13:50
Ok, I guess you dont use ISPConfig, as ISPConfig never uses these directories? I will move your post to a general forum.
Yes I do use ISpconfig hence posting in the ispconfig section so can you move it back please? The only thing that has been changed is the dovecot mail location as it was wrong. and the location of the domain directories as I have them on a second drive mounted to home.
till
30th June 2008, 14:01
Ok. Please post the content of the main.cf file, comments stripped.
ajw_doc
30th June 2008, 14:02
Will do. As an aside I've completely removed the domain, emptied recylce bin and re added everything. Same thing happens but only to the same account. It's very odd!
ajw_doc
30th June 2008, 14:09
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/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
ddd $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.5.1/samples
readme_directory = /usr/share/doc/postfix-2.5.1/README_FILES
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
mynetworks = 127.0.0.0/8
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
myhostname = server1.domain.co.uk
home_mailbox = Maildir/
mailbox_command =
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
I followed this setup http://howtoforge.com/perfect-server-fedora9
ajw_doc
30th June 2008, 14:24
I've worked out what the problem is - but I don't know the solution to it :)
It so happens that all other accounts on the server are admin accounts - these all work fine. I've just tried adding a normal account to another domain and get the same problem - it creates the Maildir in an extra user folder within the username folder.
Is this because I have the mail location in dovecot.conf set as:
mail_location = maildir:~/user/%u/Maildir
However, if this is the problem what is the correct path as that is the only thing that works for all my other (admin) email accounts?
ajw_doc
30th June 2008, 16:05
It's definitely dovecot and the path to the mail_location.
If I change it to:
mail_location = maildir:~/Maildir
the normal user accounts work fine but the admin accounts don't work.
Error with admin is "No such file or directory" when trying to create the cur under Maildir. The admin accounts have a Maildir directory under home but when I ssh in as an admin user I can't cd into it. I'll continue to work on trying to fathom that bit out but if anyone has any ideas let me know!
Adam
ajw_doc
30th June 2008, 16:38
Email accounts work if you untick the Administrator option under User & Email - so really not sure what is going on. Odd that when you make a user an administrator it goes wrong. I can cope with it like this for now but not for ever.
AJ
ajw_doc
30th June 2008, 23:29
This is actually causing me a really big problem now. I can't run sites as they run as the admin user not apache and if admin is on for a user I can't access email.
Can anyone help with this as it seems to me to be something ISPconfig does when the administrator box is ticked.
ajw_doc
30th June 2008, 23:54
Could it be a symlink permissions thing? This is where it seems to stumble. As a user it is already in the user home directory so goes straight to the proper Maildir. When an admin user it logs into the site root so the Maildir is a symlink - it is this bit it falls down on. As far as I can see permissions are ok though.
Could it be a symlink permissions thing? This is where it seems to stumble. As a user it is already in the user home directory so goes straight to the proper Maildir. When an admin user it logs into the site root so the Maildir is a symlink - it is this bit it falls down on. As far as I can see permissions are ok though.
Thats all fine. The admin user has always these symlinks. Please run the command "ls -la" in the website root directory and post the output.
ajw_doc
1st July 2008, 09:17
Hi Till,
I managed to get it working (at least temporarily) by deleting the symlink and then re creating it. Why that has worked I can't tell you, but the two user's I tested it on had previously been deleted off the system and recreated and still didn't work.
Current output of ls-al is:
lrwxrwxrwx 1 root root 33 2008-06-30 23:02 Maildir -> user/name.domain.com/Maildir
So I checked another domain where I haven't recreated the symlink and here's the problem. The ISPconfig generated symlink is
lrwxrwxrwx 1 root root 46 2008-06-30 16:23 Maildir -> /home/web7/user/user.domain.com/Maildir
Obviously the admin user has issues accessing the domain like that so can I edit any of the ISPconfig files to change how it creates a symlink? Or is there something else that I can do?
Thanks,
AJ
ajw_doc
2nd July 2008, 23:05
BUMP... anyone?
ajw_doc
3rd July 2008, 09:24
Sorry for the bumb but the symlink gets overwritten with a non working one everytime I make a change in ISPconfig. Can someone confirm either that it's or bug or which file to edit within ISPconfig to change the way it writes it? Please!
falko
3rd July 2008, 17:24
It's not a bug.
You'd have to modify /root/ispconfig/scripts/lib/config.lib.php.
ajw_doc
3rd July 2008, 17:26
Cool I'll take a look.
If it isn't a bug what could the problem be? Permissions on the home directory?
ajw_doc
9th July 2008, 23:16
Hi Falko - can you direct me to roughly the right part of the file? I can't see any reference to Maildir in it.
Thanks,
AJ
falko
10th July 2008, 15:17
I think it's in the function make_docroot().
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.