Good evening,
I am new to FreeBSD (running FreeBSD 13.1-RELEASE-p3) and have troubles with setting up
I installed
Here's where I am at now:
I also copied
Then I generated the databases with
And now I'm at the part where I have to figure out the new syntax of the OpenSMTPD config. Here is what I tried, and which is apparently syntactically correct according to the feedback of
Sending an e-mail to root or any other e-mail address however does not work, e.g.:
Nothing is received on my Outlook address and no error is raised. I've also tried mailing to other addresses, which also does not work.
What I want is to redirect messages to root (i.e. from periodic) to some other e-mail address (let's say xy@gmail.com) from my Outlook address.
Any help for further steps would be very welcome.
Have a nice evening,
Chris
I am new to FreeBSD (running FreeBSD 13.1-RELEASE-p3) and have troubles with setting up
OpenSMTPD
to redirect the output of periodic
to my e-mail adress. I have followed this blog post to get me started, but since it was written, the syntax of OpenSMTPDs configuration file changed.I installed
opensmtpd
and set
Bash:
# cat /etc/mail/mailer.conf
# $FreeBSD$
#
# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
#
# If dma(8) is installed, an example mailer.conf that uses dma(8) instead can
# can be found in /usr/share/examples/dma.
#
sendmail /usr/local/sbin/smtpctl
mailq /usr/local/sbin/smtpctl
newaliases /usr/local/libexec/opensmtpd/makemap
hoststat /usr/libexec/sendmail/sendmail
purgestat /usr/libexec/sendmail/sendmail
Here's where I am at now:
Bash:
# cat /usr/local/etc/mail/secrets
outlook my_email_address@outlook.com:my_password
I also copied
/etc/aliases
over to /usr/local/etc/mail/aliases
Bash:
# cat /usr/local/etc/mail/aliases
mailnull: postmaster
man: root
news: root
nobody: root
operator: root
pop: root
proxy: root
smmsp: postmaster
sshd: root
system: root
toor: root
tty: root
usenet: news
uucp: root
# Well-known aliases -- these should be filled in!
# manager:
# dumper:
# BUSINESS-RELATED MAILBOX NAMES
# info:
# marketing:
# sales:
# support:
# NETWORK OPERATIONS MAILBOX NAMES
abuse: root
# noc: root
security: root
# SUPPORT MAILBOX NAMES FOR SPECIFIC INTERNET SERVICES
ftp: root
ftp-bugs: ftp
# hostmaster: root
# webmaster: root
# www: webmaster
# NOTE: /var/msgs and /var/msgs/bounds must be owned by sendmail's
# DefaultUser (defaults to mailnull) for the msgs alias to work.
#
# msgs: "| /usr/bin/msgs -s"
# bit-bucket: /dev/null
# dev-null: bit-bucket
Then I generated the databases with
Code:
# /usr/local/libexec/opensmtpd/makemap secrets
# /usr/local/libexec/opensmtpd/makemap aliases
And now I'm at the part where I have to figure out the new syntax of the OpenSMTPD config. Here is what I tried, and which is apparently syntactically correct according to the feedback of
service smtpd start
:
Bash:
# cat /usr/local/etc/mail/smtpd.conf
# $OpenBSD: smtpd.conf,v 1.10 2018/05/24 11:40:17 gilles Exp $
# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.
# To accept external mail, replace with: listen on all
#
listen on localhost
table aliases db:/usr/local/etc/mail/aliases.db
table secrets db:/usr/local/etc/mail/secrets.db
# In old syntax we had according to said blogpost
#accept for local alias <aliases> deliver to mbox
#accept for any relay via tls+auth://credentials@smtp.gmail.com:587 auth <secrets> as GMAIL-USER@gmail.com
# Trying to translate it like
action "local_mail" mbox alias <aliases>
action "relay_outlook" relay host smtp+tls://outlook@smtp-mail.outlook.com:587
match for local action "local_mail"
match for any action "relay_outlook"
Sending an e-mail to root or any other e-mail address however does not work, e.g.:
Bash:
# mail -v root
Subject: testsubject
testbody
.
EOT
Nothing is received on my Outlook address and no error is raised. I've also tried mailing to other addresses, which also does not work.
What I want is to redirect messages to root (i.e. from periodic) to some other e-mail address (let's say xy@gmail.com) from my Outlook address.
Any help for further steps would be very welcome.
Have a nice evening,
Chris