Hello,

I have a problem with a proxymap mysql access table. I'im using postfix 2.9.6 (Debian Wheezy package with mysql, ldap support).
let me explain what i want to do :

I migrate mailserver for my company from courier-imap to zimbra ZCS 8.x. During the migration process of an user account/maildir (with imapsync), i want to hold incoming mails to this user in my MX server by holding its incoming mails in HOLD queue and release these mails to the zimbra server (using a new transport) when imapsync process is finished

So in smptd_recipient_restrictions, i added check_recipient_access with a check in a MySQL table (migation_accounts) : if the email is in this table avec the status is 'R' (migration Running or in process if you want) then i hold user's new incoming mail to avoid mails going to the wrong (old) pop/imap server and after release mails with postsuper -H command.


i have a proxymap error i can explain/understand and resolve (apparently proxy_read_maps approval table) :


mail.log :

Jan 15 07:01:57 mx1 postfix/proxymap[13590]: warning: request for unapproved table: "mysql:/etc/postfix/users_hold_mail_migration_zimbra.cf" Jan 15 07:01:57 mx1 postfix/proxymap[13590]: warning: to approve this table for read-only access, list proxy:mysql:/etc/postfix/users_hold_mail_migration_zimbra.cf in main.cf:proxy_read_maps Jan 15 07:01:57 mx1 postfix/smtpd[13589]: fatal: proxymap service is not configured for table "mysql:/etc/postfix/users_hold_mail_migration_zimbra.cf"


Here is part of my main.cf file:

smtpd_recipient_restrictions =
### hold mail with access file : works
### check_recipient_access hash:/etc/postfix/users_hold_mail_migration_zimbra,

### hold mail with mysql access table : doen't works
check_recipient_access proxy:mysql:/etc/postfix/users_hold_mail_migration_zimbra.mysql,

   permit_sasl_authenticated,
   permit_mynetworks,
   reject_unauth_destination,


users_hold_mail_migration_zimbra.mysql :

hosts=zusine.univ-lille3.fr
user=zimbra
password=xxxxxxxxxxxx
dbname = migration
query=SELECT CONCAT(mail," HOLD") FROM migration_accounts WHERE status='R';


# postconf -d | grep proxy_read_maps
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $sender_bcc_maps $recipient_bcc_maps $smtp_generic_maps $lmtp_generic_maps $alias_maps

# postconf -m
btree
cidr
environ
fail
hash
internal
ldap
memcache
mysql
nis
pcre
proxy
regexp
sdbm
sqlite
static
tcp
texthash
unix


-------------

With a simple access text file and .db file (users_hold_mail_migration_zimbra.db) it works, but not with a MySQL access table. I try to add $smtpd_recipient_restrictions and $check_recipient_access in $proxy_read_maps parameter but it failed. i don't know how to approve new mysql table for proxy_read_maps.


Do you know what is wrong and how to avoid proxymap error ? or an alternative solution to HOLD mail for specific users (by transport table with hold: transport ???)
Thank you for your help, i hope i was clear to describe my problem.



--
Arnaud
[email protected]

Reply via email to