>> From: Victor.Duchovni@
>> On Thu, May 14, 2009 at 12:42:01PM -0500, Noel Jones wrote:
>>
>>> wiskbr...@hotmail.com wrote:
>>>>>> Here are the contents of my /etc/postfix/blocked_senders file:
>>>>>>
>>>>>> "operator#...@somephishingbanksite\.com" REJECT
>>>>> The above line is the wrong syntax and will never match
>>>>> anything. Wildcards are not allowed in dbm or other indexed
>>>>> files, and quotes should never be used.
>>>> I am almost certain that it has already worked in the past, I'll check.
>>>> Otherwise, any suggestions for where and how to implement such a rule?
>>>
>>> Here's an example using a regexp table instead of the dbm table for those
>>> two statements. It's also acceptable to use multiple check_sender_access
>>> statements if that fits your needs better.
>>>
>>> # main.cf
>>> smtpd_recipient_restrictions =
>>> permit_mynetworks
>>> reject_unauth_destination
>>> check_sender_access regexp:/etc/psotfix/senders.pcre
>>> ... other stuff ...
>>>
>>>
>>> # senders.pcre
>>> /operator#...@somephishingbanksite\.com$/ REJECT phishing
>>> /@mydomain\.com$/ 554 mydomain.com sender? But you're not!
>>
>> Does "regexp" support "\d+"? It looks like PCRE to me... So the
>> table prefix should be "pcre:" not "regexp:".
>
>
> Viktor, as usual, your insight and help is invaluable. Thank you.
>
> I now have a new problem, not sure if it is related to the changes that I've
> made to allow the above to block inbound from my own domain.
>
> I am now unable to receive inbound email to a valid local user, where the
> local users alias entry contains a pipe to execute a script, i.e. "userX:
> |/some/script"
>
> Now I get: Recipient address rejected: User unknown in local recipient table
>
> This particular users address contains "+" signs, and is defined this way in
> main.cf:
> recipient_delimiter = +
>
> Is this still supported?
My problem was that my main.cf, although stating the aliases map with:
alias_database = dbm:/etc/postfix/aliases
alias_maps = dbm:/etc/postfix/aliases
Was actually using /etc/aliases. Not sure why, I've just deleted the /etc one
and sym-linked the /etc/postfix/aliases to /etc/aliases.
.vp