On 3/24/2012 9:09 PM, Allan Wind wrote:
On 2012-03-24 21:03:59, Reid Thompson wrote:
On 3/24/2012 8:44 PM, Allan Wind wrote:
As stated you may want to look into check_sender_access:
<http://www.postfix.org/postconf.5.html#smtpd_sender_restrictions>
so if I configure
/etc/postfix/access
with
myem...@domain1.com OK
spousesem...@domain1.com OK
child1em...@domain1.com OK
child2em...@domain1.com OK
myem...@domain2.com OK
and /etc/postfix/main.cf
with
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/access, reject
will that block all email except that from the listed addresses?
Try it out and let us know it goes. Here is how you can test it:
telnet $mailserver 25
ehlo $client_host_name
mail from:<$sender>
rcpt to:<$to>
data
anything goes here
.
Test with both senders that are allowed and ones that are not,
and try both local and non-local to addresses.
/Allan
tested from remote host by mutt -x -s test j...@endpoint.dyndns-ip.com
Mar 24 21:13:09 endpoint postfix/smtpd[2946]: connect from
fw-corp.domain1.com[xxx.xxx.xxx.xxx]
Mar 24 21:13:09 endpoint postfix/smtpd[2946]: NOQUEUE: reject: RCPT from
fw-corp.domain1.com[xxx.xxx.xxx.xxx]: 554 5.7.1
<reid.thomp...@domain1.com>: Relay access denied;
from=<reid.thomp...@domain1.com> to=<reid.thomp...@domain1.com>
proto=ESMTP helo=<raker2.domain1.com>
Mar 24 21:13:09 endpoint postfix/smtpd[2946]: NOQUEUE: reject: RCPT from
fw-corp.domain1.com[xxx.xxx.xxx.xxx]: 554 5.7.1
<j...@endpoint.dyndns-ip.com>: Relay access denied;
from=<reid.thomp...@domain1.com> to=<j...@endpoint.dyndns-ip.com>
proto=ESMTP helo=<raker2.domain1.com>
Mar 24 21:13:09 endpoint postfix/smtpd[2946]: disconnect from
fw-corp.domain1.com[xxx.xxx.xxx.xxx]