postfix lmtp permission problems

Latest response

Have to set up an email server.
Installed Postfix with Cyrus IMAP.
After configuration I ran a test email ( echo mail | mail -s test larcher )
I got the following messages in the maillog:
Oct 16 08:56:45 redriver01.ids4zos.net postfix/qmgr[862]: C518FBB7B: from=root@ids4zos.net, size=433, nrcpt=1 (queue active)
Oct 16 08:56:45 redriver01.ids4zos.net postfix/lmtp[2677]: C518FBB7B: to=larcher@ids4zos.net, orig_to=, relay=none, delay=504, delays=504/0.01/0.01/0, dsn=4.4.1, status=deferred (connect to redriver01.ids4zos.net[/var/lib/imap/socket/lmtp]: Permission denied)

While /var/lib have the owner and group as root
imap/socket/lmtp directories have cyrus as the owner and mail as the group.

[root@redriver01 imap]# ls -al total 8
drwxr-x---. 16 cyrus mail 4096 Sep 14 11:28 .
drwxr-xr-x. 61 cyrus mail 4096 Oct 16 03:33 ..
drwx------. 2 cyrus mail 6 Mar 20 2015 backup
drwx------. 2 cyrus mail 6 Mar 20 2015 db
drwx------. 2 cyrus mail 6 Mar 20 2015 log
drwx------. 2 cyrus mail 6 Mar 20 2015 md5
drwx------. 2 cyrus mail 6 Mar 20 2015 meta
drwx------. 2 cyrus mail 6 Mar 20 2015 msg
drwx------. 2 cyrus mail 6 Mar 20 2015 proc
drwx------. 2 cyrus mail 6 Mar 20 2015 ptclient
drwx------. 2 cyrus mail 6 Mar 20 2015 quota
drwx------. 2 cyrus mail 6 Mar 20 2015 rpm
drwx------. 2 cyrus mail 6 Mar 20 2015 sieve
drwxr-x---. 3 cyrus mail 17 Oct 15 11:08 socket
drwx------. 2 cyrus mail 6 Mar 20 2015 sync
drwx------. 2 cyrus mail 6 Mar 20 2015 user

[root@redriver01 imap]# cd socket
[root@redriver01 socket]# pwd
/var/lib/imap/socket
[root@redriver01 socket]# ls -al total 4
drwxr-x---. 3 cyrus mail 17 Oct 15 11:08 .
drwxr-x---. 16 cyrus mail 4096 Sep 14 11:28 ..
drwxr-xr-x. 2 cyrus mail 6 Oct 15 11:08 lmtp

from the id command
[root@redriver01 /]# id mail
uid=8(mail) gid=12(mail) groups=12(mail)
[root@redriver01 /]# id cyrus
uid=76(cyrus) gid=12(mail) groups=12(mail),76(saslauth)
[root@redriver01 /]# id postfix
uid=89(postfix) gid=89(postfix) groups=89(postfix),12(mail)

I tried chroot for lmtp in the postfix master.cf file, however that didn't work because then it could not find the /var/lib/imap/sockets/lmtp directory structure.
Any ideas and/or suggestions would be most appreciated

Cheers

Guy

Responses

Hello!

What howto did you used/followed to setup postfix with cyrus? Anyway, what is the output of

postconf local_transport

I believe it should be cyrus. (Don't forget to add/uncomment cyrus transport to master.cf)

Hello Anatoly thanks for your response.
This is the result of postconf local_transport:
[root@redriver01 ~]# postconf local_transport
local_transport = local:$myhostname
[root@redriver01 ~]
This per the Postfix documentation.
and cyrus transport is uncommented in master.cf

====================================================================

#

Cyrus 2.1.5 (Amos Gouaux)

Also specify in main.cf: cyrus_destination_recipient_limit=1

#
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#

====================================================================

Regarding "Howto's" I've gleaned some information off of the internet and re-reading the postfix and cyrus documentation.
However I solved the problem I did a chmod -R 777 for imap/socket/lmtp directories
That resolved the problem

Guy

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.