sendmail on 20.04
David Fletcher
dave at thefletchers.net
Mon Mar 21 19:01:23 UTC 2022
On Mon, 2022-03-21 at 12:55 -0400, Jerry Geis wrote:
> Thanks for the reply - based on what you said - I added the email
> account to the /etc/aliases file
> ran newaliases command - sent another email and it also says queued
> and not Sent/Delivered.
> Thoughts ?
I'm now lucky to have a full fibre connection with fixed IPv4 address
and IPv6, so I have DNS pointing directly to my server. postfix
provides SMTP service to receive email from the Internet and route it
to the appropriate mail box on my server using the aliases file and
also relays email out from my desktop computer to the authenticated
SMTP service at Ionos.
If you're lucky enough to be in a similar position, or if you're happy
to use noip and point your MX record at their A record (which a client
on your computer periodically keeps up to date with your dynamic IP
address), I suggest you have a separate computer on which you can
experiment while you make your own setup notes and then
sudo apt purge sendmail
sudo apt install postfix
Select the option for sending mail out plus receiving using fetchmail
(internet with smarthost) then enter the relay server address to be
used with SASL.
then have a good read of the main.cf file for configuring it all. I
strongly suggest that you use maildir rather than mbox. postfix is the
SMTP service that accepts email from the Internet and delivers it to
your local mailboxes, and relays email out that is not destined for
your domain.
You'll have to edit the aliases file then
sudo postalias /etc/aliases
to get postfix to deliver email.
In main.cf:-
If it's not done by default, add the line
home_mailbox = Maildir/
Mine is at the top of the file
If you only have IPv4 you will need
mynetworks = 192.168.x.0/24 localhost
or if you have IPv6
mynetworks = [x:y:z::]/48 192.168.2.0/24 localhost
sudo postfix reload
should I think get you receiving mail.
sudo apt install dovecot-imapd
dovecot is the server that provides POP(S) and/or IMAP(S) service so
that you can read your email.
edit /etc/dovecot/conf.d/10-mail.conf and use the text of line 24
to replace the default config in line 30 with
mail_location = maildir:~/Maildir
edit /etc/dovecot/conf.d/10-ssl.conf
and put in ssl = required
That should give you a clue or two. If you want to relay mail out via a
provider's SMTP server then email me privately.
Dave
More information about the ubuntu-users
mailing list