X-Postfix; Mailboxes not found when mail comes from others servers
Problem solved!
Changed host.domain.com
to server.domain.com
and problem solved, because mail.domain.com
was as MX record in my DNS settings
Related videos on Youtube
sIiiS
Updated on September 18, 2022Comments
-
sIiiS almost 2 years
I had installed and configured dovecot, postfix, and postfixadmin step by step from this tutorial on my server (CentOS6).
I can create virtual mailboxes as well now and can login to roundcubemail, I can also send emails but when I want to send email from other mail systems like gmail, yahoo and etc then I get this error:
This is the mail system at host domain.com.
I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can delete your own text from the attached returned message.
The mail system
<[email protected]>: unknown user: "admin" Final-Recipient: rfc822; [email protected] Original-Recipient: rfc822;[email protected] Action: failed Status: 5.1.1 Diagnostic-Code: X-Postfix; unknown user: "admin"
This is postfix
main.cf
:# network settings inet_interfaces = all mydomain = domain.com myhostname = mail.domain.com mynetworks = $config_directory/mynetworks mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain relay_domains = proxy:mysql:/etc/postfix/mysql-relay_domains_maps.cf
And the
mynetworks
file:192.168.0.0/16 10.0.0.0/8 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 130.185.0.0/16 # -> my domain ip
And
mysql-relay_domains_maps.cf
:hosts = localhost user = postfix password = postfixpassword dbname = postfix query = SELECT domain FROM domain WHERE domain='%s' and backupmx = '1'
The error showing up in the logs is the following:
postfix/local[19002]: 38902E0550: to=<[email protected]>, relay=local, delay=0.09, delays=0.06/0.01/0/0.02, dsn=5.1.1, status=bounced (unknown user: "admin")
After reading some posts and I changed mydestination from this
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
to
mydestination = localhost
but after this change, I the error in the logs change to:
postfix/smtp[18844]: D6EEFE0550: to=<[email protected]>, relay=none, delay=0.14, delays=0.05/0.01/0.08/0, dsn=5.4.6, status=bounced (mail for domain.com loops back to myself)
-
masegaloeh almost 10 yearsPlease edit the question and add delivery log (i.e. log when postfix reject email) in both conditions, before and after you change
mydestination
parameter -
sIiiS almost 10 yearslog added, please read it
-
sebix almost 10 yearsI doubt you read all the previous questions containing this error. I guess from these, that the log is from the
mydestination = localhost
setting, which is apparently false for a public mailserver. To cite from another answer: This happens when domain.com has an MX record (or, in the absence of an MX, an A record) that points to your Postfix server, but your Postfix server is not configured to accept mail for that domain. -
sIiiS almost 10 yearsI did every change but none of them helped me till now, maybe some things is wrong here :(
-
sebix almost 10 yearsPlease describe the changes you made and your problems in detail, not, simle things are wrong! You did change
relay_domains
, which is by default$mydestination
, that lists the domains that are deliverd locally. You have to insert your domains into the MySQL table there, have you done that? -
sIiiS almost 10 yearsif
myhostname = domain.com
andmydestination = $myhostname, localhost.$mydomain, localhost
then error iswww postfix/local[19002]: 38902E0550: to=<[email protected]>, relay=local, delay=0.09, delays=0.06/0.01/0/0.02, dsn=5.1.1, status=bounced (unknown user: "admin")
and ifmyhostname = mail.domain.com
andmydestination = $myhostname, localhost.$mydomain, localhost
then error iswww postfix/smtp[18844]: D6EEFE0550: to=<[email protected]>, relay=none, delay=0.14, delays=0.05/0.01/0.08/0, dsn=5.4.6, status=bounced (mail for domain.com loops back to myself)
-
-
sIiiS almost 10 yearsI do this, and got some log, but can not post here, because I have not enough space for it, but you can see in this link: error log and for your Q, all of the address do not work
-
Dawid almost 10 yearsThis is interesting cause line 44 of that logs (
Jul 14 20:11:36 domain postfix/smtpd[9206]: > localhost[127.0.0.1]: 250 2.1.5 Ok
) says that the lookup was successful so postfix found that user. I think that there is some logic error in the configuration. I would suggest go through config line by line. Gonna try setup using that tutorial, later today.... -
sebix almost 10 years-.- So, you could have (very!) easily solved this problem yourself, by searching for the error message in the internet.