HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Postfix IPV4 0r IPV6? (http://www.howtoforge.com/forums/showthread.php?t=5314)

hotchilli 3rd July 2006 13:33

Postfix IPV4 0r IPV6?
 
I have postfix running with tls enabled now I want to disable IPV6 if I do this then these warning messages appear.

postfix/sendmail[5824]: warning: inet_protocols: IPv6 support is
disabled: Address family not supported by protocol
postfix/postdrop[5827]: warning: inet_protocols: IPv6 support is
disabled: Address family not supported by protocol
postfix/cleanup[5830]: warning: inet_protocols: IPv6 support is
disabled: Address family not supported by protocol
postfix/anvil[5483]: warning: inet_protocols: IPv6 support is disabled:
Address family not supported by protocol


In the main.cf flie it reads:

inet_interfaces = all

If I change this to

inet_interfaces = IPV4

will this solve the above warning? and is it ok to use IPV4?



finally where do i enable relaying in postfix? (ie:mail client relaying via smtp from a diffrent machine-win server)
there are only two machines altogether on the network).

mynetworks=127.0.0.1/8 (at the moment) the ip address of win machine is 192.168.1.10 so how to change
my networks to enable relaying?


hotchilli

falko 3rd July 2006 23:24

Quote:

Originally Posted by hotchilli
I have postfix running with tls enabled now I want to disable IPV6 if I do this then these warning messages appear.

postfix/sendmail[5824]: warning: inet_protocols: IPv6 support is
disabled: Address family not supported by protocol
postfix/postdrop[5827]: warning: inet_protocols: IPv6 support is
disabled: Address family not supported by protocol
postfix/cleanup[5830]: warning: inet_protocols: IPv6 support is
disabled: Address family not supported by protocol
postfix/anvil[5483]: warning: inet_protocols: IPv6 support is disabled:
Address family not supported by protocol

What's the output of

Code:

postconf -d|grep inet_protocols
and
Code:

postconf -n|grep inet_protocols
?
Why do you want to disable it? It doesn't hurt to have it...

Quote:

Originally Posted by hotchilli
finally where do i enable relaying in postfix? (ie:mail client relaying via smtp from a diffrent machine-win server)
there are only two machines altogether on the network).

Have a look here: http://www.howtoforge.com/forums/sho...ight=relayhost

hotchilli 4th July 2006 21:23

falko wrote:

>?
>why do you want to disable it? It doesn't hurt to have it.

yes good question. lets leave it.

thanks for the url re postfix relaying but at the moment my set up
is maybe a little diffrent to the normal set up i have
smtpd_tls_auth_only = yes

so what else is avaliable ? only url I could find was this
http://www.postfix.org/access.5.html

As I see it there are two ways around this, the easy way which might not work (ie)

mynetworks = 192.168.1.10/32, 127.0.0.1/8

where 192.168.1.10 is the static ip address of the win server.

OR

the not so easy way:

smtpd_client_restrictions =
permit_mynetworks,
...
...
smtpd_sender_restrictions =
permit_mynetworks,
...
...
smtpd_recipient_restrictions =
permit_mynetworks,

"check_client_access hash:/etc/postfix/access"
for "permit_mynetworks".

Create the file /etc/postfix/access with contents such as:

100.101.200.201 OK
100.101.200.202 OK
client1.mydomain.com OK

Run the commands "postmap /etc/postfix/access", and "postfix reload".

woo










hotchilli:)

falko 5th July 2006 11:37

Quote:

Originally Posted by hotchilli
mynetworks = 192.168.1.10/32, 127.0.0.1/8

I think this should do, and then you must tell your Windows machine to relay through your Postfix server.

hotchilli 6th July 2006 00:06

postfix -relay
 
>falko wrote

>you must tell your Windows machine to relay through your Postfix server

I think i understand.

Do you mean for example telling the mail client on the Windows machine e.g. Outlook to send mail (using SMTP) via your mail server and collect it (using POP or IMAP) from your mail server. This can be done by putting the IP address of your mail server in the appropriate dialog boxes in Outlook.

hotchilli

