1

I just installed Dovecot and Postfix on my CentOS server.

Now, with that, I created 2 local users that will each have a mail account.

I did the following:

useradd dexter

mkdir /home/dexter/Maildir
chown mark:mark /home/dexter/Maildir
chmod -R 700 /home/dexter/Maildir

and for the second user:

useradd info

mkdir /home/info/Maildir
chown mark:mark /home/info/Maildir
chmod -R 700 /home/info/Maildir

ISSUE: I can send mail to the 'dexter' user, and the emails land into his /Maildir/new or /Maildir/cur folder, but the other user - info, does not receive any mails sent to him. All his folders (Maildir/new and Maildir/cur) are empty.

Why is that?

Thanks


EDIT: /var/logs/maillog entries - I sent the same email to both users:

to=<dexter@mydomain.com>, relay=local, delay=0.35, delays=0.18/0.01/0/0.17, dsn=2.0.0, status=sent (delivered to maildir)

to=<root@mydomain.com>, orig_to=<info@mydomain.com>, relay=local, delay=0.41, delays=0.18/0.01/0/0.22, dsn=2.0.0, status=sent (delivered to maildir

I replaced my actual domain name with 'mydomain.com'

  • what in the maillog /var/log/maillog ? – ALex_hha Jul 21 '13 at 21:45
  • I will post the last few lines to my answer - Lines it the maillog i think might be relevant – DextrousDave Jul 21 '13 at 21:55
  • 2
    All mails has been delivered to the maildir. For user info mail was forwarded to the root maildir, maybe you are using some aliases (/etc/aliases) – ALex_hha Jul 21 '13 at 22:05
  • yeah, was just an alias issue. Fixed it in the /etc/aliases file.thank you for your help – DextrousDave Jul 22 '13 at 8:43
2
to=<root@mydomain.com>, orig_to=<info@mydomain.com>, relay=local, delay=0.41, delays=0.18/0.01/0/0.22, dsn=2.0.0, status=sent (delivered to maildir

It seams your email has been forwarded to the root user mailbox. Check in his emails, you should see the email you originally sent.

  • Edit /etc/aliases and remove the line which causes the forwarding to root ;
  • Run newaliases.

I hope it should solve your problem.

| improve this answer | |
  • Hi Fox. I did do the change (see my updated answer) and I also ran the 'newaliases' command, but info is still not getting mail. I also restarted postfix, but nothing – DextrousDave Jul 22 '13 at 8:20
  • # postmap -q root hash:/etc/aliases ? – ALex_hha Jul 22 '13 at 8:33
  • OK Cool. I managed to get it to work. There were a couple of default redirects and info was one of them. info routed to 'postmaster' by default, so I just changed it to 'info'. Thank you for your help – DextrousDave Jul 22 '13 at 8:42
  • Your welcome! Actually, when you change a postfix setting, you never need to restart it, except if you change the inet_interfaces parameter. For other parameters, running postfix reload should suffice. For the special case of the /etc/aliases, a newaliases or postaliases is enough. Finally, for all other "map" files, you can just use postmap /etc/postfix/mymap. – Fox Jul 22 '13 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.