FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-20-2010, 06:01 PM
Adam Hardy
 
Default trying to restrict exim smtp to specific IP

I'm installing stuff onto a vserver which I have just got, and according to the
sysadmin at the hosting provider, due to their set-up, I can't configure exim to
listen on 127.0.0.1, I have to use the given IP address.


In case that doesn't make sense, I mean that I am not supposed to get this
netstat output:


tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN


It should listen like this (or all hell breaks loose on their server farm):

tcp 0 0 10.20.30.40:25 0.0.0.0:* LISTEN

where 10.20.30.40 is the static IP I've been given (which is then NAT'd by the
hosting provider to something else).


My vserver set-up has very simple requirements - I just want the system to send
out emails generated on the system locally, e.g. piping command output to mailx


Any enlightenment much appreciated

Adam


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-20-2010, 06:59 PM
Alex Samad
 
Default trying to restrict exim smtp to specific IP

On Wed, Jan 20, 2010 at 07:01:16PM +0000, Adam Hardy wrote:
> I'm installing stuff onto a vserver which I have just got, and
> according to the sysadmin at the hosting provider, due to their
> set-up, I can't configure exim to listen on 127.0.0.1, I have to use
> the given IP address.
>
> In case that doesn't make sense, I mean that I am not supposed to
> get this netstat output:
>
> tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
>
>
> It should listen like this (or all hell breaks loose on their server farm):
>
> tcp 0 0 10.20.30.40:25 0.0.0.0:* LISTEN
>
> where 10.20.30.40 is the static IP I've been given (which is then
> NAT'd by the hosting provider to something else).
>
> My vserver set-up has very simple requirements - I just want the
> system to send out emails generated on the system locally, e.g.
> piping command output to mailx
>
> Any enlightenment much appreciated
not sure why listening to 127.0.0.1 isn't going to work.

can I suggest if all you want is outbound mail maybe look at nullmailer

>
> Adam
>
>

--
"I think it's important to bring somebody from outside the system, the judicial system, somebody that hasn't been on the bench and, therefore, there's not a lot of opinions for people to look at."

- George W. Bush
10/04/2005
Washington, DC
On the nomination of Harriet Miers to the Supreme Court
 
Old 01-20-2010, 07:06 PM
Camaleón
 
Default trying to restrict exim smtp to specific IP

On Wed, 20 Jan 2010 19:01:16 +0000, Adam Hardy wrote:

Tip: it's better to open a new thread ("new" post instead to "reply") if
you are changing the theme of the e-mail :-)

> I'm installing stuff onto a vserver which I have just got, and according
> to the sysadmin at the hosting provider, due to their set-up, I can't
> configure exim to listen on 127.0.0.1, I have to use the given IP
> address.
>
> In case that doesn't make sense, I mean that I am not supposed to get
> this netstat output:
>
> tcp 0 0 127.0.0.1:25 0.0.0.0:*
> LISTEN
>
>
> It should listen like this (or all hell breaks loose on their server
> farm):
>
> tcp 0 0 10.20.30.40:25 0.0.0.0:*
> LISTEN
>
> where 10.20.30.40 is the static IP I've been given (which is then NAT'd
> by the hosting provider to something else).
>
> My vserver set-up has very simple requirements - I just want the system
> to send out emails generated on the system locally, e.g. piping command
> output to mailx
>
> Any enlightenment much appreciated

Are you still using Postfix? :-)

If yes, you can change -again- the "above-mentioned" ;-) value to:

***
inet_interfaces = 10.20.30.40, localhost
***

And restart Postfix.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-20-2010, 07:41 PM
Liam O'Toole
 
Default trying to restrict exim smtp to specific IP

On 2010-01-20, Adam Hardy <adam.ant@cyberspaceroad.com> wrote:
> I'm installing stuff onto a vserver which I have just got, and according to the
> sysadmin at the hosting provider, due to their set-up, I can't configure exim to
> listen on 127.0.0.1, I have to use the given IP address.
>
> In case that doesn't make sense, I mean that I am not supposed to get this
> netstat output:
>
> tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
>
>
> It should listen like this (or all hell breaks loose on their server farm):
>
> tcp 0 0 10.20.30.40:25 0.0.0.0:* LISTEN
>
> where 10.20.30.40 is the static IP I've been given (which is then NAT'd by the
> hosting provider to something else).
>
> My vserver set-up has very simple requirements - I just want the system to send
> out emails generated on the system locally, e.g. piping command output to mailx
>
> Any enlightenment much appreciated
>
> Adam
>
>

Try running (as root) 'dpkg-reconfigure exim4-config' and follow the
prompts. An explanation of the various options is given in Section 2 of
the file /usr/share/doc/exim4-base/README.Debian.html.

Or, as others have suggested, you might be better off with a simpler MTA
such as esmtp.

Liam

--
Liam O'Toole
Birmingham, United Kingdom



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-20-2010, 07:52 PM
Adam Hardy
 
Default trying to restrict exim smtp to specific IP

Camaleón on 20/01/10 20:06, wrote:

On Wed, 20 Jan 2010 19:01:16 +0000, Adam Hardy wrote:

Tip: it's better to open a new thread ("new" post instead to "reply") if
you are changing the theme of the e-mail :-)



Forgot about that!


Are you still using Postfix? :-)

If yes, you can change -again- the "above-mentioned" ;-) value to:

***
inet_interfaces = 10.20.30.40, localhost
***

And restart Postfix.


No, I'm not using postfix because the solution I found in the docs which would
have been perfect was


master_service_disable=smtp.inet

but this is only available from v2.6+ and lenny is using 2.5.x and there's
nothing for postfix in backports. I didn't realise there is a way to do it with
inet_interfaces.


Due to psychological trauma at this further set-back (i'm sensitive to this
after midnight) I ditched postfix and decided to try exim.


regards
Adam

PS are you sure about that inet_interfaces setting? I think it would result in
postfix listening on 127.0.0.1, no?



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-20-2010, 07:59 PM
Adam Hardy
 
Default trying to restrict exim smtp to specific IP

Liam O'Toole on 20/01/10 20:41, wrote:

On 2010-01-20, Adam Hardy <adam.ant@cyberspaceroad.com> wrote:
I'm installing stuff onto a vserver which I have just got, and according to the
sysadmin at the hosting provider, due to their set-up, I can't configure exim to
listen on 127.0.0.1, I have to use the given IP address.


In case that doesn't make sense, I mean that I am not supposed to get this
netstat output:


tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN


It should listen like this (or all hell breaks loose on their server farm):

tcp 0 0 10.20.30.40:25 0.0.0.0:* LISTEN

where 10.20.30.40 is the static IP I've been given (which is then NAT'd by the
hosting provider to something else).


My vserver set-up has very simple requirements - I just want the system to send
out emails generated on the system locally, e.g. piping command output to mailx




Try running (as root) 'dpkg-reconfigure exim4-config' and follow the
prompts. An explanation of the various options is given in Section 2 of
the file /usr/share/doc/exim4-base/README.Debian.html.


I did that to begin with, since I had to install exim myself anyway. The option
to be an "internet server; mail is sent and received using SMTP" is the closest,
but as above, I don't want to receive.


I can't figure out how to get there from here though.

Adam


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-20-2010, 08:23 PM
"Boyd Stephen Smith Jr."
 
Default trying to restrict exim smtp to specific IP

On Wednesday 20 January 2010 14:59:15 Adam Hardy wrote:
> Liam O'Toole on 20/01/10 20:41, wrote:
> > On 2010-01-20, Adam Hardy <adam.ant@cyberspaceroad.com> wrote:
> >> My vserver set-up has very simple requirements - I just want the system
> >> to send out emails generated on the system locally, e.g. piping command
> >> output to mailx
> >
> > Try running (as root) 'dpkg-reconfigure exim4-config' and follow the
> > prompts. An explanation of the various options is given in Section 2 of
> > the file /usr/share/doc/exim4-base/README.Debian.html.
>
> I did that to begin with, since I had to install exim myself anyway. The
> option to be an "internet server; mail is sent and received using SMTP" is
> the closest, but as above, I don't want to receive.

