1

Topic: Sender address rejected from subdomain

==== 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: iRedMail-0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu 12.04
- Related log if you're reporting an issue: Mailgun
====

whenever i try to send a mail from a subdomain to its domain i get this error. for example www-data@sub.example.com -> user@example.com:

Failed: www-data@wiki.domain.com → admin@domain.com 'Domainwiki account request' Server response: 550 550 5.1.0 <bounce+1af42d.2ca3a-admin=domain.com@domain.com>: Sender address rejected: User unknown in virtual mailbox table   
{
    "severity": "permanent",
    "tags": [],
    "delivery-status": {
        "message": "550 5.1.0 <bounce+1af42d.2ca3a-admin=domain.com@domain.com>: Sender address rejected: User unknown in virtual mailbox table",
        "code": 550,
        "description": null,
        "session-seconds": 3.0689170360565186
    },
    "envelope": {
        "transport": "smtp",
        "sender": "www-data@wiki.domain.com",
        "sending-ip": "184.173.153.202",
        "targets": "admin@domain.com"
    },
    "recipient-domain": "domain.com",
    "campaigns": [],
    "reason": "generic",
    "user-variables": {},
    "flags": {
        "is-authenticated": true,
        "is-system-test": false,
        "is-test-mode": false
    },
    "timestamp": 1404709083.083159,
    "message": {
        "headers": {
            "to": "Testmail <admin@domain.com>",
            "message-id": "mediawiki-mediawiki.53ba28a4e60741.99789661@wiki.domain.com",
            "from": "MediaWiki Mail <peter@domain.com>",
            "subject": "Domainwiki account request"
        },
        "attachments": [],
        "recipients": [
            "admin@domain.com"
        ],
        "size": 1049
    },
    "recipient": "admin@domain.com",
    "event": "failed"
}

i tried to add the sending subdomain + user to iredmail, also to add mailguns relay ip:
mynetworks = 127.0.0.0/8, 184.173.153.0/24

please help

2

Re: Sender address rejected from subdomain

peter.romfeld.hk wrote:

Failed: www-data@wiki.domain.com → admin@domain.com ... Sender address rejected: User unknown in virtual mailbox table

*) Does user 'admin@domain.com' exist? And 'www-data@wiki.domain.com'?
*) How did you send email as sender 'www-data@wiki.domain.com'?
*) What's the matter of MailGun in this case?

3

Re: Sender address rejected from subdomain

ZhangHuangbin wrote:
peter.romfeld.hk wrote:

Failed: www-data@wiki.domain.com → admin@domain.com ... Sender address rejected: User unknown in virtual mailbox table

*) Does user 'admin@domain.com' exist? And 'www-data@wiki.domain.com'?
*) How did you send email as sender 'www-data@wiki.domain.com'?
*) What's the matter of MailGun in this case?

admin existed before, www-data i added to test
I send the mail over mailgun relay configured in postfix (or with the api in script)
I use mailgun also as postfix relay for the iredmail mailserver
but mailgun is just for a informative log i thought
i also have the problem when i use SES from aws as relay with sub.mydomain.com -> mydomain.com

4

Re: Sender address rejected from subdomain

Not clear yet.

*) Which domains are hosted on your iRedMail server? Show us output of command "postconf -n" also.
*) Which domains are hosted on MailGun?
*) You send test email on MailGun as user 'www-data@wiki.domain.com'  to 'admin@domain.com' which hosted on iRedMail server?