i was not clear enough ;(
to setup an ispconfig to act as a mailgw, ispconfig should accept mail for all the domains that stay on target mail server, so i have:
mail1 => ispconfig mail server with mail imap/pop3 accounts
mailgw1 => relay messages only for domains configured on mail1
to setup mailgw one shuld:
1. disable relay_recipient_maps
Code:
# relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
2. use verify to limit relay to account on target server
Code:
address_verify_map = btree:/var/lib/postfix/verify
3. add verify check into
Code:
smtpd_recipient_restrictions = permit_mynetworks,...,reject_unverified_recipient
4. relay for domain on target server
Code:
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
5 use transport to know where delivery mails
Code:
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
6. disable every smtp authenticated
Code:
sed -i -e s/sasl/d main.cf
keep care to have option of smtpd_recipient_restrictions one for line, otherwise this wipe your smtpd_recipient_restrictions
done
if this mailgw goes down, you need another one one able to relay to the same target.
So you need 2 transport
same domain
same target ip
different mail server_id
acme.com. IN MX 10 mailgw1.acme.com.
acme.com. IN MX 20 mailgw2.acme.com.
imap IN A x.y.w.z
mailgw1.acme.com. deliver mails to imap.acme.com x.y.w.z
if mailgw1.acme.com. goes down
mailgw2.acme.com. with MX 20 deliver mails to imap.acme.com x.y.w.z
nothing more, nothing less
maybe this configuration can be useful to other people, here
Recent comments
1 day 6 hours ago
1 day 15 hours ago
1 day 17 hours ago
1 day 19 hours ago
1 day 20 hours ago
1 day 22 hours ago
1 day 23 hours ago
2 days 56 min ago
2 days 16 hours ago
2 days 17 hours ago