Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Exim4 smarthost conf

195 views
Skip to first unread message

rudu

unread,
Jul 19, 2022, 11:50:05 AM7/19/22
to
Hi,

I'm at a lost here trying to configure exim4 on a laptop running
bookworm as a smarthost relay to my email provider.
I already made it working on my desktop machine (bookworm also) on the
same local network though I had difficulties too at the time.
All I'm trying to do is to send myself a mail in a terminal.

To make it quick and with the help of the config files I found on my
desktop, I did :

# dpkg-reconfigure exim4-config    # smtpauth.provider.fr::465
# vi /etc/exim4/passwd.client    # putting the credentials here
# vi /etc/exim4/exim4.conf.localmacros    # MAIN_TLS_ENABLE = 1
# /usr/share/doc/exim4/examples/exim-gencert    # generating exim.crt
and exim.key files in /etc/exim4/
# update-exim4.conf
# systemctl restart exim4
$ echo "exim4 test" | mail -s "exim4 test" m...@mydomain.com

Then tail /var/log/exim4/mainlog shows invariably :

2022-07-19 17:16:22 1oDoHK-0000ta-0W H=provider.fr [109.234.xxx.xxx]:
Remote host closed connection in response to initial connection
2022-07-19 17:16:22 1oDoHK-0000ta-0W == m...@mydomain.com R=smarthost
T=remote_smtp_smarthost defer (-18) H=provider.fr [109.234.xxx.xxx]:
Remote host closed connection in response to initial connection
2022-07-19 17:16:22 End queue run: pid=4692 -qff

I have a doubt concerning the generation of the TLS files, I didn't know
what to answer to some questions (what domain name should I choose for
my local network for example ?) and I may have not given the same
answers at the time I got it working on my desktop.

So if this rings a bell for anybody, I would welcome any hint to track
down what's wrong here.

TIA
Rudu

Tixy

unread,
Jul 19, 2022, 2:30:05 PM7/19/22
to
On Tue, 2022-07-19 at 17:37 +0200, rudu wrote:
> Hi,
>
> I'm at a lost here trying to configure exim4 on a laptop running
> bookworm as a smarthost relay to my email provider.
> I already made it working on my desktop machine (bookworm also) on the
> same local network though I had difficulties too at the time.
> All I'm trying to do is to send myself a mail in a terminal.
>
> To make it quick and with the help of the config files I found on my
> desktop, I did :
>
> # dpkg-reconfigure exim4-config    # smtpauth.provider.fr::465

Do you definitely need port 465, not 587?

> # vi /etc/exim4/passwd.client    # putting the credentials here

The steps below aren't something I've needed to do

> # vi /etc/exim4/exim4.conf.localmacros    # MAIN_TLS_ENABLE = 1
> # /usr/share/doc/exim4/examples/exim-gencert    # generating exim.crt
> and exim.key files in /etc/exim4/


My notes for the steps I did when setting up exim are...

Install exim4, ca-certificates and s-nail.

Run 'dpkg-reconfigure exim4-config' and answer questions...

General type of mail configuration: "mail sent by smarthost; received via SMTP or fetchmail"
System mail name: "yxit.co.uk"
IP-addresses to listen on for incoming SMTP connections: ""
Other destinations for which mail is accepted: "home"
Machines to relay mail for: "192.168.0.0/22"
IP address or host name of the outgoing smarthost: "mail.myisp.co.uk::587"
Hide local mail name: "Yes"
Visible domain name for local users: "yxit.co.uk"
Keep number of DNS-queries minimal (Dial-on-Demand)? "No"
Delivery method for local mail: "Maildir format in home directory"
Split configuration into small files?: "Yes"

Edit /etc/exim4/passwd.client to add

mail.myisp.co.uk:use...@myisp.co.uk:password

--
Tixy

rudu

unread,
Jul 20, 2022, 4:30:05 AM7/20/22
to
Thank you Tixy.