falko 6th July 2006 13:21

Quote:

Originally Posted by hotchilli
Do you mean for example telling the mail client on the Windows machine e.g. Outlook to send mail (using SMTP) via your mail server and collect it (using POP or IMAP) from your mail server. This can be done by putting the IP address of your mail server in the appropriate dialog boxes in Outlook.

That's right. :)

hotchilli 8th July 2006 10:13

Ipv4
 
In the first post of this thread I asked about disableing IPV6.

you suggested :

?
Why do you want to disable it? It doesn't hurt to have it...


I thought that my problem may go away but after searching the internet
for an alternative soultion I find I must disable IPV6 why? see below
its to
do with inn2 a news server package.(InterNetNews)

-rw-r--r-- 1 news news 1312 2006-07-08 07:36 /var/log/news/news.crit
-----
Server running
Allowing remote connections
Parameters c 10 i 50 (0) l 1000000 o 1011 t 300 H 2 T 60 X 0 normal
specified
Not reserved
Readers follow enabled
Perl filtering enabled

ul 6 07:20:45 hotchilli innd: SERVER cant listen RCreader Address
already in use
Jul 7 07:35:47 hotchilli innd: SERVER cant listen RCreader Address
already in use
Jul 8 07:36:49 hotchilli innd: SERVER cant listen RCreader Address
already in use


If i disable IPV6 the problems go away but as you see from first the
post in this thread I get postfix warnings.i did suggest to place
inet_interfaces = IPV4 in main.cf but you asked to see:


postconf -d | grep inet_protocols

inet_interfaces = IPV4

AND

postconf -n | grep inet_protocols

inet_protocols = all

so is it ok to change the main.cf in postfix to inet_interfaces = IVP4?

hotchilli

falko 9th July 2006 13:49

Quote:

Originally Posted by hotchilli
so is it ok to change the main.cf in postfix to inet_interfaces = IVP4?

hotchilli

Yes, that should work. :) Restart Postfix afterwards.

anadolu 14th May 2014 20:04

Hello,

I followed your instructions to setup postfix on my debian for raspberry pi.

• postconf -e 'smtp_sasl_auth_enable = yes'
• postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'
• postconf -e 'smtp_sasl_security_options ='
• postconf –e 'inet_interfaces = IPV4'
• postconf -e 'relayhost = smtp.mysmailserver.com'

• mkdir /etc/postfix/sasl_passwd
• chown root:root /etc/postfix/sasl_passwd
• chmod 600 /etc/postfix/sasl_passwd
• postmap /etc/postfix/sasl_passwd
• /etc/init.d/postfix restart

But I am still getting

root@raspberrypi-2:/etc/postfix/sasl_passwd# /etc/init.d/postfix restart

[....] Stopping Postfix Mail Transport Agent: postfixpostmulti: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
postmulti: fatal: config variable inet_interfaces: host not found: IPv4
. ok
[....] Starting Postfix Mail Transport Agent: postfixpostmulti: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
postmulti: fatal: config variable inet_interfaces: host not found: IPv4
. ok

errors. I even added

inet_interfaces = IPv4

to my main.cf file. My /etc/postfix/main.cf file is below.

Thank you.

/etc/postfix/main.cf:
---------------------------
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = raspberrypi-2
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = raspberrypi-2, localhost.localdomain, localhost
relayhost = smtp.mymailserver.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = IPv4
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =

PatrickDickey 3rd June 2014 01:53

Quote:

Originally Posted by anadolu (Post 314267)
Hello,

I followed your instructions to setup postfix on my debian for raspberry pi.

<snipped to conserve space>

myhostname = raspberrypi-2
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = raspberrypi-2, localhost.localdomain, localhost
relayhost = smtp.mymailserver.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = IPv4
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =

I'm going to throw out a guess here, and say that you need to remove the IPv6 entries from your main.cf. Specifically your mynetworks entry needs to only have the IPv4 entries (not the ::ffff;127.0.0.0/104 and ::1/128 entries).

Have a great day.:)
Patrick.


All times are GMT +2. The time now is 03:49.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.