|
|
|
|
||||||
| comp.mail.sendmail Configuring and using the BSD sendmail agent. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
There is a bit about mimedefang that I haven't got a grasp over and I haven't
managed to find an answer to what I'm trying to do, even if I have tried my best at the mimedefang site and the wiki and of course google.com. Of course I could join the maillist and ask there, but I'm all to lazy to join a maillist for one question, so I hope someone here could push me in the right direction. I have a somewhat modified filter_end which uses spamassassin to scan the mail and I have added a check where I bounce the mail at once if the result is all to high. if ($hits >= 3 * $req) { action_bounce("Sorry, we can't accept this spam."); return; } This works fine, but there is a mailserver that forwards mail to me, there aren't any spam prevention on the remote mailserver and I wish to have a lower threshold on mails that are forwarded from that server I would like to do something like this if (($remote=="remote.example.net") && ($hits >= 2 * $req)) { action_bounce("Sorry, we can't accept this spam."); return; } But I'm not sure how I get the ip-name/ip-number of the remote server that delivers the mail in the filter_end stage and I guess it won't just be to modify the sub filter_end { my($entity) = @_; to sub filter_end { my($entity,$ip) = @_; Perl ain't my strong side and unsure about how everything works in mimedefang, I would be happy if someone wrote a simple example how to do what I want, but will be happy even with a link to a page that explains how to access different values in filter_end. Thanks in advance for your . -- //Aho |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
J.O. Aho wrote:
> I would like to do something like this > > if (($remote=="remote.example.net") && ($hits >= 2 * $req)) { > action_bounce("Sorry, we can't accept this spam."); > return; > } > See the mimedefang-filter(5) manpage. GLOBAL VARIABLES SET BY MIMEDEFANG.PL The following global variables are set by mimedefang.pl and are available for use in your filter. All of these variables are always available to filter_begin, filter, filter_multipart and filter_end. In addition, some of them are available in filter_relay, filter_sender or filter_recipient. If this is the case, it will be noted below. [...] $RelayHostname The host name of the relay. This is the name of the host which is attempting to send e-mail to your host. May be "undef" if the host name could not be determined. This variable is available in filter_relay, filter_sender and filter_recipient. $RelayAddr The IP address of the sending relay (as a string consisting of four dot-separated decimal numbers.) One potential use of $RelayAddr is to limit mailing to certain lists to people within your organization. This variable is available in filter_relay, filter_sender and filter_recipient. Regards, Kees. -- Kees Theunissen. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Kees Theunissen wrote:
> J.O. Aho wrote: >> I would like to do something like this >> >> if (($remote=="remote.example.net") && ($hits >= 2 * $req)) { >> action_bounce("Sorry, we can't accept this spam."); >> return; >> } >> > > > See the mimedefang-filter(5) manpage. > > GLOBAL VARIABLES SET BY MIMEDEFANG.PL > $RelayHostname > $RelayAddr Gosh, now I'm feeling stupid, thanks a lot for the . -- //Aho |
|
![]() |
| Outils de la discussion | |
|
|