View previous topic :: View next topic |
Author |
Message |
EliasJonsson n00b


Joined: 18 Oct 2017 Posts: 53
|
Posted: Wed Oct 27, 2021 10:42 am Post subject: Setting up an MTA on Gentoo |
|
|
I have searched the Internet but failed to find a good guide on how to set up an MTA so that I can run
Code: | sendmail someone@email.address < 1.mail |
with the someone@email.address replaced with a real email address.
I own the domain eliax.trade. The mx-record, mx.eliax.trade is pointing towards the eliasjonsson.freemyip.com, the DDNS pointing towards my public Internet IP address.
The router is forwarding all traffic from port 25 to the local Gentoo box.
The Gentoo box is running sendmail.
No emails sent from the command line are reaching their recipient.
Now how do I configure the system to successfully send email? |
|
Back to top |
|
 |
alamahant Advocate

Joined: 23 Mar 2019 Posts: 3958
|
Posted: Wed Oct 27, 2021 3:03 pm Post subject: |
|
|
If you do not properly configure sendmail to use your above domain,it will probably send the mail from "localhost" and it will be rejected on the way.
There is quite a lot of config you have to do.
Plz see
https://wiki.archlinux.org/title/sendmail
In postfix I use a google email account as a "smart host" ie relay router so to speak.
This gives "legitimacy" to your emails.
I do not know how to achieve this in sendmail.
You will also need Letsencrypt certificates for your domain.
The whole thing will be an involved process but this is good no? _________________
 |
|
Back to top |
|
 |
figueroa Advocate


Joined: 14 Aug 2005 Posts: 3008 Location: Edge of marsh USA
|
Posted: Thu Oct 28, 2021 5:08 am Post subject: |
|
|
Like almahant, I also use sendmail from postfix and configure postfix in /etc/postfix files. The smtp password configuration is done in /etc/postfix/saslpass
I keep a cheatsheet in /etc/postfix to remind me the steps effecting changes made to saslpass:
Code: | $ cat saslhowto.txt
/usr/sbin/postmap hash:/etc/postfix/saslpass |
In the beginning, (circa 2005 more or less) there was a forum post for setting up a Gentoo mailserver using postfix and courier. In the meantime, keeping it up-to-date has become muscle memory.
I use the command mail -s in scripts to send nicely formatted mail. The mail command is from mail-client/mailx.
You can also use Mutt on the commandline to send mail, which in practice is easier because all of the configuration can be done in your ~/.muttrc. Search for "mutt send mail command line" with DuckDuckGo and you'll find plenty of help. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
 |
|