Re: [exim] Web Form on same box as exim4. Getting Could not …

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Jeff Wexler
Datum:  
To: exim-users
Betreff: Re: [exim] Web Form on same box as exim4. Getting Could not connect to SMTP host: 127.0.0.1, port 7396
Hi Chris,

Thank you for your help.

It is a real box.

This is the config related to port 7396:

daemon_stmp_ports = smtp : 7396

MAIN_RELAY_NETS = 192.168.133.0/24
MAIN_RELAY_WEBFORM_NETS = 127.0.0.1:MAIN_RELAY_NETS
MAIN_RELAY_TO_DOMAINS = *

domainlist relay_to_domains = MAIN_RELAY_TO_DOMAINS
hostlist relay_from_hosts = MAIN_RELAY_NETS
hostlist relay_from_webform_hosts = MAIN_RELAY_WEBFORM_NETS


Then just the acl:
Within acl_check_mail:
accept
    hosts = : +relay_from_webform_hosts
    condition = ${if eq{$interface_port}{5868}}
    senders = +local_relay_senders
    control = submission



The following is the exim4 related output from netstat -plant:
tcp    0    0 192.168.133.217:7396    0.0.0.0:*    LISTEN    28928/exim4
tcp    0    0 192.168.133.217:25    0.0.0.0:*    LISTEN    28928/exim4


There are no entries for exim4 for 127.0.0.1

Is that the problem? How would I add listening on 127.0.0.1 if that is the
cause?

Thanks,
JW


-----Original Message-----
From: Chris Wilson [mailto:chris+exim@qwirx.com]
Sent: Thursday, June 17, 2010 5:27 PM
To: jwexler@???
Cc: exim-users@???
Subject: Re: [exim] Web Form on same box as exim4. Getting Could not connect
to SMTP host: 127.0.0.1, port 7396

Hi JW,

On Thu, 17 Jun 2010, jwexler@??? wrote:

> I have been wrestling with configuring both a web form (web server) and
> exim4 on the same box, hostname=blackbear.


Is it a real box or a virtual server?

How exactly did you configure Exim to listen on port 7396? What does your
Exim configuration file say about it?

> "Email sending failed: Could not connect to SMTP host: 127.0.0.1, port:
> 7396"
>
> However, I do not see any entries in the exim4 log files on blackbear.


That's because the web form could not connect to Exim, so Exim has no way
of knowing that it tried and failed. Probably it's not listening on port
7396 on the IP 127.0.0.1. You can check this with "netstat -plant".

> "allow_localhost Use: smtp Type: boolean Default: false
>
> When a host specified in hosts or fallback_hosts (see below) turns out to

be
> the local host, or is listed in hosts_treat_as_local, delivery is deferred
> by default.


I don't think this is the problem, it controls outbound mail *from Exim*,
not mail coming in to Exim.

> I tried different ways to include allow_localhost to solve the issue to
> no avail. I also have added 127.0.0.1 as an accepted relay host for the
> acl that accepts web form emails on port 7396.


Doesn't help if it's not listening on that IP and port.

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |