LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-05-2013, 06:31 PM   #1
FortressMvelez
Member
 
Registered: May 2013
Location: Bronx, New York
Posts: 40

Rep: Reputation: Disabled
Configure Postfix & Dovecot to NOT use system users.


Hello,

I have a dev server and I have httpd, mysql, php, phpmyadmin, dovecot and postfix installed and working.

Right now, it is set up to use system users for email addresses so when I log into roundcube I just put the user name and the password for that user to log in.

I want to set it up so I can have the user names and passwords in a file or files somewhere on the server so it does NOT use the system users to log into their e-mail accounts. Hopefully, this also enabled them to log into their email accounts using their FULL e-mail address and the password for that e-mail address.

Thank you in advance for any and all help. Also, I am running CentOS 6.4 64-bit.
 
Old 08-05-2013, 11:15 PM   #2
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 80
If I am getting you question correctly, you do not want to use system account to be used by postfix, but for every user a different email address and password. is this you are talking about?

Getting separate email accounts than system users can be done using /etc/postfix/vmail file and authentication can be achieved via "sasl", although I suspect how getting user login with username password can be done.
 
Old 08-13-2013, 08:49 PM   #3
FortressMvelez
Member
 
Registered: May 2013
Location: Bronx, New York
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hello,

Yes this is correct as in what I need. But what do I have to edit or add or change? I am very new to this. Thank you so much for the help!
 
Old 08-20-2013, 03:09 PM   #4
FortressMvelez
Member
 
Registered: May 2013
Location: Bronx, New York
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hello,

I have made the changes in that file but nothing has changed. I restarted both Postfix and Dovecot after the changes. Is there anything else that I need to edit or change to make this work?

Thank you!
 
Old 08-20-2013, 09:29 PM   #5
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 80
Sorry to see this thread late! Can you post the output of teh file entries what you made and where ?
 
Old 08-20-2013, 11:08 PM   #6
FortressMvelez
Member
 
Registered: May 2013
Location: Bronx, New York
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hello,

Didn't want to make this a mile long so I posted the config files in paste bin and below are the links:

main.cf (Postfix) - http://pastebin.com/sU522xV6

vhosts - http://pastebin.com/RvLPKmnv

vmailbox - http://pastebin.com/XFiKpCLB

vmaps - http://pastebin.com/dHqUxYJQ

dovecot.conf - http://pastebin.com/xwQQ7mZD

I think these are all the files I've edited but I've been reading so many howtos on this I don't know what is what anymore lol

I've also tried this and nothing:

http://www.postfix.org/VIRTUAL_README.html#canonical

Last edited by FortressMvelez; 08-20-2013 at 11:09 PM.
 
Old 08-21-2013, 12:42 AM   #7
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 80
Aaah looks like some steps are probably missing or not executed correctly:

see this one it could help more precisely:
https://help.ubuntu.com/community/Po...xClamSmtpHowto
 
Old 08-24-2013, 09:17 PM   #8
FortressMvelez
Member
 
Registered: May 2013
Location: Bronx, New York
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hello,

So I followed what you sent me and I sent a test mail from my google account to one of the mail accounts I sent up on the server and I get the following error:

Quote:
Aug 24 21:15:01 server postfix/smtpd[7431]: connect from mail-ob0-f171.google.com[209.85.214.171]
Aug 24 21:15:01 server postfix/smtpd[7431]: 7DC7468786: client=mail-ob0-f171.google.com[209.85.214.171]
Aug 24 21:15:01 server postfix/cleanup[7394]: 7DC7468786: message-id=<CAGFr1YMOgKMm6kYYQqiZqxUA=wxfDTj5eJhgABNsw5g8qGoqxA@mail.gmail.com>
Aug 24 21:15:01 server postfix/qmgr[9875]: 7DC7468786: from=<manuelvelez83@gmail.com>, size=2120, nrcpt=1 (queue active)
Aug 24 21:15:01 server postfix/virtual[7436]: warning: maildir access problem for UID/GID=5000/5000: create maildir file /home/vmail/aevtech.com/support/tmp/1377393301.P7436.server.aevtech.com: Permission denied
Aug 24 21:15:01 server postfix/virtual[7436]: warning: perhaps you need to create the maildirs in advance
Aug 24 21:15:01 server postfix/virtual[7436]: 7DC7468786: to=<support@aevtech.com>, relay=virtual, delay=0.16, delays=0.14/0.01/0/0.01, dsn=4.2.0, status=deferred (maildir delivery failed: create maildir file /home/vmail/aevtech.com/support/tmp/1377393301.P7436.server.aevtech.com: Permission denied)
Aug 24 21:15:01 server postfix/smtpd[7431]: disconnect from mail-ob0-f171.google.com[209.85.214.171]
I checked the permissions and even disabled selinux and nothing.
 
