Re: [Dovecot] pop3 exim4 dovecot
On Fri, November 9, 2012 1:10 am, Odhiambo Washington wrote:
On Thu, Nov 8, 2012 at 5:03 PM, Patrick Shirkey <pshirkey@boosthardware.com>wrote:
On Fri, November 9, 2012 12:13 am, Odhiambo Washington wrote:
On Thu, Nov 8, 2012 at 11:36 AM, Patrick Shirkey <pshirkey@boosthardware.com
wrote:
On Thu, November 8, 2012 7:21 pm, Robert Schetterer wrote:
Am 08.11.2012 08:48, schrieb Patrick Shirkey:
Hi,
I have an exim4 and dovecot system. The system has multiple
accounts.
Exim4 is receiving emails in the /var/mail/user files and dovecot is configured to use /home/user/mail (mbox) folder.
I have one account that dovecot is not processing replies/bounces/etc... The data is being written in the /var/mail/user file by exim4 but as far as dovecot is aware there is nothing in the pop3 inbox.
Can anyone suggest how I can enable dovecot to know that the data is in the /var/mail/user file and deliver it to the pop3 inbox for this account?
-- Patrick Shirkey Boost Hardware Ltd
show logs and config like doveconf -n
There is nothing in the dovecot logs afaict
echo "my test" | mail -s "test message" test@xxx
2012-11-08 08:34:38 1TWNZO-0000TG-8s <= root@xxx U=root P=local S=398 2012-11-08 08:34:38 1TWNZO-0000TG-8s => xxx <test@xxx> R=local_user T=mail_spool 2012-11-08 08:34:38 1TWNZO-0000TG-8s Completed
exim -bt test@xxx R: system_aliases for xxx@localhost R: userforward for xxx@localhost R: procmail for xxx@localhost R: maildrop for xxx@localhost R: lowuid_aliases for xxx@localhost (UID 1238) R: local_user for xxx@localhost xxx@localhost <-- test@xxx router = local_user, transport = mail_spool
- Here's the dovecot config:
dovecot -n
1.2.15: /etc/dovecot/dovecot.conf
OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.6
log_timestamp: %Y-%m-%d %H:%M:%S protocols: pop3 pop3s listen: 127.0.0.1 login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/pop3-login mail_privileged_group: mail mail_location: mbox:~/mail mail_debug: yes mbox_write_locks: fcntl dotlock mail_executable: /usr/lib/dovecot/pop3 mail_plugin_dir: /usr/lib/dovecot/modules/pop3 auth default: debug: yes passdb: driver: pam userdb: driver: passwd
You are telling dovecot that mails are in mbox format (why you even use mbox instead of Maildir++ beats me, but that's not what you asked for help with) and are stored in /home/$user/mbox so go ahead at also tell Exim to deliver to the same location! If you want Exim to deliver to /var/mail/$user then change your mail_location in dovecot.conf to point to this too.
Thanks for your advice. I inherited this system and it is a live B2B system so I am trying not to break it as well as to keep it running :-)
I have seen some unusual behaviour now.
1: According to my script to process the inbox for each account the pop3 account was empty. The code was previously working for many months. I thought it might be related to the missing mail_location directive because the home/xxx/mail folder was missing for the specific account that was having a problem so I added it as above but it didn't appear to fix the problem.
You DO NOT need to add it manually. All you have to do is to send a test mail to the user and the mbox will be created with the correct permissions.
2: I modified it as suggested : mail_location = INBOX=/var/mail/%u
That gave me an error
Nov 8 13:47:03 mail dovecot: POP3(xxx): mail_location: Ambiguous mail location setting, don't know what to do with it: INBOX=/var/mail/xxx (try prefixing it with mbox: or maildir:) Nov 8 13:47:03 mail dovecot: POP3(xxx): Fatal: Namespace initialization failed
You must RTFM. The examples are in conf.d/10-mail.conf and they have the following text:
<quote>
Mailbox locations and namespaces
Location for users' mailboxes. The default is empty, which means that
Dovecot
tries to find the mailboxes automatically. This won't work if the user
doesn't yet have any mail, so you should explicitly tell Dovecot the
full
location.
If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
isn't enough. You'll also need to tell Dovecot where the other mailboxes
are
kept. This is called the "root mail directory", and it must be the first
path given in the mail_location setting.
There are a few special variables you can use, eg.:
%u - username
%n - user part in user@domain, same as %u if there's no domain
%d - domain part in user@domain, empty if there's no domain
%h - home directory
See doc/wiki/Variables.txt for full list. Some examples:
mail_location = maildir:~/Maildir
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
<doc/wiki/MailLocation.txt>
</quote>
... make sense?
Starting to now.
My first attempt to *not* break the existing system was to try with the following:
mail_location = mbox:~/mail
But that didn't work so I asked here and according to your first email it seemed this config was necessary:
mail_location = INBOX=/var/mail/%u
But after re reading the docs it appears that *both* locations are required:
mail_location = mbox:~/mail:INBOX=/var/mail/%u
-- Patrick Shirkey Boost Hardware Ltd
On Fri, 9 Nov 2012 01:39:55 +1100 (EST) Patrick Shirkey articulated:
My first attempt to *not* break the existing system was to try with the following:
mail_location = mbox:~/mail
But that didn't work so I asked here and according to your first email it seemed this config was necessary:
mail_location = INBOX=/var/mail/%u
But after re reading the docs it appears that *both* locations are required:
mail_location = mbox:~/mail:INBOX=/var/mail/%u
Seriously, how much effort does it actually take to trim the excess garbage off of a post before replying to it? Personally, once I have to page through four pages of old nonsense I totally lose interest in the thread.
-- Jerry ♔
Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header.
participants (2)
-
Jerry
-
Patrick Shirkey