There's no single-line option that would enable this, but you can do it with
configuration directories. For example, if you host both acme.com and
franz.com, you could create a configuration directory like this:
.../_recipient_/com
Then create a file named .../_recipient_/com/acme that contains this line:
[email protected]
And a file named .../_recipient_/com/franz that contains the line:
[email protected]
That would prevent [email protected] from emailing [email protected] but it would not
prevent [email protected] from emailing [email protected]. Any clients who
authenticate would be able to bypass this restriction of course. It should be
very easy to create a script to create those directories and files.
The other way to do it would be to modify filter_identical_from_to() in
filter.c to ignore the user part of the address. That should be very easy,
just change line 2848 (version 4.3.1) to this:
if (strncmp(current_settings->sender_domain,
current_settings->recipient_domain,
MAXVAL(strlen(current_settings->sender_domain),
strlen(current_settings->recipient_domain))) == 0)
Then recompile and replace the spamdyke binary. WARNING: I checked to make
sure this will compile but I haven't tested it at all, so be very careful when
deploying it.
-- Sam Clippinger
On Sep 6, 2012, at 6:23 AM, Hartmut Wernisch | Domaintechnik.at wrote:
> Hello!
>
>
> On 06 Sep 12, Eduard Svarc wrote:
>> [email protected] wrote on 06.09.2012 10:22:55:
>>
>>> "Hartmut Wernisch | Domaintechnik.at" <[email protected]>
>>> Sent by: [email protected]
>>>
>>> Hello!
>>>
>>> There is already a way to block identical sender and recipients with
>>> spamdyke. I think it would also be fine to have this for the domain
>> part:
>>>
>>> Deny if from: [email protected] to: [email protected]
>>
>> this is already in, simply put @domain.tld in file pointed by
>> spamdyke.conf with keyword sender-blacklist-file=, or use keyword
>> sender-blacklist=. If you use format with leading @ it will block all
>> mails from above line.
>>
>> You can then put sender from web-script into sender-whitelist-file and
>> that particular sender will goes thru even you have above blacklist entry.
>> White-list is tested before blacklist. When you allow once rest of flow
>> for validating sender is skipped. Or you can use IP whitelist for your WEB
>> server from where you getting e-mail in form "from: @your-domain to:
>> @your-domain"
>
> My intention it to have the same like now for
> identical sender/recipients (DENIED_IDENTICAL_SENDER_RECIPIENT) but for
> only the domain part.
> I don't want to put all my domains into the sender-blacklist-file which
> would be ok for private use or small servers, but not for service
> providers.
> This addition should be easy as the DENIED_IDENTICAL_SENDER_RECIPIENT
> already exists, therefor it's almost the same code which has to be
> copied in the source (or stripping the mailbox part of
> DENIED_IDENTICAL_SENDER_RECIPIENT code as a quick fix).
>
> Best,
> Hartmut
> _______________________________________________
> spamdyke-users mailing list
> [email protected]
> http://www.spamdyke.org/mailman/listinfo/spamdyke-users
_______________________________________________
spamdyke-users mailing list
[email protected]
http://www.spamdyke.org/mailman/listinfo/spamdyke-users