Old 08-25-2013, 11:55 AM   #9
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 80
it says that postfix has no sufficient permissions to create mail dirs or write to them for the user with userid: 5000..

post the permissions you have with the user and the under the mail dir.
 
1 members found this post helpful.
Old 08-25-2013, 03:22 PM   #10
FortressMvelez
Member
 
Registered: May 2013
Location: Bronx, New York
Posts: 40

Original Poster
Rep: Reputation: Disabled
Hello,

Here are the permissions for each directory starting with /home/vmail:

/home/vmail - drwxrw-r-x. 3 postfix 5000 4096 Aug 23 12:21

/home/vmail/aevtech.com - drwxrw-r-x. 3 postfix 5000 4096 Aug 23 12:21

/home/vmail/aevtech.com/support - drwxrw-r-x. 5 postfix 5000 4096 Aug 23 13:07

/home/vmail/aevtech.com/support/cur
/home/vmail/aevtech.com/support/new
/home/vmail/aevtech.com/support/temp

drwxrw-r-x. 2 postfix 5000 4096 Aug 23 12:22
drwxrw-r-x. 2 postfix 5000 4096 Aug 23 12:22
drwxrw-r-x 2 postfix 5000 4096 Aug 23 13:07

Let me know if you need any other information and again thank you for ALL of your help very very much!!!
 
Old 08-25-2013, 03:34 PM   #11
Doug G
Member
 
Registered: Jul 2013
Posts: 595

Rep: Reputation: Disabled
As another approach, if you build your server with the ispconfig3 open-source control panel one variation will set up postfix/dovecot mail server using mysql storage for mail users. That's what I use for my own email and it's worked well. I have no problems using webmail apps like squirrelmail, roundcube and a couple other webmails I've looked at in the past.
 
Old 08-25-2013, 09:18 PM   #12
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 80
find the username for uid 5000 and make the permission changes to 755 recursively on the maildir. To write the changes into maildir the user with uid 5000 should be in the owner and group.
 
Old 08-25-2013, 11:51 PM   #13
FortressMvelez
Member
 
Registered: May 2013
Location: Bronx, New York
Posts: 40

Original Poster
Rep: Reputation: Disabled
I tried to look for the user with that UID and I did not find anything:

Quote:
root@server.aevtech.com [~]: cat /etc/passwd | grep 5000:5000
root@server.aevtech.com [~]: cat /etc/passwd | grep 5000
The only thing close to that is 500 which is for the aevtech user on the server. Should I change it to that and see if that will work or there is somewhere else I can find that user I thought all the user names on the server was in that file?

Thanks!!

Last edited by FortressMvelez; 08-25-2013 at 11:53 PM.
 
Old 08-25-2013, 11:58 PM   #14
FortressMvelez
Member
 
Registered: May 2013
Location: Bronx, New York
Posts: 40

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Doug G View Post
As another approach, if you build your server with the ispconfig3 open-source control panel one variation will set up postfix/dovecot mail server using mysql storage for mail users. That's what I use for my own email and it's worked well. I have no problems using webmail apps like squirrelmail, roundcube and a couple other webmails I've looked at in the past.
I can do that as well but I am trying to do it manually for now so I can learn the ins and outs of it like I did with everything else. That way, if something goes wrong with the Control Panel or a server is needed without it I'm ready.
 
Old 08-26-2013, 12:38 AM   #15
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 80
aah no ... please post the output of :

Code:
 awk -v val=5000 -F ":" '$3==val{print $1}' /etc/passwd
the output of this command should be the username to be set as o+g in permissions.

I didnt had this situation before where it cant find a username and displays a uid :P
so hope for the best..
 
  


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
[SOLVED] Dovecot and Postfix restrict users zasavage Slackware 1 02-27-2012 02:35 PM
Postfix + Dovecot + virtual users without a database? MheAd Linux - Server 6 10-18-2011 09:45 AM
how to configure dovecot&sendmail&postfix to accept other domain email? hocheetiong Linux - Server 3 12-24-2007 04:55 AM


All times are GMT -5. The time now is 10:45 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration