PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > comp.mail.sendmail > Rejecting Mail From X to Y
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.sendmail Configuring and using the BSD sendmail agent.

Rejecting Mail From X to Y

Réponse
 
LinkBack Outils de la discussion
Vieux 21/03/2008, 17h32   #1
Roberto Ullfig
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Rejecting Mail From X to Y

I think this is out of the realm of sendmail itself but is there a way
to configure it so that mail from <> to a certain user is rejected
outright at the smtp layer. We have some issues with users being the
subject of reverse spam attacks. We can deal with the mail during
mailbox delivery but we wish to block at the gateway. We also use
spamassassin and mimedefang so we can probably put such a rejection
there if sendmail itself cannot be configured. Has anyone configured
this in mimedefang?
  Réponse avec citation
Vieux 21/03/2008, 23h39   #2
David F. Skoll
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rejecting Mail From X to Y

Roberto Ullfig wrote:

> I think this is out of the realm of sendmail itself but is there a way
> to configure it so that mail from <> to a certain user is rejected
> outright at the smtp layer. We have some issues with users being the
> subject of reverse spam attacks. We can deal with the mail during
> mailbox delivery but we wish to block at the gateway. We also use
> spamassassin and mimedefang so we can probably put such a rejection
> there if sendmail itself cannot be configured. Has anyone configured
> this in mimedefang?


It's really easy. Something like this:

sub filter_recipient
{
my($recipient, $sender, $rest_of_the_junk) = @_;
if ($sender eq <> && (
$recipient eq '<person1@example.com>' ||
$recipient eq '<person2@example.com>' ||
$recipient eq '<person3@example.com>')) {
return ('REJECT', 'Unwanted backscatter... sorry');
}
return ('CONTINUE', 'OK');
}

You can obviously clean up the logic, and may need to do canonicalization
on recipient addresses to account for upper/lower-case variations, but
the idea is simple.

Regards,

David.
  Réponse avec citation
Vieux 21/03/2008, 23h40   #3
David F. Skoll
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rejecting Mail From X to Y

David F. Skoll wrote:

Oops... I missed a couple of important quotation marks...

sub filter_recipient
{
my($recipient, $sender, $rest_of_the_junk) = @_;
if ($sender eq '<>' && (
$recipient eq '<person1@example.com>' ||
$recipient eq '<person2@example.com>' ||
$recipient eq '<person3@example.com>')) {
return ('REJECT', 'Unwanted backscatter... sorry');
}
return ('CONTINUE', 'OK');
}

-- David.
  Réponse avec citation
Vieux 22/03/2008, 03h25   #4
D. Stussy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rejecting Mail From X to Y

"Roberto Ullfig" <rullfig@uic.edu> wrote in message
news:810b1fbc-7980-4c20-a0b9-8c0a5ead5072@t54g2000hsg.googlegroups.com...
> I think this is out of the realm of sendmail itself but is there a way
> to configure it so that mail from <> to a certain user is rejected
> outright at the smtp layer. We have some issues with users being the
> subject of reverse spam attacks. We can deal with the mail during
> mailbox delivery but we wish to block at the gateway. We also use
> spamassassin and mimedefang so we can probably put such a rejection
> there if sendmail itself cannot be configured. Has anyone configured
> this in mimedefang?


As an alternative to the other response, look into the "compat" feature for
the access file. It specifies sender and recipient pairs.


  Réponse avec citation
Vieux 22/03/2008, 03h34   #5
David F. Skoll
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rejecting Mail From X to Y

D. Stussy wrote:

> As an alternative to the other response, look into the "compat"
> feature for the access file. It specifies sender and recipient
> pairs.


That's a much superior solution if you aren't already using MIMEDefang
for other things. MIMEDefang is a rather heavyweight solution.

If you are already using MIMEDefang for other things, you need to
decide which is easier to maintain and extend (Perl or Sendmail rules
and tables), and that really depends on your taste and needs. I tend
to go the Perl route because I'm more of a programmer than a Sendmail
cf guru. :-)

Regards,

David.
  Réponse avec citation
Vieux 23/03/2008, 16h21   #6
Andrzej Adam Filip
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rejecting Mail From X to Y

"D. Stussy" <spam@bde-arc.ampr.org> wrote:

