Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Aug 2003 23:01:03 GMT
From:      Mark <admin@asarian-host.net>
To:        "FreeBSD" <katrina@nightrealmstudios.com>, "FreeBSD-Questions" <freebsd-questions@freebsd.org>
Subject:   Re: POP Before SMTP
Message-ID:  <200308082301.H78N13XU083866@asarian-host.net>
References:  <001701c35de0$d9f845d0$0200000a@chimera>

next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- 
From: "FreeBSD" <katrina@nightrealmstudios.com>
To: "FreeBSD-Questions" <freebsd-questions@freebsd.org>
Sent: Friday, August 08, 2003 10:45 PM
Subject: Re: POP Before SMTP


> Already tried googling of course or I wouldnt have asked here, I'm not
> THAT off  ;P   Most of the searches bring up close to the same
> information that I was using previously which is to simply modify
> the sendmail.cf file with the following information:
>
> ########################################################################
> #
>   Scheck_rcpt
>   R< $+ @ $=w >        $@ OK
>   R$+                  $: $(dequote "" $&{client_addr} $) $| $1
>   R0 $| $*             $@ OK
>   R$* $| $*            $: $(relayers $1 $: ERROR $)
>   RERROR    $#error $@ 5.7.1 $: "550 SMTP relay denied, authenticate via
>   POP/IMAP first"
>   R$*                  $@ OK
>
>
> ########################################################################
>
> This "used" to be the easiest method to setup and would automatically
> enter your IP address into the relayers file and thereby allow you to
> send mail but this does not appear to work with the newer version of
> sendmail so I was wondering if anyone else had any ideas on a simple
> setup like this since a Lot of the sendmail rules have changes since
> I last played with it ;P


Dear Katrina,

Not to be rude, but are you sure you have done this before? :) Or did you,
perchance, edit an existing installation? Because I know of no setup that
"would automatically enter your IP address into the relayers file and
thereby allow you to send mail."

Understand, of course, that sendmail has nothing to do with IP addresses
harvested from POP requests. That little code-snippet from sendmail.cf
relies on an external file, presumably generated by a POP server. It used to
be that patches existed for, say, qpopper, so the POP daemon would log IP
numbers. But, nowadays, if you want POP-before-SMTP, you should really use
DRAC (Dynamic Relay Authorization Control).

This means your first task is to recompile qpopper (if that is your POP
server, of course), for use with DRAC. Say you have it log IP addresses to
/usr/local/etc/dracd.db, then you could edit sendmail.cf as follows. You add
a line that says:

Kdrac btree -o /usr/local/etc/dracd

Then, at the right place, you add:

### The following four lines are for drac.

R$*   $: $&{client_addr}
R$+   $: $(drac $1 $: ? $)
R?   $@ $#error $@ 5.7.1 $: "550 Relaying denied"
R$+   $@ $#OK

Only this way will it go "automatically". :)

Check out:

http://mail.cc.umanitoba.ca/drac/index.html

Having said all that, why not use SMTP AUTH, while you are at it? :)

- Mark



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308082301.H78N13XU083866>