Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Disable sending mail

38 views
Skip to first unread message

Bryce Fischer

unread,
Jan 17, 2006, 11:17:05 AM1/17/06
to
I would like to setup Postfix to receive mail only, not allowing any
outgoing mail. I'm having difficulty figuring out how to do this. Do I
just put:

smtpd_recipient_restrictions = reject

Thanks

Ralf Hildebrandt

unread,
Jan 17, 2006, 11:22:25 AM1/17/06
to
* Bryce Fischer <br...@berzerker-soft.com>:

> I would like to setup Postfix to receive mail only, not allowing any
> outgoing mail.

Define outgoing.

> I'm having difficulty figuring out how to do this. Do I just put:
> smtpd_recipient_restrictions = reject

No, that blocks all INCOMING mail

--
Ralf Hildebrandt (Ralf.Hil...@charite.de) spam...@charite.de
Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155
http://www.postfix-buch.com
I am your darkest, gibbering, omnipresent sweaty, shivering nightmare,
made real. There. Feel better? Now you know how evil I am, we can get
down to business.

Bryce Fischer

unread,
Jan 17, 2006, 11:27:11 AM1/17/06
to
I want to use my postfix (for now) to receive emails but not be able to send.


On 1/17/06, Ralf Hildebrandt <Ralf.Hil...@charite.de> wrote:
> * Bryce Fischer <br...@berzerker-soft.com>:


>
> > I would like to setup Postfix to receive mail only, not allowing any
> > outgoing mail.
>

> Define outgoing.


>
> > I'm having difficulty figuring out how to do this. Do I just put:
> > smtpd_recipient_restrictions = reject
>

Cami

unread,
Jan 17, 2006, 11:27:31 AM1/17/06
to

If its people that are on the same network (ie, mail that
is not generated locally via /usr/sbin/sendmail) then just
remove the hosts/networks out of your mynetworks.

Cami

Daniel Davidson

unread,
Jan 17, 2006, 11:32:14 AM1/17/06
to
I have not tried it before, but wouldnt setting mynetworks_style to
subnet and mynetworks to 127.0.0.0/8 basically take care of that if you
only permit mynetworks in smtpd_recipient_restrictions?

Dan


On Tue, 2006-01-17 at 11:27 -0500, Bryce Fischer wrote:
> I want to use my postfix (for now) to receive emails but not be able to send.
>
>
> On 1/17/06, Ralf Hildebrandt <Ralf.Hil...@charite.de> wrote:
> > * Bryce Fischer <br...@berzerker-soft.com>:
> >

> > > I would like to setup Postfix to receive mail only, not allowing any
> > > outgoing mail.
> >

> > Define outgoing.


> >
> > > I'm having difficulty figuring out how to do this. Do I just put:
> > > smtpd_recipient_restrictions = reject
> >

Bryce Fischer

unread,
Jan 17, 2006, 11:33:41 AM1/17/06
to
On 1/17/06, Cami <ca...@mweb.co.za> wrote:
> If its people that are on the same network (ie, mail that
> is not generated locally via /usr/sbin/sendmail) then just
> remove the hosts/networks out of your mynetworks.

Thanks Cami,

mynetworks is currently set to the default. Is it possible to set it
to an empty/null value?

Ralf Hildebrandt

unread,
Jan 17, 2006, 11:35:18 AM1/17/06
to
> mynetworks is currently set to the default. Is it possible to set it
> to an empty/null value?

Why not set it to 127.0.0.1/32?

--
Ralf Hildebrandt (Ralf.Hil...@charite.de) spam...@charite.de
Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155
http://www.postfix-buch.com

Due to a lack of imagination, this signature will remain under
construction indefinitely.

Bryce Fischer

unread,
Jan 17, 2006, 11:41:12 AM1/17/06
to
On 1/17/06, Ralf Hildebrandt <Ralf.Hil...@charite.de> wrote:
> > mynetworks is currently set to the default. Is it possible to set it
> > to an empty/null value?
>
> Why not set it to 127.0.0.1/32?

I'm trying to disable local emailing, or at least any email that
hasn't been authenticated using SASL.

Ralf Hildebrandt

unread,
Jan 17, 2006, 11:43:29 AM1/17/06
to
* Bryce Fischer <br...@berzerker-soft.com>:

Then you'd have to disable sendmail as well

--
Ralf Hildebrandt (Ralf.Hil...@charite.de) spam...@charite.de
Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155
http://www.postfix-buch.com

Of course it doesn't work, but look how fast it is!
-- fefe

Bryce Fischer

unread,
Jan 17, 2006, 11:45:43 AM1/17/06
to
On 1/17/06, Ralf Hildebrandt <Ralf.Hil...@charite.de> wrote:
> * Bryce Fischer <br...@berzerker-soft.com>:
> > On 1/17/06, Ralf Hildebrandt <Ralf.Hil...@charite.de> wrote:
> > > > mynetworks is currently set to the default. Is it possible to set it
> > > > to an empty/null value?
> > >
> > > Why not set it to 127.0.0.1/32?
> >
> > I'm trying to disable local emailing, or at least any email that
> > hasn't been authenticated using SASL.
>
> Then you'd have to disable sendmail as well

That's fine, as long as mail can still be received for local recipients...

Victor Duchovni

unread,
Jan 17, 2006, 11:51:08 AM1/17/06
to

This is not possible, anyone who can submit mail to local users via
sendmail(1), can also submit mail to remote users. The best you can do
is make all remote destinations bounce back to the local sender.

default_transport = error:External deliveries disabled

This breaks bounces, so you need a separate Postfix instance for local
delivery and incoming mail. The default (/etc/postfix) instance should
be for local delivery and not run smtpd, while the inbound instance
(/etc/postfix-in) should accept only mail for local recipients.

--
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majo...@postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

mouss

unread,
Jan 17, 2006, 5:34:45 PM1/17/06
to
Victor Duchovni a écrit :

>
> This is not possible, anyone who can submit mail to local users via
> sendmail(1), can also submit mail to remote users. The best you can do
> is make all remote destinations bounce back to the local sender.
>
> default_transport = error:External deliveries disabled
>
> This breaks bounces, so you need a separate Postfix instance for local
> delivery and incoming mail. The default (/etc/postfix) instance should
> be for local delivery and not run smtpd, while the inbound instance
> (/etc/postfix-in) should accept only mail for local recipients.
>

Can't he do this:

- remove permit_mynetworks so that nobody can "relay"

- use an empty map for authorized_submit_mumble so that sendmail doesn't
alow anybody.


Victor Duchovni

unread,
Jan 17, 2006, 5:36:25 PM1/17/06
to
On Tue, Jan 17, 2006 at 11:34:45PM +0100, mouss wrote:

> Victor Duchovni a ?crit :

No, because he wants local users to be able to use sendmail(1) to send to
other local users. So all remote deliveries must bounce, but this breaks
bounces for local delivery failures, so two MTA instances are required,
one for local submission and another for remote to MX delivery.

0 new messages