LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-03-2006, 09:32 AM   #1
gnetcon
LQ Newbie
 
Registered: Jul 2006
Posts: 14

Rep: Reputation: 0
Question postfix dovecot mysql permissions issue


I'm again fairly new to linux administration, and I have a box where I'm trying to setup postfix/dovecot/mysql to handle email for virtual users, using MySQL to authenticate the users. I was modifying the following guide, as I have a Redhat FC 4 system:

http://bliki.rimuhosting.com/space/k...n+debian+sarge

I have dovecot communicating with the db (I believe), as when I restart dovecot, I see in the maillog:

Code:
dovecot-auth: MySQL: connected to 127.0.0.1
I have a virtual email box setup at:

/var/spool/postfix/virtual/username@domain.com

The perms are:

Code:
ls -l /var/spool/postfix/virtual/username@domain.com
total 16
drwx------  2 postfix postfix 4096 Aug  1 15:11 cur
-rw-------  1 postfix postfix   62 Aug  1 15:32 maildirsize
drwx------  2 postfix postfix 4096 Aug  1 15:32 new
drwx------  2 postfix postfix 4096 Aug  1 15:32 tmp
When I try and send an email to the address, I get the following errors:

Code:
Aug  3 09:23:25 server042 postfix/virtual[18314]: D309B1B78047: to=<username@domain.com>, relay=virtual, delay=0, status=deferred (maildir delivery failed: create /var/spool/postfix/virtual/username@domain.com/tmp/1154615005.P18314.server042.xxx.com: Permission denied)
Aug  3 09:23:25 server042 postfix/virtual[18314]: warning: maildir access problem for UID/GID=12345/54321: create /var/spool/postfix/virtual/username@domain.com/tmp/1154615005.P18314.server042.xxx.com: Permission denied
Aug  3 09:23:25 server042 postfix/virtual[18314]: warning: perhaps you need to create the maildirs in advance
I see the UID/GID is 12345. I have my /etc/dovecot-mysql.conf set to use 89, as that is the UID in my /etc/passwd file.

I'm sure this is a simple fix, just struggling to get it right. If anyone needs any conf files or anything, please let me know.

Thanks in advance for any light you can shed on this.
 
Old 08-03-2006, 09:56 AM   #2
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
This doesn't look like a dovecot issue, it looks like a postfix issue. Are you certain that postfix is running under the "postfix" username? I know it sounds silly, but it's always wise to check. Also find out which user corresponds to UID 12345. It could be that postfix is trying to impersonate the user to deliver the mail.

In any case, the user should have rights to (and probably be the owner of, with postfix being the GID) their own mail spool file - otherwise they can't access their incoming mail!
 
Old 08-03-2006, 10:22 AM   #3
gnetcon
LQ Newbie
 
Registered: Jul 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for the feedback. When I do a "ps aux | grep postfix", I get:

Code:
root     18237  0.0  0.2   6596  1420 ?        Ss   09:16   0:00 /usr/libexec/postfix/master
postfix  18238  0.0  0.2   6620  1404 ?        S    09:16   0:00 pickup -l -t fifo -u
postfix  18240  0.0  0.2   6656  1472 ?        S    09:16   0:00 qmgr -l -t fifo -u
There is no user in /etc/passwd that uses either the UID of 12345 or the GID of 54321. I'm assuming this is an issue with my setup?

These users don't have physical access to the servers. My end goal is to have multiple domains, with multiple users, setup to just send and receive email through my server. They won't have physical telnet/ssh access to the box. So "joe@domain1.com" and "joe@domain2.com" are 2 different users.

Thanks again.
 
Old 08-03-2006, 10:40 AM   #4
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
Hmm. I've got dovecot/postfix configured at home so I'll have a look when I go home tonight and see if anything jumps out at me. You might have a look through the postfix and dovecot config files though and see if you can identify the source of the spurious 12345 and 54321.
 
Old 08-03-2006, 11:05 AM   #5
gnetcon
LQ Newbie
 
Registered: Jul 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Talking

Sweet!!! I found in the main.cf that it was set there for the UID of 12345 and the GID of 54321. I updated to 89 (to which postfix is assigned) and restarted postfix (and dovecot, just to be safe). I was then able to send the email successfully.

It also fixed my next problem, which was receiving the emails. I am now able to login via IMAP and receive the messages, too.

Thanks for the advice cdhgee. All is working well on that front.

Now onto my next problem, which is sendind email through this same server out. Connecting through IMAP and setting both my incoming and outgoing email server to the same server, I can check and read fine now. But when I send, I get:

Code:
Aug  3 11:08:19 server042 postfix/smtpd[19007]: NOQUEUE: reject: RCPT from c-71-200-120-33.xxx[xx.xxx.xxx.xx]: 550 <user@otherdomain.com>: Recipient address rejected: User unknown; from=<user@domain.com> to=<user@otherdomain.com> proto=ESMTP helo=<acerbox>
Any ideas where to look for this? Thanks again!

Last edited by gnetcon; 08-03-2006 at 11:14 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automated postfix and dovecot with mysql installation webserverdude General 0 06-26-2006 04:10 PM
ISPConfig, postfix, dovecot: incorrect permissions keyF Linux - Software 0 06-13-2006 10:01 AM
imap pop 3 issue with postfix and dovecot on fc2 hush Fedora 0 10-30-2004 12:19 PM
mysql, postfix, dovecot & spamassassin dadams Fedora 1 10-18-2004 08:40 PM


All times are GMT -5. The time now is 04:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration