On 9/7/2012 4:04 PM, Wietse Venema wrote:
General Mail:
On 9/7/2012 3:27 PM, Wietse Venema wrote:
General Mail:
/etc/postfix/access
ad...@bombshellz.net OK
no-re...@bombshellz.net OK
* REJECT "$access_map_reject_code   You can't send E-Mails from this
server any longer. This is for Admin E-Mails only"
There is no documentation for "$access_map_reject_code" in access maps.
That feature does not exist.

There is no documentation for "*" in access maps. There is documentation
for using PCRE or REGEXP patterns in access maps.

http://www.postfix.org/access.5.html
http://www.postfix.org/pcre_table.5.html
http://www.postfix.org/regexp_table.5.html

        Wietse
Hello,

Thanks for the quick reply.

According to the documentation you referred me to, it does contain
'$access_map_reject_code' in the example as follows:
The text in question is:

    REJECT optional text...
          Reject the address etc. that matches  the  pattern.  Reply  with
          "$access_map_reject_code  optional  text..."  when  the optional

Here,

- YOU provide "REJECT optional text..." in the access table.

- POSTFIX provides the $access_map_reject_code value, using the
parameter setting in main.cf.

So it should now be 100% crystal clear that YOU DO NOT provide
$access_map_reject_code in the access table.

        Wietse


Hello,

I was well aware beforehand but thanks for the clarification and was planning to stick with the default value from the documentation. My new setup is as follows:

postconf -n 'smtpd_sender_restrictions'
smtpd_sender_restrictions = check_sender_access pcre:/etc/postfix/sender, reject

cat /etc/postfix/sender
/^admin@bombshellz\.net$/ OK
/^no-reply@bombshellz\.net$/ OK
/.*/ REJECT "$access_map_reject_code You can't send E-Mails from this server any longer. This is for Admin E-Mails only"

Testing:

telnet 127.0.0.1 smtp
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 relayhost1.bombshellz.net ESMTP Postfix
EHLO test
250-relayhost1.bombshellz.net
250-PIPELINING
250-SIZE
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
MAIL FROM: donts...@test.com
250 2.1.0 Ok
QUIT

