* [meta-networking][PATCH] postfix.inc: fix start postfix failed while hostname is numeric
@ 2015-11-26 10:36 Hongxu Jia
2015-11-30 20:46 ` Joe MacDonald
0 siblings, 1 reply; 3+ messages in thread
From: Hongxu Jia @ 2015-11-26 10:36 UTC (permalink / raw)
To: openembedded-devel
While hostname is numeric, start postfix failed
...
root@localhost:~# hostname
128.224.163.251
root@localhost:~# postfix start
postfix: warning: valid_hostname: numeric hostname: 128.224.163.251
postfix: fatal: unable to use my own hostname
...
The postfix define a macro SLOPPY_VALID_HOSTNAME to allow the
numeric hostname.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta-networking/recipes-daemons/postfix/postfix.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index 6d39570..f8b8e43 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -67,7 +67,7 @@ export CCARGS-sasl_class-native = ""
export AUXLIBS-sasl_class-native = ""
# PCRE, TLS support default
-export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS ${CCARGS-ldap} ${CCARGS-sasl}"
+export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -DSLOPPY_VALID_HOSTNAME ${CCARGS-ldap} ${CCARGS-sasl}"
export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}"
export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [meta-networking][PATCH] postfix.inc: fix start postfix failed while hostname is numeric
2015-11-26 10:36 [meta-networking][PATCH] postfix.inc: fix start postfix failed while hostname is numeric Hongxu Jia
@ 2015-11-30 20:46 ` Joe MacDonald
2015-12-01 9:51 ` Hongxu Jia
0 siblings, 1 reply; 3+ messages in thread
From: Joe MacDonald @ 2015-11-30 20:46 UTC (permalink / raw)
To: Hongxu Jia; +Cc: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 2257 bytes --]
[[oe] [meta-networking][PATCH] postfix.inc: fix start postfix failed while hostname is numeric] On 15.11.26 (Thu 18:36) Hongxu Jia wrote:
> While hostname is numeric, start postfix failed
> ...
> root@localhost:~# hostname
> 128.224.163.251
> root@localhost:~# postfix start
> postfix: warning: valid_hostname: numeric hostname: 128.224.163.251
> postfix: fatal: unable to use my own hostname
> ...
>
> The postfix define a macro SLOPPY_VALID_HOSTNAME to allow the
> numeric hostname.
This seems like it's asking for a lot of trouble, if you either assign
your hostname to '128.224.163.251' (as it appears to be in your commit
log, but I don't know off-hand how you'd do that without writing a
program specifically for that purpose, and even then ...) or if you
assign your hostname to be '128' and the FQDN to be '128.224.163.251'.
Certainly the postfix folks think this is a sufficiently unusual and
presumably hazzard-prone to make it not even a runtime option but a
compile-time one.
Are you sure the issue you're trying to solve here won't be resolved by
applying [] throughout your .cf files? I'm reluctant to take this patch
since it turns on a surprising feature that, my sense is, is not
desirable in common setups.
-J.
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
> meta-networking/recipes-daemons/postfix/postfix.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
> index 6d39570..f8b8e43 100644
> --- a/meta-networking/recipes-daemons/postfix/postfix.inc
> +++ b/meta-networking/recipes-daemons/postfix/postfix.inc
> @@ -67,7 +67,7 @@ export CCARGS-sasl_class-native = ""
> export AUXLIBS-sasl_class-native = ""
>
> # PCRE, TLS support default
> -export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS ${CCARGS-ldap} ${CCARGS-sasl}"
> +export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -DSLOPPY_VALID_HOSTNAME ${CCARGS-ldap} ${CCARGS-sasl}"
> export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}"
> export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
>
> --
> 1.9.1
>
--
-Joe MacDonald.
:wq
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [meta-networking][PATCH] postfix.inc: fix start postfix failed while hostname is numeric
2015-11-30 20:46 ` Joe MacDonald
@ 2015-12-01 9:51 ` Hongxu Jia
0 siblings, 0 replies; 3+ messages in thread
From: Hongxu Jia @ 2015-12-01 9:51 UTC (permalink / raw)
To: Joe MacDonald; +Cc: openembedded-devel
On 12/01/2015 04:46 AM, Joe MacDonald wrote:
> [[oe] [meta-networking][PATCH] postfix.inc: fix start postfix failed while hostname is numeric] On 15.11.26 (Thu 18:36) Hongxu Jia wrote:
>
>> While hostname is numeric, start postfix failed
>> ...
>> root@localhost:~# hostname
>> 128.224.163.251
>> root@localhost:~# postfix start
>> postfix: warning: valid_hostname: numeric hostname: 128.224.163.251
>> postfix: fatal: unable to use my own hostname
>> ...
>>
>> The postfix define a macro SLOPPY_VALID_HOSTNAME to allow the
>> numeric hostname.
> This seems like it's asking for a lot of trouble, if you either assign
> your hostname to '128.224.163.251' (as it appears to be in your commit
> log, but I don't know off-hand how you'd do that without writing a
> program specifically for that purpose, and even then ...) or if you
> assign your hostname to be '128' and the FQDN to be '128.224.163.251'.
> Certainly the postfix folks think this is a sufficiently unusual and
> presumably hazzard-prone to make it not even a runtime option but a
> compile-time one.
>
> Are you sure the issue you're trying to solve here won't be resolved by
> applying [] throughout your .cf files? I'm reluctant to take this patch
> since it turns on a surprising feature that, my sense is, is not
> desirable in common setups.
With more investigation, for customer convenience,
I think we could add a hostname check before postfix start,
if the hostname is not long host name (FQDN), we set
"myhostname=localhost" to main.cf
The idea refers postfix's postinst in ubuntu 14.04.
V2 incoming.
//Hongxu
>
> -J.
>
>> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>> ---
>> meta-networking/recipes-daemons/postfix/postfix.inc | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
>> index 6d39570..f8b8e43 100644
>> --- a/meta-networking/recipes-daemons/postfix/postfix.inc
>> +++ b/meta-networking/recipes-daemons/postfix/postfix.inc
>> @@ -67,7 +67,7 @@ export CCARGS-sasl_class-native = ""
>> export AUXLIBS-sasl_class-native = ""
>>
>> # PCRE, TLS support default
>> -export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS ${CCARGS-ldap} ${CCARGS-sasl}"
>> +export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -DSLOPPY_VALID_HOSTNAME ${CCARGS-ldap} ${CCARGS-sasl}"
>> export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}"
>> export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
>>
>> --
>> 1.9.1
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-01 9:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26 10:36 [meta-networking][PATCH] postfix.inc: fix start postfix failed while hostname is numeric Hongxu Jia
2015-11-30 20:46 ` Joe MacDonald
2015-12-01 9:51 ` Hongxu Jia
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.