Le 19/07/2022 à 20:26, Tixy a écrit :
> On Tue, 2022-07-19 at 17:37 +0200, rudu wrote:
>> Hi,
>>
>> I'm at a lost here trying to configure exim4 on a laptop running
>> bookworm as a smarthost relay to my email provider.
>> I already made it working on my desktop machine (bookworm also) on the
>> same local network though I had difficulties too at the time.
>> All I'm trying to do is to send myself a mail in a terminal.
>>
>> To make it quick and with the help of the config files I found on my
>> desktop, I did :
>>
>> # dpkg-reconfigure exim4-config    # smtpauth.provider.fr::465
> Do you definitely need port 465, not 587?
Just my provider's recommendations.
And my desktop uses them just fine.


>
>> # vi /etc/exim4/passwd.client    # putting the credentials here
> The steps below aren't something I've needed to do
>
>> # vi /etc/exim4/exim4.conf.localmacros    # MAIN_TLS_ENABLE = 1
>> # /usr/share/doc/exim4/examples/exim-gencert    # generating exim.crt
>> and exim.key files in /etc/exim4/
> My notes for the steps I did when setting up exim are...
>
> Install exim4, ca-certificates and s-nail.
>
> Run 'dpkg-reconfigure exim4-config' and answer questions...
>
> General type of mail configuration: "mail sent by smarthost; received via SMTP or fetchmail"
> System mail name: "yxit.co.uk"
> IP-addresses to listen on for incoming SMTP connections: ""
> Other destinations for which mail is accepted: "home"
> Machines to relay mail for: "192.168.0.0/22"
> IP address or host name of the outgoing smarthost: "mail.myisp.co.uk::587"
> Hide local mail name: "Yes"
> Visible domain name for local users: "yxit.co.uk"
> Keep number of DNS-queries minimal (Dial-on-Demand)? "No"
> Delivery method for local mail: "Maildir format in home directory"
> Split configuration into small files?: "Yes"
>
> Edit /etc/exim4/passwd.client to add
>
> mail.myisp.co.uk:use...@myisp.co.uk:password
My general type of exim4 configuration is "satellite" as I just intend
to relay the outgoing mails to my provider.
Here is my config files :
# cat /etc/exim4/update-exim4.conf.conf
[...]
dc_eximconfig_configtype='satellite'
dc_other_hostnames=''
dc_local_interfaces='127.0.0.1'
dc_readhost='mydomain.com'
dc_relay_domains='*.*'
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='smtpauth.provider.fr::465'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'

# cat /etc/exim4/passwd.client
[...]
smtpauth.provider.fr:user...@provider.fr:password

# exim4 -v -qff
LOG: queue_run MAIN
  Start queue run: pid=6510 -qff
delivering 1oDoHK-0000ta-0W (queue run pid 6510)
R: smarthost for m...@mydomain.com
T: remote_smtp_smarthost for m...@mydomain.com
Transport port=25 replaced by host-specific port=465
Connecting to provider.fr [109.234.xxx.xxx]:465 ...  TFO mode sendto, no
data: EINPROGRESS
 connected
  SMTP(closed)<<
  SMTP(close)>>
cmdlog: '(unset)'
LOG: MAIN
  H=provider.fr [109.234.xxx.xxx]: Remote host closed connection in
response to initial connection
LOG: MAIN
  == m...@mydomain.com R=smarthost T=remote_smtp_smarthost defer (-18)
H=provider.fr [109.234.xxx.xxx]: Remote host closed connection in
response to initial connection
delivering 1oDorR-0001DY-1p (queue run pid 6510)
R: smarthost for m...@free.fr
T: remote_smtp_smarthost for m...@free.fr
Transport port=25 replaced by host-specific port=465
Connecting to provider.fr [109.234.xxx.xxx]:465 ...  TFO mode sendto, no
data: EINPROGRESS
 connected    *<---- Hangs there for several minutes*
  SMTP(closed)<<
  SMTP(close)>>
cmdlog: '(unset)'
LOG: MAIN
  H=provider.fr [109.234.xxx.xxx]: Remote host closed connection in
response to initial connection
LOG: MAIN
  == m...@free.fr R=smarthost T=remote_smtp_smarthost defer (-18)
H=provider.fr [109.234.xxx.xxx]: Remote host closed connection in
response to initial connection
LOG: queue_run MAIN
  End queue run: pid=6510 -qff

Regards
Rudu
0 new messages