Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PREPEND not always working in smtpd_*_restrictions

4 views
Skip to first unread message

Nicolas Grekas - IntellAgence

unread,
Nov 4, 2009, 4:36:22 AM11/4/09
to
I'm seeing a strange behavior of postfix with PREPEND not doing
anything on some conditions.
So, lets say I want to add a header to every message based on the
sender. I do :

main.cf :
smtpd_sender_restriction = check_sender_access pcre:/etc/postfix/
tag_sender

/etc/postfix/tag_sender :
/./ PREPEND X-Null-Sender: Yes

Then, when I send a message to my postfix server with my regular mail
client, it works.
BUT
when I send the message directly using telnet, writting a very simple
SMTP session by hand, no header is prepended ?!
HELO toto.com
MAIL FROM: to...@toto.com
RCPT TO: postmaster
DATA
Subject: Test toto
.
QUIT

=> mail is delivered, but no header is added.

WHY ?!

0 new messages