0

This is a bit embarassing, but I'm stuck at the first step of debugging a postfix+dovecot setup on Debian after following this guide.

Sending email from my server works, but receiving doesn't. I get this line in the /var/log/mail.log (with some redactions):

# /var/log/mail.log
Oct 18 19:17:03 X postfix/lmtp[387]: BB7321F440: to=<A@X.Y>, relay=X.Y[private/dovecot-lmtp], delay=1157, delays=1095/0.02/0.01/62, dsn=4.3.0, status=deferred (host X.Y[private/dovecot-lmtp] said: 451 4.3.0 <A@X.Y> Internal error occurred. Refer to server log for more information. (in reply to RCPT TO command))

For convenience and emphasis, the key part is:

Internal error occurred. Refer to server log for more information.

The exact same error message appears in /var/log/syslog but there is no additional information there.

Where can I find the "server log" this refers to, so I can continue debugging?

  • 1
    This might refer to the dovecot log, issued to the mail facility with syslog. Look in /etc/syslog.conf to see which file that logs to. On many distributions that's /var/log/maillog. If you find useful error messages there or in /var/log/mail.log, please add them to the post. – harrymc Oct 21 '20 at 14:05
  • Thanks harrymc -- I found /etc/rsyslog.conf which says I have /var/log/mail.{err,warn,info}. However, I didn't find anything new in those. – usul Oct 21 '20 at 19:56
  • Although you got an answer to the question of where is the log file, do you now wait for an idea on how to repair the problem? Because that is a different question, and it requires much more information. – harrymc Oct 23 '20 at 6:21
  • @harrymc, thank you for your comment and answer. I agree that your answer does answer the question, and that troubleshooting from there is a different question. However, I'd like to wait a bit before I accept it, because the answer is not definitive/absolutely certain -- I'd like to see if anyone else has anything to say. – usul Oct 23 '20 at 15:30
  • No problem, I just wanted to be sure sbout your expectations. – harrymc Oct 23 '20 at 17:05
1
+50

I think that these messages most likely refer to the dovecot log, which is issued to the mail facility via syslog.

To find the log file, one needs to look in the file /etc/syslog.conf, to see in which file resides that log.

On many distributions this log file is /var/log/maillog. If you don't find any useful error messages in there, or perhaps in the file /var/log/mail.log, then I think that these messages are incorrect, and there is nothing more to be found in any other server log.

You will have to make do with the error messages that you have, or find other methods for debugging your setup.

  • 1
    Would be nice to know what proof of the downvoter shows that this answer is completely wrong. – harrymc Oct 22 '20 at 7:38
  • 1
    Yes @harrymc I think it was not fair. Yours was a good contribution to help. I gave you +1 to even the balance. Cheers – Carles Mateo Oct 22 '20 at 21:57
  • Thanks for this answer. It sounds like I ought to file a bug report with postfix or dovecot (not sure which). – usul Oct 29 '20 at 0:09
1

Can you send email locally.

Try those steps:

telnet localhost 25

If it's listening you'll see:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 yourserver ESMTP Postfix (Ubuntu)

Then type:

ehlo localhost
mail from: root@localhost
rcpt to: youruser@localhost
data
Subject: Trying to see if you get this email delivered

Fingers cross! :)
.
quit

if you type:

mail

You should see your email.

If this works we are good. But if you want to receive email from Internet you have to configure your postfix as for it.

Here is very well explained: https://docs.gitlab.com/ee/administration/reply_by_email_postfix_setup.html#configure-postfix-to-receive-email-from-the-internet

I assume that the DNS is setup correctly to have and address of type A to your email server and MX for your domains.

Cheers

  • 1
    Thanks a lot for this suggestion. I had to use syntax <root@localhost> and <youruser@localhost>. The email actually seems to have bounced due to local permissions issues, so I'll look into that! – usul Oct 21 '20 at 20:19
  • The email Servers have rules anti spam to avoid relaying and you have to configure for which domains they get email. They are complicated. :) Glad to help. – Carles Mateo Oct 21 '20 at 23:33
  • Right now the problem is more prosaic, the tutorial has me set the owner of /var/mail/youruser to vmail and the permissions -rw-----. So postfix and/or dovecot don't have permission to deliver mail (and I don't have permission to read it either). – usul Oct 22 '20 at 1:39
  • After apparently fixing these, I am still getting the error in the original post. – usul Oct 22 '20 at 3:08

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.