im setting up a mail gateway server using the guide at: http://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/
when trying to send mail and watching the mail logs, im seeing the following error:
Jun 22 23:24:41 emailmax01 dovecot: lda(firstname.lastname@example.org): Error: user brad@xxx: Couldn't drop privileges: Mail access for users with UID 150 not permitted (see first_valid_uid in config file, uid from userdb lookup).
the guide says to create a user and group like this: useradd -r -u 150 -g mail -d /var/vmail -s /sbin/nologin -c "Virtual maildir handler" vmail
i followed the guide and edited the: /etc/dovecot/conf.d/10-mail.conf: and changed to the following:
first_valid_uid = 150 last_valid_uid = 150
rebooted server but still getting same error.
also i ran:
root@emailmax01:~# id vmail and got these results:
uid=150(vmail) gid=8(mail) groups=8(mail)
Any ideas whats causing the error i listed above?
i figured it out,
the error was:
Error: user brad@xxx: Couldn't drop privileges: Mail access for users with UID 150 not permitted (see first_valid_uid in config file, uid from userdb lookup).
I edited: /etc/dovecot/conf.d/10-mail.conf
looked for line:
first_valid_uid = 150 last_valid_uid = 150 it was set correctly, however restarting services would not fix the issue. finally i decided to just rewrite the line. so I rewrote the line, saved file, restarted services and it starting working correctly.
hope this helps anyone else that might have this issue. (deer hunter, feel free to edit my posts and change i to I)