On Fri, 24 Jul 2015 13:08:42 +0200 Peter <[email protected]> wrote:
> HI guys, > > Till today I was always using one the following method to hold emails > in order to investigate issues with them: > smtpd_sender_restrictions = static:HOLD > smtp_helo_restrictions = static:HOLD > smtp_data_restrictions = static:HOLD > > Today, I also wanted to hold some emails that are being sent from a > PHP application, however, I can not stop them. > > I applied the same method as mentioned above (to client restrictions > and all restrictions possible) and whenever I telnet to the server > manually I get: > > Jul 24 12:40:36 server postfix/smtpd[16437]: NOQUEUE: hold: RCPT from > localhost[127.0.0.1]: <localhost[127.0.0.1]>: Client host triggers > HOLD action; from=<test> to=<test> proto=ESMTP helo=<test> > > which is okay, but when PHP mailer sends an email from localhost I > get: > > Jul 24 12:49:38 server postfix/pickup[16749]: B435A614EF: uid=48 > from=<apache> > Jul 24 12:49:38 server postfix/cleanup[18431]: B435A614EF: > message-id=<20150724104938.B435A614EF@server> > Jul 24 12:49:38 server postfix/qmgr[16750]: B435A614EF: > from=<apache@server>, size=1728, nrcpt=3 (queue active) > (...) > (250 2.0.0 Ok: queued as EF11A20A8E) > Jul 24 12:49:39 server postfix/qmgr[16750]: B435A614EF: removed > > How can I hold these types of emails? What am I doing wrong? > header_checks? http://www.postfix.org/header_checks.5.html main.cf: header_checks = regexp:/etc/postfix/header_checks header_checks: /^From:*apache\@server*/ HOLD from apache localhost
