is there a sendmail tutorial for newbies? reddit / freebsd ---------------------------------------------------------------------- alexpis · 2021-11-09 22:38 Hi all, I am a freebsd newbie and want to configure sendmail so that I can send emails from my domain to the world. I don't want to receive any emails there, just send them. Also, I would like to keep the default sendmail functionality so that I get the usual system reports. I am looking at [https://docs.freebsd.org/en/books/handbook/mail/#send mail](https://docs.freebsd.org/en/books/handbook/mail/#sendmail) but it looks a bit too advanced for me. For example, to me it's not even clear what the difference between an MTA and a mail host is, and I never dealt with dns mx records. Is there any tutorial you can recommend that teaches me step by step how to do it? ---------------------------------------------------------------------- donnaber06 · 2021-11-09 23:45 MTA receives an email from a client and then sends it along it way to the destination. A mail host is a server where incoming mail is stored. Check out postfix for email.. sendmail is sus ---------------------------------------------------------------------- vvelox · 2021-11-10 00:07 I second postfix. And if you want something better than sendmail for use with like cron, I highly suggest ssmtp. ---------------------------------------------------------------------- alexpis · 2021-11-10 00:07 thanks :-) what does "sus" mean? ---------------------------------------------------------------------- 1s44c · 2021-11-10 00:26 Suspect or suspicious. In this context "not a good idea". I managed mailers for years. I can only repeat what others here say, use postfix instead of sendmail, it's far more understandable. But no software will make this exactly easy. You do need to understand SPF/DKIM DNS records no matter what mailer you use. It might be easier to use a service like AWS SES, or sendgrid. On a small scale these will be free or very cheap. ---------------------------------------------------------------------- haroldp · 2021-11-10 00:47 This will work out of the box. Default Sendmail will relay any messages you inject into it's queue. Only this will not work because your ISP blocks outgoing port 25, and even if it didn't, your recipient's mail server would reject the message because it's from a home connection, and doesn't have matching dns/reverse dns/helo, and probably isn't in compliance with the sender's SFP record. If you have a proper email account somewhere, the thing to do is configure Sendmail to use your authentication info to log into your ISP's or Mail service providers's SMTP server and have them relay the emails for you. Only don't do that because Sendmail is a nightmare to configure and manage. Install Postfix. Be sure to update your rc.conf anf mailer.conf the way the port/package tells you. Then google for something like "Postfix smarthost with authentication". It will be just a few simple config edits to tell Postfix to relay everything through your ISP and use your U&P to log into it. ---------------------------------------------------------------------- farceduse · 2021-11-10 02:39 Postfix is way too complicated a recommendation. OpenSMTPd from OpenBSD (and available in ports) is a great, simple, and high performance SMTP server for sending and receiving mail. As others have stated, however, sending mail from your home ISP is problematic. It’s easy to relay from your provider or gmail, but then you’re not using your own domain. You really want a dedicated IP with control over the reverse DNS to send mail outbound. And even with that, it still sucks. If you’re not a big e-mail provider, you’re going to be spam-by-default due to lack of reputation. The caveat to this is.. if you’re sending mail only to yourself, no problem. You can just allow list your own domain. To answer your question specifically, for sendmail what you want is to configure masquerading to rewrite the outbound domain: https://www.oreilly.com/library/view/sendmail- cookbook/0596004710/ch04.html ---------------------------------------------------------------------- alexpis · 2021-11-10 16:41 >Only this will not work because your ISP blocks outgoing port 25, and even if it didn't, your recipient's mail server would reject the message because it's from a home connection I did not say "from home". I said "from my domain", port 25 is open. What I don't want is people connecting to port 25 from the outside. How do I block that? ---------------------------------------------------------------------- alexpis · 2021-11-10 16:42 Thanks :-) >As others have stated, however, sending mail from your home ISP is problematic It's not "from home"... ---------------------------------------------------------------------- vabello · 2021-11-11 00:55 I third postfix. ---------------------------------------------------------------------- jschmidt3786 · 2021-11-12 03:40 I'm surprised no one has mentioned DMA (dragonfly mail agent) yet. It's in the base is simple to set up, and is perfect if all you need is a null mailer.