DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th January 2016
jb_daefo jb_daefo is offline
Spam Deminer
 
Join Date: May 2008
Posts: 303
Default sendmail SMART_HOST?

Reading /usr/src/contrib/sendmail (several READMEs...)
and /usr/share/doc/.../books/handbook/sendmail.html
and searching the forums did not definitively answer...

I seem to recall some early FreeBSD books gave precise instructions on
revising the /etc/mail file(s) to include a SMART_HOST... then one
could use /usr/ports/net/sendemail (etc) to send from ones computer
to elsewhere.

[ the SMART_HOST I initially configured switched URLs I think which made it obsolete...]
[ spent a long while reading linux posts/threads about the issue without freebsd-specific information...]

It seems with the advent of webmail, it would be advantageous to have documentation something along the line of...
an /etc/mail/UPDATING
that included, say, the precise method of the various .cf .mc ...
hostname in rc.conf... instructions for a newbie to set a smart host and
the subsequent commands and some possible testing of sending mail
out to the web from the command line, given the preponderance of email
hosts VS earlier times...

Not that I've any need of it soon, but seems to be a missing part of an ideal
initial configuration of FreeBSD that may optimally include more steps than
the past (v4 v5) default ones...

Beyond my expertise at the moment. Just wondering if anyone else is
expert enough at sendmail to write something up.
Hesitant also to switch to postfix, because while its SMART_HOST may be
easier, I've always had sendmail locally to send cron messages, mail RE
periodic runs, etc UNLESS something other than sendmail actually does that
mail.

Hardly pay attention to system email... indeed just learned this year that
mail/alpine and mail/exmh2 can read root's mail (mbox)... despite having had
them installed for years...
__________________
FreeBSD 13-STABLE
Reply With Quote
  #2   (View Single Post)  
Old 7th January 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

When I used sendmail, years ago, the smart host was defined in my local .mc file, which I edited from a prototype collection in the cf directory. Looking back at old prototypes for you now, I see the provision instruction looks like this:
Code:
dnl define(`SMART_HOST', `mail.myisp.net')dnl
The .mc file needs to be "compiled" into your final local .cf file with an applicable make command, or with the m4 processor directly. On OpenBSD, I vaguely recall using the m4 command directly, having switched first to the m4 directory. My memory may be faulty, because in order to find the provisioning data I grabbed the sendmail package for OpenBSD, and there are header files but no tools in the m4 directory there now. There's a Makefile in the .cf directory.

I hated sendmail. It worked, once provisioned, but provisioning was always a nightmare for me. Once OpenSMTPd became available, I left sendmail and never looked back.
Reply With Quote
  #3   (View Single Post)  
Old 7th January 2016
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Quote:
Originally Posted by jggimi View Post
Everyone hates sendmail. It works, once provisioned, but provisioning is always a nightmare. Once any alternative becomes available, everyone leaves sendmail and never looks back.
Fixed it for you.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #4   (View Single Post)  
Old 7th January 2016
jb_daefo jb_daefo is offline
Spam Deminer
 
Join Date: May 2008
Posts: 303
Default

Hmmm.
Some progress for the original post... besides the mc > cf that I just saved this thread for...
A google search ' insite:bsdnexus.com sendmail' or something, ( besides a courier-sourceforge long list of maildrop q/a... ) ... is the
__________________________________________________ ______________
www.yolinux.com/TUTORIALS/Sendmail.html ...
__________________________________________________ ______________
^^^^ that page... ... ...
1... with the addition of a SMART_HOST howto, curiously absent from that page...

1a... could be a linux > (open,net,Free) BSD Sendmail howto page. Appears almost complete
from here...

1b... as an aside, it has a roster of sendmail books (sendmail, sendmail cookbook...) at the
bottom (5 sendmail, 2 spam prevention IIRC)... one or two of which I have stored away
somewhere...

So if nothing much more comes of this thread, that page may be of use to FreeBSD etc
mail administrators, some of which may opt to update its information into the handbook
if it is not already there...
__________________
FreeBSD 13-STABLE
Reply With Quote
  #5   (View Single Post)  
Old 7th January 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by Carpetsmoker View Post
Fixed it for you.
Reply With Quote
  #6   (View Single Post)  
Old 3rd February 2016
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Quote:
Originally Posted by jggimi View Post
Looking back at old prototypes for you now, I see the provision instruction looks like this:
Code:
dnl define(`SMART_HOST', `mail.myisp.net')dnl
The .mc file needs to be "compiled" into your final local .cf file with an applicable make command, or with the m4 processor directly.
Please note that dnl is a m4(1) built in macro:
Code:
     dnl          Discard input characters up to and including the next
                  newline.
So dnl (delete up to newline) is similar as '#' in a shell script, it comments out the text.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #7   (View Single Post)  
Old 3rd February 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

And there are both backticks and apostrophes surrounding every text field. I hated provisioning sendmail.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail + mailscanner deadeyes FreeBSD General 1 5th March 2014 10:09 AM
Sendmail TLS gpatrick OpenBSD General 5 26th February 2011 01:42 AM
Sendmail Timmy66 OpenBSD General 11 19th October 2008 03:01 PM
Using sendmail in a cron job erehwon OpenBSD General 6 15th May 2008 09:03 PM
Sendmail, issues... pcfxer FreeBSD General 2 8th May 2008 10:07 AM


All times are GMT. The time now is 07:37 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick