-1

Do it looks like Debian (10) out of the box comes with exim?

mini31 # apt list --installed  | grep exim

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

exim4-base/oldstable,oldstable,now 4.92-8+deb10u6 amd64 [installed,automatic]
exim4-config/oldstable,oldstable,now 4.92-8+deb10u6 all [installed,automatic]
exim4-daemon-light/oldstable,oldstable,now 4.92-8+deb10u6 amd64 [installed,automatic]
mini31 # apt list --installed  | grep postfix

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

mini31 #

Am I correct that what I need to get it to send e-mails outside to a real e-mail address is called e-mail forwarding? (Or is it called smarthost?)

I append

root: my-real-email-address@example.com

to /etc/aliases, right?

So instead of using mail the messages will go to my real e-mail address?

I imagine that I have to type in my smtp details somewhere? Any clues where that might be?

1 Answers1

0

Well, this is what I've managed to work out...

/etc/exim4/update-exim4.conf.conf

dc_eximconfig_configtype='smarthost' # was local
dc_other_hostnames='' # was mini31
dc_local_interfaces='127.0.0.1 ; ::1'
dc_readhost='mini31'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='send.one.com::465' # Yes, two colons, really.
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'

/etc/aliases

mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: rwb
rwb:my-real-address@my-domain.co.uk

/etc/exim4/passwd.client

target:send.one.com:my-real-address@my-domain.co.uk:MyTopSecretPassword

...but it doesn't work. Sending one message creates two entries in mailq that just stick there. /var/log/exim/mainlog says Network is unreachable which is bollocks as it pings and telnet connects.

Update

Changed to port 587 and changed

dc_readhost='mini31'

to

dc_readhost='my-domain.co.uk'

because maybe it's supposed to be the domain of my real e-mail address -- it's unclear.

Now

mini31 # mailq
12m  1.7K 1oAy3l-0003zo-7K <> *** frozen ***
          my-real-address@my-domain.co.uk

 5m  1.7K 1oAy9m-0004B7-RQ <> *** frozen ***
          my-real-address@my-domain.co.uk

 3m  1.7K 1oAyBp-0004Cv-5u <> *** frozen ***
          my-real-address@my-domain.co.uk

I suspect that the reply address is supposed to be inside the <> and that the SMPT server is rejecting everything because this isn't set.

The second line of each entry is my-real-address@my-domain.co.uk but my reading of man mailq suggests that it's supposed to be the to address -- which is is not (it's always this same value).

For example

mini31$ echo "Test 2" | mail -s "Test 2" -r my-real-address@my-domain.co.uk my-other-address@my-domain.co.uk

reuslts in

mini31 # mailq
 0m  1.7K 1oAyNB-0004Hj-LA <> *** frozen ***
          my-real-address@my-domain.co.uk

but I would expect that it should be

mini31 # mailq
 0m  1.7K 1oAyNB-0004Hj-LA <my-real-address@my-domain.co.uk> *** frozen ***
          my-other-address@my-domain.co.uk

Solution

Leading target in passwd.conf is a mistake.

The <> message in mailq is exim trying to send a failed to send reply to the local user, but that user is redirected to the real address. So it looks like /etc/aliases and /etc/email-addresses are creating a loop or something; it's unclear how they should be set up.