On Mon, Oct 14, 2013 at 09:43:31AM -0700, Farzad Mahdikhani wrote: > Here is my environment: > Red Hat Enterprise Linux Server release 5.7 (Tikanga) > postfix-2.9.1-1.rhel5 > dovecot 1.0.7
You used a third-party RPM or SRPM for Postfix, why not for Dovecot? Also, the latest in the Postfix 2.9 series is patchlevel 6 or so. > I want to config a complete postfix-dovecot mail server. First I > configured postfix to use procmail, its default LDA and dovecot for FWIW, procmail is NOT the default LDA for Postfix. Postfix has its own local(8) and [optional] virtual(8) LDAs. Procmail is very old and unmaintained (it makes Dovecot 1.x look recent!) Only old and well- established sites should be using procmail now. There are much better options for new sites in A.D. 2013. > pop3 and imap. I didn't changed main.cf a lot, just myhostname and > a few other properties. I didn't set home_mailbox. About > dovecot.conf here is the output of dovecot -n : > > # 1.0.7: /etc/dovecot.conf > log_path: /var/log/dovecot.log > protocols: imap pop3 > login_dir: /var/run/dovecot/login > login_executable(default): /usr/libexec/dovecot/imap-login > login_executable(imap): /usr/libexec/dovecot/imap-login > login_executable(pop3): /usr/libexec/dovecot/pop3-login > mail_debug: yes > mail_executable(default): /usr/libexec/dovecot/imap > mail_executable(imap): /usr/libexec/dovecot/imap > mail_executable(pop3): /usr/libexec/dovecot/pop3 > mail_plugin_dir(default): /usr/lib64/dovecot/imap > mail_plugin_dir(imap): /usr/lib64/dovecot/imap > mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 > auth default: > mechanisms: plain login > passdb: > driver: pam > userdb: > driver: passwd > > As you can see mail_location is not set. At this time everything > was OK and working. I was able to send email using SquirrelMail and > thunderbird. I got two users, user1 and user2, in my linux machine > and when I sent an email from us...@software.com to > us...@software.com the sent mail was saved in /home/user1/mail/Sent > and the received email was in /var/mail/user2. The log file for > dovecot had entries like this for user1 and user2: > > dovecot: Oct 14 14:44:52 Info: IMAP(user1): maildir: couldn't find root dir > dovecot: Oct 14 14:44:52 Info: IMAP(user1): mbox: root exists > (/home/user1/mail) > dovecot: Oct 14 14:44:52 Info: IMAP(user1): mbox: INBOX exists > (/var/mail/user1) > dovecot: Oct 14 14:44:52 Info: IMAP(user1): mbox: root=/home/user1/mail, > index=/home/user1/mail, inbox=/var/mail/user1 > > At this point I tried to change the LDA from procmail to dovecot > by the following settings: > > I added/changed the following in the main.cf: > > mailbox_command = /usr/libexec/dovecot/deliver This is used for the local domain class. It's not relevant for other address classes. > dovecot_destination_recipient_limit = 1 > virtual_mailbox_domains = software.com This defines the virtual mailbox domain address class. This says that addres...@software.com are virtual mailbox, NOT local, addresses. If you're using passwd and PAM as userdb/passdb, this is not what you want. > virtual_transport = dovecot And this is the default transport to be used for virtual mailboxes. > I added the following in the master.cf: > > dovecot unix - n n - - pipe > flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} > -d ${recipient} > > But it didn't work. When I send email from from user2 to user1 the > sent email is correctly saved in /home/user2/mail/Sent but it seems > that user1 doesn't receive the incoming email. dovecot.log had > entries like the following: > > dovecot: Oct 14 14:54:04 Info: imap-login: Login: user=<user1>, method=PLAIN, > rip=::ffff:172.27.7.8, lip=::ffff:172.16.100.183, TLS That's a system user login (local user in Postfix terms.) > dovecot: Oct 14 14:54:04 Info: IMAP(user1): Effective uid=504, gid=504, > home=/home/user1 > dovecot: Oct 14 14:54:04 Info: IMAP(user1): maildir: > access(/home/user1/Maildir, rwx): failed: No such file or directory > dovecot: Oct 14 14:54:04 Info: IMAP(user1): maildir: couldn't find root dir > dovecot: Oct 14 14:54:04 Info: IMAP(user1): mbox: root exists > (/home/user1/mail) > dovecot: Oct 14 14:54:04 Info: IMAP(user1): mbox: INBOX exists > (/var/mail/user1) > dovecot: Oct 14 14:54:04 Info: IMAP(user1): mbox: root=/home/user1/mail, > index=/home/user1/mail, inbox=/var/mail/user1 > > Setting home_mailbox = Maildir/ in main.cf and mail_location = The home_mailbox setting IS relevant to local domains. > maildir:~/Maildir in dovecot.cf didn't help. I have been googling > and reading and testing for 4 or 5 days for this but there was no > chance. Now, I am stuck and any help would be really really > appreciated. This is mostly a Postfix question, BTW, so I will point to to the Postfix documentation. Don't confuse your address classes: http://www.postfix.org/ADDRESS_CLASS_README.html http://www.postfix.org/VIRTUAL_README.html -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: