From: Patric Falinder on
Hi,

Maybe I'm to lazy or I'm just blind, but is it possible in an easy way
to allow a specific IP to send mail etc without username and password? I
use sasl authentication on my postfix machine and I want a outside
IP-address to be able to send e-mails without logging in.


Thanks,
Patric

From: Charles Marcus on
On 2010-04-26 5:59 AM, Patric Falinder wrote:
> Maybe I'm to lazy or I'm just blind, but is it possible in an easy way
> to allow a specific IP to send mail etc without username and password? I
> use sasl authentication on my postfix machine and I want a outside
> IP-address to be able to send e-mails without logging in.

Add the IP to $mynetworks

http://www.postfix.org/postconf.5.html#mynetworks

and put $mynetworks before permit_sasl_authenticated in
smtpd_recipient_restrictions

http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions

E.g.:

smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination

--

Best regards,

Charles

From: Ansgar Wiechers on
On 2010-04-26 Patric Falinder wrote:
> Maybe I'm to lazy or I'm just blind, but is it possible in an easy way
> to allow a specific IP to send mail etc without username and password?
> I use sasl authentication on my postfix machine and I want a outside
> IP-address to be able to send e-mails without logging in.

I suppose you're talking about relaying through your MTA.

mynetworks = ..., a.b.c.d/32

You need to permit_mynetworks in smtpd_*_restrictions (this is the
default).

Regards
Ansgar Wiechers
--
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky

From: Patric Falinder on
Charles Marcus skrev 2010-04-26 12:07:
> On 2010-04-26 5:59 AM, Patric Falinder wrote:
>> Maybe I'm to lazy or I'm just blind, but is it possible in an easy way
>> to allow a specific IP to send mail etc without username and password? I
>> use sasl authentication on my postfix machine and I want a outside
>> IP-address to be able to send e-mails without logging in.
>
> Add the IP to $mynetworks
>
> http://www.postfix.org/postconf.5.html#mynetworks
>
> and put $mynetworks before permit_sasl_authenticated in
> smtpd_recipient_restrictions
>
> http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions
>
> E.g.:
>
> smtpd_recipient_restrictions = permit_mynetworks,
> permit_sasl_authenticated, reject_unauth_destination
>
ah I don't know why I didn't think of that! But thanks it worked great :)


Thanks,
Patric

From: Charles Marcus on
On 2010-04-26 7:09 AM, Patric Falinder wrote:
>> smtpd_recipient_restrictions = permit_mynetworks,
>> permit_sasl_authenticated, reject_unauth_destination

> ah I don't know why I didn't think of that! But thanks it worked great :)

Caveat: is this IP one that you control? If not - ie, if it is a static
IP of one of your users, you'll need to always be aware of if/when it no
longer should be considered part of $mynetworks...

--

Best regards,

Charles