[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim4 smarthost conf



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:usename@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:username@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 me@mydomain.com
T: remote_smtp_smarthost for me@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
  == me@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 me@free.fr
T: remote_smtp_smarthost for me@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
  == me@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


Reply to: