Bug 740559

Summary: rsyslog cant connect to smtp when localhost in /etc/hosts both for ipv4 and ipv6
Product: Red Hat Enterprise Linux 6 Reporter: Karel Srot <ksrot>
Component: rsyslogAssignee: Radovan Sroka <rsroka>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: dkopecek, jhradile, pvrabec
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-13 12:49:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Karel Srot 2011-09-22 13:08:07 UTC
Description of problem:

I have in /etc/rsyslog.conf:

#### ommail module configuration ####
$ModLoad ommail
$ActionMailSMTPServer localhost
$ActionMailFrom rsyslog@localhost
$ActionMailTo operator1@localhost
$template mailSubject,"rsyslog ommail test on %hostname%"
$template mailBody,"RSYSLOG Alert\r\nmsg='%msg%'"
$ActionMailSubject mailSubject


When /etc/hosts looks like:
127.0.0.1	localhost	localhost.localdomain	localhost4	localhost4.localdomain4
::1		localhost localhost6	localhost6.localdomain6

rsyslog is not able to connect to smtp port (be also aware of 740514). 
When I remove localhost from ipv6 line, rsyslog works as expected.


Version-Release number of selected component (if applicable):
rsyslog-4.6.2-10.el6

How reproducible:
always

Steps to Reproduce:
1. configure rsyslog to send logs via smtp server on localhost
2. update /etc/hosts file so localhost is assigned both to ipv4 and ipv6 address
3. log a message
  
Actual results:
mail not sent

Expected results:
mail sent

Additional info:

Comment 4 RHEL Product and Program Management 2012-07-10 06:10:44 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 RHEL Product and Program Management 2012-07-11 01:52:29 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 6 RHEL Product and Program Management 2012-12-14 06:57:27 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 14 Tomas Heinrich 2013-08-20 16:27:10 UTC
This isn't going to make it this devel-cycle. Postponing to 6.6.