0

I have a XEN server with someVMs, one of them is the email server.

How do I tell DOM0 to send all root emails to my administration email, which is inside the email-VM?

I tried install msmtpd and added the config file /etc/msmtprc:

# A system wide configuration file is optional.
# If it exists, it usually defines a default account.
# This allows msmtp to be used like /usr/sbin/sendmail.
account default

# The SMTP smarthost
host mail.myOtherVM.de

# Use TLS on port 465
port 587
tls on
tls_starttls on

# Construct envelope-from addresses of the form "[email protected]"
from %[email protected]

# Syslog logging with facility LOG_MAIL instead of the default LOG_USER
syslog LOG_MAIL

But When trying to send an email with

echo -e "Subject: msmtp test\nhello test." | msmtp [email protected]

on my email VM I get the error:

lost connection after DATA from unknown[2a01:xxxx:1d02::2]
disconnect from unknown[2a01:xxxx:1d02::2] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 commands=4/6

(I also tried port 465 but that one is not open at all.)

1 Answer 1

0

msmtp only works with username and password, example /etc/msmtprc:

defaults

# Use TLS on port 465
port 587
tls on
tls_starttls on

# Syslog logging with facility LOG_MAIL instead of the default LOG_USER
syslog LOG_MAIL

# Mail account
account [email protected]
 
from yourserver dom0 <[email protected]>

# Host name of the SMTP server
host mail.yourserver.de
 
auth on
 
user [email protected]
password yourpass

account default: [email protected]

mind to uninstall any unconfigured other MTAs and install msmtp-mta (which symlinks sendmail to msmtp)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .