Hi Tuyosi On 2015-07-13 Mon 16:41 PM |, Tuyosi Takesima wrote: > > perhaps i solved the quize to send and rcieve email . > > openbsd mail server (this has main cf) > | > internet > | > 1.2.3.4 > router > | > dhcp > linux(thunderberd) > > > in /etc/postfix/main.cf > mynetworks = 127.0.0.0/8, 1.2.3.4/32 >
This works because the default smtp daemon relay restrictions permit $mynetworks, and authenticated connections: $ postconf -dh smtpd_relay_restrictions permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination Users either need to authenticate, or have an IP address in $mynetworks. When your WiFi router changes IP address, this won't work anymore. If someone else gets DHCP allocated your WiFi router's address, they can relay spam through your server. The server rental company could evict you. When you connect from a cafe, train, airport, hotel, it wont work. $mynetworks is usually for NAT & ISP customer address blocks. See: /usr/local/share/doc/postfix/html/BASIC_CONFIGURATION_README.html#relay_from mynetworks and smtpd_relay_restrictions in postconf(5) Web: http://www.postfix.org/BASIC_CONFIGURATION_README.html#relay_from http://www.postfix.org/postconf.5.html#mynetworks http://www.postfix.org/postconf.5.html#smtpd_relay_restrictions The solution is for remote users to authenticate on the submission port.