Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Setting up an MTA on Gentoo

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
EliasJonsson
n00b
n00b
User avatar
Posts: 53
Joined: Wed Oct 18, 2017 12:32 pm

Setting up an MTA on Gentoo

  • Quote

Post by EliasJonsson » Wed Oct 27, 2021 10:42 am

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: Select all

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?
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Wed Oct 27, 2021 3:03 pm

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?
:)
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Thu Oct 28, 2021 5:08 am

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: Select all

$ 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 -wayland
Top
Post Reply

3 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic