Quantcast
Channel: iRedMail
Viewing all articles
Browse latest Browse all 14126

Can't Figure Out Setting up Domain Alias for MySQL

$
0
0

==== Required information ====
- iRedMail version: 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:
====
I'm writing a tutorial on iRedMail and want to include instructions for filtering inbound mail through mailgun.com - mailgun removes SPAM, then forwards msgs on to iRedMail server.

Mail is sent to hong2.com - the MX for hong2.com goes to mailgun.com for filtering
Mailgun forwards mail to user@inbound.hong2.com - the MX for inbound.hong2.com points to my iRedMail server

I just want <any user>@inbound.hong2.com to deliver to <any user>@hong2.com. I believe this is just a simple domain alias setting.

I keep getting this error: User unknown in virtual mailbox table;
Jun 13 07:12:15 x postfix/smtpd[9327]: connect from mail-s65.mailgun.info[184.173.153.193]
Jun 13 07:12:15 x postfix/smtpd[9327]: NOQUEUE: reject: RCPT from mail-s65.mailgun.info[184.173.153.193]: 550 5.1.0 <bounce+f3ca76.809f-jeff=inbound.hong2.com@hong2.com>: Sender address rejected: User unknown in virtual mailbox table; from=<bounce+f3ca76.809f-jeff=inbound.hong2.com@hong2.com> to=<jeff@inbound.hong2.com> proto=ESMTP helo=<mail-s65.mailgun.info>
Jun 13 07:12:15 x postfix/smtpd[9327]: disconnect from mail-s65.mailgun.info[184.173.153.193]

Could you please document the mysql domain alias manual setup more clearly? This is what I did below:

I added an entry to the alias_domain table. And, I made aliases =1 in the domain table for hong2. See further below... but nothing I do is changing the postfix error message.

>cd /etc/postfix/mysql
> for cf in $(ls *.cf); do echo ${cf}; postmap -q jeff@inbound.hong2.com mysql:./${cf}; done
Outputs this:
catchall_maps.cf
domain_alias_catchall_maps.cf
domain_alias_maps.cf
jeff@hong2.com
recipient_bcc_maps_domain.cf
recipient_bcc_maps_user.cf
relay_domains.cf
sender_bcc_maps_domain.cf
sender_bcc_maps_user.cf
sender_login_maps.cf
transport_maps_domain.cf
transport_maps_user.cf
virtual_alias_maps.cf
virtual_mailbox_domains.cf
virtual_mailbox_maps.cf

My alias domain table is:
alias_domain    target_domain    created    modified    active
inbound.hong2.com    hong2.com    0000-00-00 00:00:00    0000-00-00 00:00:00    1

My domain table is:
domain    description    disclaimer    aliases    mailboxes    maxquota    quota    transport    backupmx    defaultuserquota   
hong2.com            1    0    0    0    dovecot    0    1024   

My alias table is:
address    goto    name    moderators    accesspolicy    domain    created    modified    expired    active
postmaster@hong2.com    postmaster@hong2.com                hong2.com    2013-06-11 05:09:14    0000-00-00 00:00:00    9999-12-31 00:00:00    1

My mailbox table is:
username    password    name    language    storagebasedirectory    storagenode    maildir    quota    domain    transport    department    rank    employeeid    isadmin    isglobaladmin    enablesmtp    enablesmtpsecured    enablepop3    enablepop3secured    enableimap    enableimapsecured    enabledeliver    enablelda    enablemanagesieve    enablemanagesievesecured    enablesieve    enablesievesecured    enableinternal    enabledoveadm    enablelib-storage    lastlogindate    lastloginipv4    lastloginprotocol    disclaimer    passwordlastchange    allowedsenders    rejectedsenders    allowedrecipients    rejectedrecipients    created    modified    expired    active    local_part    bytes    messages
postmaster@hong2.com    $1xxxxxxxH4a/    postmaster    en_US    /var/vmail    vmail1    hong2.com/p/o/s/postmaster-2013.06.11.05.02.40/    100    hong2.com            normal        1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    0000-00-00 00:00:00    0            0000-00-00 00:00:00                    2013-06-11 05:09:14    0000-00-00 00:00:00    9999-12-31 00:00:00    1        0    0
jeff@hong2.com    $1$xxxxxxxhmN.    Jeff Reifman    en_US    /var/vmail    vmail1    hong2.com/j/e/f/jeff-2013.06.12.07.34.26/
jeff@hong2.com    jeff@hong2.com                hong2.com    2013-06-12 07:34:26    0000-00-00 00:00:00    9999-12-31 00:00:00    1
@hong2.com    jeff@hong2.com                    0000-00-00 00:00:00    0000-00-00 00:00:00    9999-12-31 00:00:00    1


Viewing all articles
Browse latest Browse all 14126

Trending Articles