how to make postfix only relay certain domain mail?
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
how to make postfix only relay certain domain mail?
hi,
I have postfix 2.2.10, how to make postfix only relay certain domain mail?like only "test.com" email can be pass throught.
second question is after I change /etc/postfix/virtual, I restart postfix, but the setting in "virutal" still working, what should I do?
thanks in advance!
jimmy
postmap is working, but can you tell me what exactly I should change in main.cf? I know "Postfix relays mail "trusted" clients (IP address matches $mynetworks) to any destination".
but I only want "trusted" clients relay mail to one destination like " test.com, what should I do?
thanks!
jimmy
postmap is working, but can you tell me what exactly I should change in main.cf? I know "Postfix relays mail "trusted" clients (IP address matches $mynetworks) to any destination".
but I only want "trusted" clients relay mail to one destination like " test.com, what should I do?
thanks!
jimmy
I don't follow your comment about virtual by the way.
I'm not sure I've done this myself before, but here's what I think you need without trying it
relay_domains = $mydestination, test.com
transport_maps = hash:/etc/postfix/transport
in /etc/postfix/transport
test.com smtp:destination_server.com
where destination_server.com is the server you want to relay to.
You need to postmap transport btw.
In this setup, any domains listed in mydestination will deliver locally, test.com will deliver via relay. I think this will work with vitual domains, but may not
the postfix server IP is 192.168.1.103, the mail will come from the other server 192.168.1.183( they are in same lan).
right now the server 192.168.1.183 can send mail to any destination relay from 192.168.103, but I want limit the destination to "opt-intelligence.com" only, so only the email from 192.168.1.103 and from address is "xxx@opt-intelligence.com" and "to address" is "xxx@opt-intelligence.com" can be replayed in 192.168.1.103.
I finally figure it out, hope the following configuration can help people has same question as mine.
1.[root@optimization ~]# vi /etc/postfix/main.cf
smtpd_client_restrictions = check_client_access hash:/etc/postfix/access, reject
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/access, reject
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/access, reject
2.[root@optimization ~]# vi /etc/postfix/access
intelligence.com OK
192.168.1.183 OK
127.0.0.1 OK
3.[root@optimization ~]# postmap /etc/postfix/access
[root@optimization ~]# postfix reload
postfix/postfix-script: refreshing the Postfix mail system
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.