Use that setting. There will be a later question that asks you what
interfaces (or was it IPs?) that you want to listen on. Don't specify your
public interface (only lo) and you won't be receiving any mail.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
 
Old 01-20-2010, 08:30 PM
Camaleón
 
Default trying to restrict exim smtp to specific IP

On Wed, 20 Jan 2010 20:52:20 +0000, Adam Hardy wrote:

> Camaleón on 20/01/10 20:06, wrote:

>> Tip: it's better to open a new thread ("new" post instead to "reply")
>> if you are changing the theme of the e-mail :-)
>
>
> Forgot about that!

No problem, next time ;-)

>> Are you still using Postfix? :-)
>>
>> If yes, you can change -again- the "above-mentioned" ;-) value to:
>>
>> ***
>> inet_interfaces = 10.20.30.40, localhost ***
>>
>> And restart Postfix.
>
> No, I'm not using postfix because the solution I found in the docs which
> would have been perfect was
>
> master_service_disable=smtp.inet

And what is that parameter for? :-?

Let me check:

***
master_service_disable (default: empty)

Selectively disable master(8) listener ports by service type or by
service name and type.

# Turn off only the main SMTP listener port.
master_service_disable = smtp.inet
***

Ah, you wanted to disable "smtp" connections at all? Mmm, I'm still a bit
confused about your goals...

> but this is only available from v2.6+ and lenny is using 2.5.x and
> there's nothing for postfix in backports. I didn't realise there is a
> way to do it with inet_interfaces.
>
> Due to psychological trauma at this further set-back (i'm sensitive to
> this after midnight) I ditched postfix and decided to try exim.

Ouch!

Well, I cannot tell you how can this be achieved with Exim, sorry O:-)

> PS are you sure about that inet_interfaces setting? I think it would
> result in postfix listening on 127.0.0.1, no?

In "both". Look:

***
stt005:~# netstat -an | grep :25
tcp 0 0 192.168.0.5:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN

stt005:~# cat /etc/postfix/main.cf | grep inet_interfaces
inet_interfaces = 192.168.0.5, localhost
***

But I dunno if this kind of setup is what you need :-?

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-20-2010, 10:58 PM
Adam Hardy
 
Default trying to restrict exim smtp to specific IP

Boyd Stephen Smith Jr. on 20/01/10 21:23, wrote:

On Wednesday 20 January 2010 14:59:15 Adam Hardy wrote:

Liam O'Toole on 20/01/10 20:41, wrote:

On 2010-01-20, Adam Hardy <adam.ant@cyberspaceroad.com> wrote:

My vserver set-up has very simple requirements - I just want the system
to send out emails generated on the system locally, e.g. piping command
output to mailx

Try running (as root) 'dpkg-reconfigure exim4-config' and follow the
prompts. An explanation of the various options is given in Section 2 of
the file /usr/share/doc/exim4-base/README.Debian.html.

I did that to begin with, since I had to install exim myself anyway. The
option to be an "internet server; mail is sent and received using SMTP" is
the closest, but as above, I don't want to receive.


Use that setting. There will be a later question that asks you what
interfaces (or was it IPs?) that you want to listen on. Don't specify your
public interface (only lo) and you won't be receiving any mail.


Not allowed to do that - apparently it would foobar the local network where the
host server of my vserver sits. I've got to use the public IP address if I
configure this, but I'd feel happier if I didn't have to listen on port 25 at
all. I don't want any incoming mail - I just want to send.


Adam


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-20-2010, 11:01 PM
Adam Hardy
 
Default trying to restrict exim smtp to specific IP

Camaleón on 20/01/10 21:30, wrote:

inet_interfaces = 10.20.30.40, localhost ***



master_service_disable=smtp.inet


And what is that parameter for? :-?

Ah, you wanted to disable "smtp" connections at all? Mmm, I'm still a bit
confused about your goals...


I would like port 25 to be closed. Surely if I'm not receiving, I don't need to
listen on it? I don't need it to send, do I?




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 02:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org