header_checks usage
Hi all, I have defined header_checks test. Question why it works if I' testing it locally and doesn't work when I do my test via smtp? this is simple definition in/etc/postfix/ /^Received:/IGNORE !/^To: [0-9]+@/ WARN# any message to non-digital accounts should be dropped example of good work: I did it from the same host where postfix works: postfix]# echo test | mail 1...@mydomain.com log file entries: postfix/pickup[7519]: 37347481CE: uid=0 from= postfix/cleanup[7525]: 37347481CE: message-id=<20090811004031.3734748...@mydomain.com> postfix/nqmgr[7520]: 37347481CE: from=, size=187, nrcpt=1 (queue active) postfix/local[7527]: 37347481CE: to=, orig_to=<1...@mydomain.com>, relay=local, delay=1, status=sent (mailbox) postfix]# echo test | mail ta...@mydomain.com postfix/pickup[7519]: 86E27481CE: uid=0 from= postfix/cleanup[7532]: 86E27481CE: warning: header To: ta...@mydomain.com from local; from= to=: some errors postfix/cleanup[7532]: 86E27481CE: message-id=<20090811004225.86e2748...@mydomain.com> postfix/nqmgr[7520]: 86E27481CE: from=, size=189, nrcpt=1 (queue active) postfix/local[7533]: 86E27481CE: to=, relay=local, delay=0, status=sent (mailbox) not successful example: did it from other host test]# telnet 192.168.11.129 25 Trying 192.168.11.129... Connected to 192.168.11.129. Escape character is '^]'. 220 mydomain.com ESMTP Postfix helo taphy 250 mydomain.com mail from: t...@do.test 250 Ok rcpt to: ta...@mydomain.com 250 Ok data 354 End data with . test . 250 Ok: queued as 54B33481CE quit 221 Bye Connection closed by foreign host. logfile entries (nothing was done at all by header_checks..): postfix/smtpd[7540]: connect from unknown[192.168.11.1] postfix/smtpd[7540]: 54B33481CE: client=unknown[192.168.11.1] postfix/cleanup[7542]: 54B33481CE: message-id=<20090811005124.54b3348...@mydomain.com> postfix/nqmgr[7520]: 54B33481CE: from=, size=169, nrcpt=1 (queue active) postfix/local[7544]: 54B33481CE: to=, relay=local, delay=13, status=sent (mailbox) postfix/smtpd[7540]: disconnect from unknown[192.168.11.1] Many thanks in advance for any suggestions -- View this message in context: http://www.nabble.com/header_checks-usage-tp24910095p24910095.html Sent from the Postfix mailing list archive at Nabble.com.
Re: header_checks usage
Hi Sahil, thanks for your reply, it is very much appreciated :) definitely need read manuals more accurate.. (so it is working) -- View this message in context: http://www.nabble.com/header_checks-usage-tp24910095p24911219.html Sent from the Postfix mailing list archive at Nabble.com.
smtpd_recipient_restrictions sequence
Hi all, I'm not so experienced in dealing with postfix unfortunately and not sure if I'm not breaking something in my security with applying next smtpd_recipient_restrictions & etc (warn_if_reject - for testing period only, will remove it later): unknown_local_recipient_reject_code = 450 smtp_use_tls = yes smtpd_use_tls = no smtpd_tls_key_file = /etc/postfix/TLS/myhost.key smtpd_tls_cert_file = /etc/postfix/TLS/myhost.crt.selfsigned smtpd_tls_CAfile = /etc/postfix/TLS/myhost.crt.selfsigned smtpd_tls_loglevel = 2 smtpd_tls_received_header = yes smtpd_sender_restrictions = permit_mynetworks, check_sender_access hash:/etc/postfix/sender_checks, smtpd_recipient_restrictions = warn_if_reject check_recipient_access regexp:/etc/postfix/recipient.regexp, permit_mynetworks, reject_unauth_destination, warn_if_reject reject_unknown_sender_domain, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, permit smtpd_helo_restrictions = warn_if_reject reject_invalid_hostname, smtpd_require_helo = yes default_destination_concurrency_limit = 10 default_process_limit = 50 in /etc/postfix/sender_checks: myhost.myfirstdomain.net REJECT localhost REJECT in /etc/postfix/recipient.regexp something like that (real regexp works ok, no problem): !/(^postmaster|^support|^(\+)?[0-9]+)@myseconddomain|(.*)@(myhost\.)?myfirstdomain/ 550 illegal recipient questions: How does check_recipient_access work in case of no matches for message were found in /etc/postfix/recipient.regexp: will such message be considered as ok and sent to recipient immediately or will pass further through the rest chain of rules in smtpd_recipient_restrictions? Also I still have no clear understanding what does permit_mynetworks exactly mean in the context of smtpd_recipient_restrictions - is it allowance to send TO any of my networks or send FROM any of my networks? (in other words is "mynetworks" = sender or "mynetworks"= rcpt here) the last question ( :) sorry for asking a lot ) - can I just silently drop messages with /etc/postfix/recipient.regexp without sending anything back to unsuccessful sender? Many thanks for any reply! Tatiana -- View this message in context: http://www.nabble.com/smtpd_recipient_restrictions-sequence-tp24959160p24959160.html Sent from the Postfix mailing list archive at Nabble.com.
strip some information from return path:
Hi all, are there any way to remove some information from Return path: header (message received from remote smtp client) ? for example need change: Return-Path: to Return-Path: many thanks for any reply Tatiana -- View this message in context: http://www.nabble.com/strip-some-information-from-return-path%3A-tp24999512p24999512.html Sent from the Postfix mailing list archive at Nabble.com.