Log:
Sep 7 16:35:56 nemesis postfix/smtpd[10960]: connect from localhost[127.0.0.1] Sep 7 16:35:56 nemesis postfix/smtpd[10960]: match_hostname: localhost ~? 127.0.0.1 Sep 7 16:35:56 nemesis postfix/smtpd[10960]: match_hostaddr: 127.0.0.1 ~? 127.0.0.1 Sep 7 16:35:56 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 220 relayhost1.bombshellz.net ESMTP Postfix Sep 7 16:35:56 nemesis postfix/smtpd[10960]: xsasl_cyrus_server_create: SASL service=smtp, realm=(null)
Sep  7 16:35:56 nemesis postfix/smtpd[10960]: name_mask: noanonymous
Sep  7 16:35:56 nemesis postfix/smtpd[10960]: watchdog_pat: 0x605f963b80
Sep 7 16:35:56 nemesis postfix/smtpd[10960]: vstream_fflush_some: fd 24 flush 45 Sep 7 16:36:04 nemesis postfix/smtpd[10960]: vstream_buf_get_ready: fd 24 got 11 Sep 7 16:36:04 nemesis postfix/smtpd[10960]: < localhost[127.0.0.1]: EHLO test Sep 7 16:36:04 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250-relayhost1.bombshellz.net Sep 7 16:36:04 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250-PIPELINING Sep 7 16:36:04 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250-SIZE Sep 7 16:36:04 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250-VRFY Sep 7 16:36:04 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250-ETRN Sep 7 16:36:04 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250-STARTTLS Sep 7 16:36:04 nemesis postfix/smtpd[10960]: match_list_match: localhost: no match Sep 7 16:36:04 nemesis postfix/smtpd[10960]: match_list_match: 127.0.0.1: no match Sep 7 16:36:04 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250-AUTH PLAIN LOGIN Sep 7 16:36:04 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250-ENHANCEDSTATUSCODES Sep 7 16:36:04 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250-8BITMIME Sep 7 16:36:04 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250 DSN
Sep  7 16:36:04 nemesis postfix/smtpd[10960]: watchdog_pat: 0x605f963b80
Sep 7 16:36:04 nemesis postfix/smtpd[10960]: vstream_fflush_some: fd 24 flush 161 Sep 7 16:36:21 nemesis postfix/smtpd[10960]: vstream_buf_get_ready: fd 24 got 30 Sep 7 16:36:21 nemesis postfix/smtpd[10960]: < localhost[127.0.0.1]: MAIL FROM: donts...@test.com Sep 7 16:36:21 nemesis postfix/smtpd[10960]: extract_addr: input: donts...@test.com Sep 7 16:36:21 nemesis postfix/smtpd[10960]: smtpd_check_addr: addr=donts...@test.com Sep 7 16:36:21 nemesis postfix/smtpd[10960]: connect to subsystem private/rewrite
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: event_enable_read: fd 25
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: event_extend: fd 25
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: event_request_timer: set 0x38bb968ef96 0x605f964030 5 Sep 7 16:36:21 nemesis postfix/smtpd[10960]: event_request_timer: set 0x38bb968efbe 0x605f964030 1000
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: send attr request = rewrite
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: send attr rule = local
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: send attr address = donts...@test.com Sep 7 16:36:21 nemesis postfix/smtpd[10960]: vstream_fflush_some: fd 25 flush 54 Sep 7 16:36:21 nemesis postfix/smtpd[10960]: vstream_buf_get_ready: fd 25 got 35 Sep 7 16:36:21 nemesis postfix/smtpd[10960]: private/rewrite socket: wanted attribute: flags
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute name: flags
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute value: 0
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: private/rewrite socket: wanted attribute: address
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute name: address
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: input attribute value: donts...@test.com Sep 7 16:36:21 nemesis postfix/smtpd[10960]: private/rewrite socket: wanted attribute: (list terminator)
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute name: (end)
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: rewrite_clnt: local: donts...@test.com -> donts...@test.com Sep 7 16:36:21 nemesis postfix/smtpd[10960]: event_request_timer: reset 0x38bb968ef96 0x605f964030 5
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: send attr request = resolve
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: send attr sender =
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: send attr address = donts...@test.com Sep 7 16:36:21 nemesis postfix/smtpd[10960]: vstream_fflush_some: fd 25 flush 51 Sep 7 16:36:21 nemesis postfix/smtpd[10960]: vstream_buf_get_ready: fd 25 got 93 Sep 7 16:36:21 nemesis postfix/smtpd[10960]: private/rewrite socket: wanted attribute: flags
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute name: flags
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute value: 0
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: private/rewrite socket: wanted attribute: transport Sep 7 16:36:21 nemesis postfix/smtpd[10960]: input attribute name: transport
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute value: smtp
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: private/rewrite socket: wanted attribute: nexthop
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute name: nexthop
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: input attribute value: [mail.bombshellz.net] Sep 7 16:36:21 nemesis postfix/smtpd[10960]: private/rewrite socket: wanted attribute: recipient Sep 7 16:36:21 nemesis postfix/smtpd[10960]: input attribute name: recipient Sep 7 16:36:21 nemesis postfix/smtpd[10960]: input attribute value: donts...@test.com Sep 7 16:36:21 nemesis postfix/smtpd[10960]: private/rewrite socket: wanted attribute: flags
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute name: flags
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute value: 4096
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: private/rewrite socket: wanted attribute: (list terminator)
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: input attribute name: (end)
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: resolve_clnt: `' -> `donts...@test.com' -> transp=`smtp' host=`[mail.bombshellz.net]' rcpt=`donts...@test.com' flags= class=default Sep 7 16:36:21 nemesis postfix/smtpd[10960]: ctable_locate: install entry key donts...@test.com Sep 7 16:36:21 nemesis postfix/smtpd[10960]: extract_addr: in: donts...@test.com, result: donts...@test.com Sep 7 16:36:21 nemesis postfix/smtpd[10960]: fsspace: .: block size 4096, blocks free 1357287 Sep 7 16:36:21 nemesis postfix/smtpd[10960]: smtpd_check_queue: blocks 4096 avail 1357287 min_free 0 msg_size_limit 0 Sep 7 16:36:21 nemesis postfix/smtpd[10960]: > localhost[127.0.0.1]: 250 2.1.0 Ok
Sep  7 16:36:21 nemesis postfix/smtpd[10960]: watchdog_pat: 0x605f963b80
Sep 7 16:36:21 nemesis postfix/smtpd[10960]: vstream_fflush_some: fd 24 flush 14

I am missing something here for this not to work properly and not quite sure what it is?

Best Regards


Reply via email to