Solved Security Reports not sent OpenSMTPD

Hello all,

I have recently replaced sendmail with mail/opensmtpd. Since the installation, I no longer received all the system email notifications that I had before.

I guess it is because I created the aliases manually and only got the following in it:
Code:
root:       fredadmin
fredadmin:   fredintemail@gmail.com
I tried to look at the /etc/passwd to see what user I should have but I'm not sure they all need to be in the aliases file.

Could someone please share a copy of their file so I can get a starting point?

Thank you
Fred
 
Yes, I did. Sorry my title is misleading. The email system is working ok. I can receive and send email. What I was asking is how do I get all the internal system message to be sent to root again?

For example, I used to receive information for portaudit, cron jobs, failed login etc.

I think I need to add more users in my aliases file but not sure which.
 
On a new install, aliases is generated from /usr/src/etc/mail/aliases.
 
Just wildly guessing (and your question is somewhat interpretable): Did you make sure, that OpenSMTPs sendmail local MTA (which I assume it offers) is installed and properly configured?

In other words: "email" is a somewhat misleading term because it comprises different agents, bits, and pieces. The "SMTP server" being the obvious one. But there's also a need for a local "transmitter" which provides the "send" part of a "mail client".
Traditionally, this is provided by sendmail, not the server but a local command which is very widely used by system routines, web servers, etc, etc, to transmit locally generated mails to some mail server (incl. sometimes a locally running one).

Usually sendmail alternatives install their own version of such a utility, typically having a softlink called "sendmail" pointing at it. While most of those try hard to properly emulate the command line switches of sendmail, they also need some configuration which is not necessarily sendmail compatible (like which mail or smartmail host to use).

For a start I suggest you do two things:
- check the local sendmail command. Does it exist? If so, what does it point to or is it even an actual program?
- check the OpenSMTP documentation. Does it provide a sendmail MTA? How to properly configure it?
 
Hi rmoe

I have changed the title after realising that it was not right. Here is the background. I recently swapped from the FreeBSD mail/sendmail in favour of mail/OpenSMTP.

I can send and receive email with no problem, if I send a local email to root like mail -s "test email" root the test does appear in my Gmail inbox but my problem is that I no longer automatically receive the periodic daily, weekly or monthly alert from FreeBSD.

I tested the daily run by issuing the following command and the email did arrive in my Gmail inbox: periodic daily

I have the following in my /etc/crontab:
Code:
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: release/10.0.0/etc/crontab 194170 2009-06-14 06:37:19Z brian $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
#
#minute hour    mday    month   wday    who     command
#
*/5     *       *       *       *       root    /usr/libexec/atrun
#
# Save some entropy so that /dev/random can re-seed on boot.
*/11    *       *       *       *       operator /usr/libexec/save-entropy
#
# Rotate log files every hour, if necessary.
0       *       *       *       *       root    newsyslog
#
# Perform daily/weekly/monthly maintenance.
1       3       *       *       *       root    periodic daily
15      4       *       *       6       root    periodic weekly
30      5       1       *       *       root    periodic monthly
#
# Check for daily system update
@daily                                  root    freebsd-update cron
crontab -e
Code:
#minute (0-59)
#|   hour (0-23)
#|   |    day of the month (1-31)
#|   |    |   month of the year (1-12)
#|   |    |   |   day of the week (0-6 with 0=Sun)
#|   |    |   |   |   commands
#|   |    |   |   |   |
### openntpd accuracy check (you may need the full path to ntpdate if get an error)
00   */6   *   *   *  ntpdate -q ntp.my-inbox.co.uk | grep stratum | logger -t "ntpd"
 
Have you verified that OpenSMTPD uses the same alias files and same database formats as Sendmail? The default location can be different for ports because they are supposed to stay under $LOCALBASE that is /usr/local by default.
 
Sorry all about this entry..
I just find out that the server was off all night for some unknown reason:(

All good now :)
 
Back
Top