Anton Melser wrote:
...
how does the application send mail?
It's via the php mail function, which I believe just uses a
$ sendmail blablah...
internally (ie, it gets sent by postfix).
smtpd restrictions don't apply to sendmail submission. you can however
force such mail into smtpd by adding
-o content_filter=smtp:[127.0.0.1]:25
under the pickup service. but make sure sendmail is not used later in
the chain (for example when forwarding or reinjecting mail that was
already received), because this will cause a loop.
An alternative is to use header_checks if you are certain that only your
application generates some headers/values. for example
/^From:.*<[EMAIL PROTECTED]>/ REDIRECT [EMAIL PROTECTED]
but make sure that mail generated by your test application matches this,
and make sure no other mail does.
if it's with smtp, then use REDIRECT or FILTER in an smtpd restriction
check.
but it's better to let the application use a specific postfix instance that
does never send mail.
Can someone point me to a gentle introduction to postfix
configuration? I'm obviously pretty stupid and just can't work out how
to do anything... putting
[EMAIL PROTECTED] REDIRECT [EMAIL PROTECTED]
into /etc/postfix/access (with a postmap /etc/postfix/access and
restart of the daemon)
does nothing (or rather [EMAIL PROTECTED] still gets the message). There
are so many files,
/etc/postfix/access is not used unless you enable it. postfix
configuration is driven by main.cf and master.cf. the other files that
you see are maps called from main.cf or master.cf. for example
smtpd_sender_restrictions =
check_sender_access hash:/etc/postfix/sender_access
and put your "add1...." in sender_access (and postmap it).
when you modify main.cf or master.cf, do a "postfix reload" (very few
changes require restarting postfix).
and so many configuration options I'm just getting
lost. It seems as though there are about 10 different ways to do what
I want but I couldn't find a single example that worked... Any further
pointers most welcome.
what you want to do is not common. this is why you didn't find examples.
but you can learn more about access restrictions in
http://www.postfix.org/SMTPD_ACCESS_README.html
for other stuff, bookmark:
http://www.postfix.org/documentation.html