send out emails fine but can't receive incoming emails
I have this strange problem here. I can send emails out but don't see any incoming emails when I should have received them. I tested it to my external email account as well as locally to myself. None actually works.
Here is the log file from /var/log/mail.log
postfix/postfix-script: starting the Postfix mail system
postfix/master: daemon started -- version 2.9.3, configuration /etc/postfix
postfix/smtpd: connect from localhost[127.0.0.1]
postfix/smtpd: C26FA4093F: client=localhost[127.0.0.1]
postfix/cleanup: C26FA4093F: message-id=<firstname.lastname@example.org>
postfix/qmgr: C26FA4093F: from=<email@example.com>, size=581, nrcpt=1 (queue active)
postfix/smtpd: disconnect from localhost[127.0.0.1]
postfix/smtp: C26FA4093F: to=<firstname.lastname@example.org>, relay=mta6.am0.yahoodns.net[188.8.131.52]:25, delay=2.8, delays=0.1/0.04/1.1/1.6, dsn=2.0.0, status=sent (250 ok dirdel)
postfix/qmgr: C26FA4093F: removed
postfix/smtpd: connect from nm1.bullet.mail.sp2.yahoo.com[184.108.40.206]
postfix/smtpd: 74C524093F: client=nm1.bullet.mail.sp2.yahoo.com[220.127.116.11]
postfix/cleanup: 74C524093F: message-id=<1341282748.52540.YahooMailNeo@web113419.mail.gq1.yahoo.com>
postfix/qmgr: 74C524093F: from=<email@example.com>, size=4063, nrcpt=1 (queue active)
postfix/virtual: 74C524093F: to=<firstname.lastname@example.org>, relay=virtual, delay=1, delays=0.95/0.02/0/0.04, dsn=2.0.0, status=sent (delivered to maildir)
postfix/qmgr: 74C524093F: removed
From the log file, it seems that I should have received and read the emails from my roundcubemail.
Here is my main.cf
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = mycompanydomain.com
myhostname = mharry.mycompanydomain.com
mynetworks = 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/dovecot-sasl-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
transport_maps = mysql:/etc/postfix/mysql/mysql-virtual_transports.cf
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql-virtual_mailboxes.cf
virtual_uid_maps = static:5000
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_overquota_bounce=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_mailbox_limit_maps=mysql:/etc/postfix/mysql/mysql-virtual_mailbox_limit_maps.cf
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_limit_message="The user you are trying to reach is over quota."
I was wondering if anyone might be able to tell me what went wrong here.
BTW, I run Postfix, dovecot, dovecot-SASL, MySQL and roundcube as webmail.
And I am using IMAP dovecot.
Any help would be greatly appreciated.
(delivered to maildir)
Usually means it has been delivered (written to file) *somewhere*. That *somewhere* is defined by what your sql returns thanks to virtual_mailbox_maps (/etc/postfix/mysql/mysql-virtual_mailboxes.cf). At a guess I'd say look in /home/vmail/mharry/new OR /home/vmail/mycompanydomain/mharry/new. Poke around with the ls in these areas and see what turns up.
If you can find where the mail has been delivered to, you can then cross check that both Dovecot & Roundcube are looking in the right place for it.
Thank you Leslie for your reply.
That's what my first guess was after reading from the log file and saw that it says "delivered to Maildir" but became doubtful when not receiving any emails at all.
I already poked into /home/vmail/mycompanydomain/mharry/new and /home/vmail/mycompanydomain/mharry/cur, and found that all my "sent emails" files are in /home/vmail/mycompanydomain/mharry/new. Also what confuses me all the more is that I found /Maildir folder under /home/vmail/mycompanydomain/mharry/ and in it, there are /cur, /new and /tmp. So something must have been incorrectly configured. But I got a feeling my roundcube has not been reading from the right inbox.
Please let me know if you need my config files.
I'd forget Roundcube for a moment and get Dovecot working. You've established that Postfix is delivering correctly. If I were troubleshooting this I'd next check that I could telnet to Dovecot on 110 (pop) and log in, running basic POP commands to check to see if I could read messages. Telnet is useful as you get good error feedback.
I suspect the issue is Dovecot is looking in the wrong place. The older 'how to' articles were great, but Dovecot's config has changed slightly (you may have some clues in the logs), and this broke stuff - particularly the home directory of Virtual Mail users.
My notes from the last mail server I put together with Dovecot reads:
Thank you for your reply, Leslie.
Can you talk to Dovecot by Telnet OK and log in?
Yes, I can by telnet.
Leslie, prior to telnet, I actually did a test by sending a dummy email from my Yahoo email address, however, as you could tell, both the exists and recent show 0 number of emails (when it's suppose to have received an email from my Yahoo). So I got a feeling that dovecot is not looking in the right place (which I agree with you).
$ telnet mycompanydomain.com 143
Connected to mycompanydomain.com.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot IMAP4 Server ready.
a login mharry mharrypassword
a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE SEARCH=FUZZY] Logged in
b select inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1341200706] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
* OK [NOMODSEQ] No permanent modsequences
b OK [READ-WRITE] Select completed.
At this point, I'll read through your notes see if I can adjust it to suit my system requirements.
Will post back the result. Thank you very much
I suspect that it's just looking in the wrong place for the mailbox - or does not have the correct permissions. This will all be set in dovecot.conf around these lines:
Is set & populated from MYSQL by the query in dovecot-sql.conf
user_query = SELECT concat('/path/to/mail', virtual_mailbox) AS home, virtual_uid AS uid, virtual_gid AS gid FROM users where email = '%u';
Whilst this won't match you set up, it should send you the right way (I hope).
I finally found all the incoming emails and they have been sitting at /home/vmail/mycompanydomain/mharry/new folder.
So I followed your advice to cross check that both Dovecot & Roundcube are looking in the right place for it.
In dovecot.conf, I have changed
mail_location = maildir:/home/vmail/%d/%n/Maildir
mail_location = maildir:/home/vmail/%d/%n
And I can view all my incoming emails from roundcube mail now :D
But I am still curious what makes roundcube mail to look into /home/vmail/%d/%n/Maildir. What did I do wrong in the first place?
Thank you so much
I'm not familiar with Roundcube, but a quick look at its page and it looks like it talks IMAP to Dovecot - so fix that, you fix Roundcube. But... I may be wrong! Glad you have it working, that's a great start to the day :-)
|All times are GMT -5. The time now is 03:46 PM.|