Topic: can't send to localhost - probable mydestination issue
==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: FreeBSD 9.1
- Related log if you're reporting an issue:
====
Hi.
Mail flow is okay, the only problem is bouncing emails (see logs below). Though mailing to fetchmail@localhost.localdomain works fine (at least it accepts the address). I suppose there are something in either my hosts file or mydestination parameter.
> telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to data2.mydomain.com.
Escape character is '^]'.
220 data2.mydomain.com ESMTP Postfix
helo data.mydomain.com
250 data2.mydomain.com
mail from:<>
250 2.1.0 Ok
rcpt to:<fetchmail@localhost.localdomain>
250 2.1.5 Ok
rcpt to:<fetchmail@localhost>
450 4.1.2 <fetchmail@localhost>: Recipient address rejected: Domain not found
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP> RCPT TO:<nonexistent_user@data.mydomain.com>
Nov 12 14:27:03 data2 postfix/smtpd[1455]: NOQUEUE: reject: RCPT from data2.mydomain.com[127.0.0.1]: 550 5.1.1 <nonexistent_user@data.mydomain.com>: Recipient address rejected: User unknown in virtual mailbox table; from=<some_other_user@other.domain> to=<nonexistent_user@data.mydomain.com> proto=ESMTP helo=<data2.mydomain.com>
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP< 550 5.1.1 <nonexistent_user@data.mydomain.com>: Recipient address rejected: User unknown in virtual mailbox table
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP error: 550 5.1.1 <nonexistent_user@data.mydomain.com>: Recipient address rejected: User unknown in virtual mailbox table
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP listener doesn't like recipient address `nonexistent_user@data.mydomain.com'
Nov 12 14:27:03 data2 postfix/smtpd[1458]: connect from data2.mydomain.com[127.0.0.1]
Nov 12 14:27:03 data2 fetchmail[1453]: Trying to connect to 127.0.0.1/25...connected.
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP< 220 data2.mydomain.com ESMTP Postfix
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP> HELO data2.mydomain.com
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP< 250 data2.mydomain.com
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP> MAIL FROM:<>
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP< 250 2.1.0 Ok
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP> RCPT TO:<some_other_user@other.domain>
Nov 12 14:27:03 data2 postfix/smtpd[1458]: 3B6091D6BC6: client=data2.mydomain.com[127.0.0.1]
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP< 250 2.1.5 Ok
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP> DATA
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP< 354 End data with <CR><LF>.<CR><LF>
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP: (bounce-message body)
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP>. (EOM)
Nov 12 14:27:03 data2 postfix/cleanup[1459]: 3B6091D6BC6: message-id=<20131112102703.3B6091D6BC6@data2.mydomain.com>
Nov 12 14:27:03 data2 postfix/qmgr[1424]: 3B6091D6BC6: from=<>, size=3959, nrcpt=1 (queue active)
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP< 250 2.0.0 Ok: queued as 3B6091D6BC6
Nov 12 14:27:03 data2 postfix/smtpd[1458]: disconnect from data2.mydomain.com[127.0.0.1]
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP> QUIT
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP< 221 2.0.0 Bye
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP> RCPT TO:<fetchmail@localhost>
Nov 12 14:27:03 data2 postfix/smtpd[1455]: NOQUEUE: reject: RCPT from data2.mydomain.com[127.0.0.1]: 450 4.1.2 <fetchmail@localhost>: Recipient address rejected: Domain not found; from=<some_other_user@other.domain> to=<fetchmail@localhost> proto=ESMTP helo=<data2.mydomain.com>
Nov 12 14:27:03 data2 fetchmail[1453]: SMTP< 450 4.1.2 <fetchmail@localhost>: Recipient address rejected: Domain not found
Nov 12 14:27:03 data2 fetchmail[1453]: can't even send to fetchmail!
>cat /etc/hosts
::1 ipv6-localhost
127.0.0.1 data2.mydomain.com data2 localhost localhost.localdomain
>cat /var/spool/postfix/etc/hosts
::1 ipv6-localhost
127.0.0.1 data2.mydomain.com data2 localhost localhost.localdomain
>hostname -f
data2.mydomain.com
>cat main.cf
....
myhostname = data2.mydomain.com
smtp_host_lookup = dns, native
lmtp_host_lookup = dns, native
myorigin = data.mydomain.com
mydomain = mydomain.com
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
biff = no
inet_interfaces = all
mynetworks = 127.0.0.0/8 [::1]/128
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated
....
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.