> "Roberto Ullfig" <rullfig@uic.edu> wrote in message
> news:810b1fbc-7980-4c20-a0b9-8c0a5ead5072@t54g2000hsg.googlegroups.com...
>> I think this is out of the realm of sendmail itself but is there a way
>> to configure it so that mail from <> to a certain user is rejected
>> outright at the smtp layer. We have some issues with users being the
>> subject of reverse spam attacks. We can deal with the mail during
>> mailbox delivery but we wish to block at the gateway. We also use
>> spamassassin and mimedefang so we can probably put such a rejection
>> there if sendmail itself cannot be configured. Has anyone configured
>> this in mimedefang?

>
> As an alternative to the other response, look into the "compat" feature for
> the access file. It specifies sender and recipient pairs.


http://www.sendmail.org/m4/features.html#compat_check
<quote>
compat_check Enable ruleset check_compat to look up pairs of
addresses with the Compat: tag -- Compat:sender<@>recipient -- in the
access map. Valid values for the RHS include
* DISCARD: silently discard recipient
* TEMP: return a temporary error
* ERROR: return a permanent error

In the last two cases, a 4xy/5xy SMTP reply code should follow the
colon.
</quote>

--
[pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/
If you are going to run a rinky-dink distro made by a couple of
volunteers, why not run a rinky-dink distro made by a lot of volunteers?
-- Jaldhar H. Vyas on debian-devel
  Réponse avec citation
Vieux 24/03/2008, 15h48   #7
Grant Taylor
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rejecting Mail From X to Y

On 03/23/08 10:21, Andrzej Adam Filip wrote:
> http://www.sendmail.org/m4/features.html#compat_check
> <quote>
> compat_check Enable ruleset check_compat to look up pairs of
> addresses with the Compat: tag -- Compat:sender<@>recipient -- in the
> access map. Valid values for the RHS include
> * DISCARD: silently discard recipient
> * TEMP: return a temporary error
> * ERROR: return a permanent error
>
> In the last two cases, a 4xy/5xy SMTP reply code should follow the
> colon.
> </quote>


I know what the documentation says. However in my tests compat_check
ran after the SMTP session was finished. So even if you send an error
(temporary or permanent) the SMTP session still saw that the message was
accepted.

In short, do some serious testing of this before you rely on it.



Grant. . . .

  Réponse avec citation
Vieux 24/03/2008, 17h16   #8
Andrzej Adam Filip
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rejecting Mail From X to Y

Grant Taylor <gtaylor@riverviewtech.net> wrote:

> On 03/23/08 10:21, Andrzej Adam Filip wrote:
>> http://www.sendmail.org/m4/features.html#compat_check
>> <quote>
>> compat_check Enable ruleset check_compat to look up pairs of
>> addresses with the Compat: tag -- Compat:sender<@>recipient -- in the
>> access map. Valid values for the RHS include
>> * DISCARD: silently discard recipient
>> * TEMP: return a temporary error
>> * ERROR: return a permanent error
>>
>> In the last two cases, a 4xy/5xy SMTP reply code should follow the
>> colon.
>> </quote>

>
> I know what the documentation says. However in my tests compat_check
> ran after the SMTP session was finished. So even if you send an error
> (temporary or permanent) the SMTP session still saw that the message
> was accepted.
>
> In short, do some serious testing of this before you rely on it.


Thank you for pointing out I have quoted misleading documentation
*without* making it less misleading.

--
[pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/
Example is not the main thing in influencing others. It is the only thing.
-- Albert Schweitzer
  Réponse avec citation
Vieux 24/03/2008, 17h45   #9
Grant Taylor
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rejecting Mail From X to Y

On 03/24/08 11:16, Andrzej Adam Filip wrote:
> Thank you for pointing out I have quoted misleading documentation
> *without* making it less misleading.


I'm sorry for being misleading. I was trying to make others aware that
things were *not as they seem* *prior* to someone depending on them.

Rather than stating false information I was stating what limited
information I had (/ have) available at the (/ this) time.

My previous testing on the "compat_check" / "check_compat" ruleset and /
or routine did not behave as you might think. My testing was along the
lines of recipient does not want messages from sender and to return a
specific error to that effect. However the message was refused at the
SMTP level with a generic non descript error that was not what I wanted
returned.

I'm sorry that I don't have more details than that as it has been more
than a year since I tried. At the point in time that I found that the
error message was the generic non descript I found a different solution
to my needs.



Grant. . . .

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 08h29.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,19250 seconds with 17 queries