emails not working

economist

New Member
Apr 2, 2018
9
0
1
38
Hi,

Im unable to send emails from proxmox node(SSH). I replaced my domain with proxmoxnode.com in logs.

I setup postfix as local only during the setup process, as advised in your setup docs. Any idea what could be wrong ?

error log below:
Apr 9 13:10:27 int postfix/pickup[47454]: 645F42604FE: uid=0 from=<root@int.proxmoxnode.com>

Apr 9 13:10:27 int postfix/cleanup[47480]: 645F42604FE: message-id=<20180409111027.645F42604FE@int.proxmoxnode.com>

Apr 9 13:10:27 int postfix/qmgr[47456]: 645F42604FE: from=<root@int.proxmoxnode.com>, size=478, nrcpt=1 (queue active)

Apr 9 13:10:27 int postfix/error[47482]: 645F42604FE: to=<admin@proxmoxnode.com>, relay=none, delay=0.02, delays=0.01/0/0/0, dsn=5.0.0, status=bounced (proxmoxnode.com)

Apr 9 13:10:27 int postfix/cleanup[47480]: 6770F26058B: message-id=<20180409111027.6770F26058B@int.proxmoxnode.com>

Apr 9 13:10:27 int postfix/local[47484]: 6770F26058B: to=<root@int.proxmoxnode.com>, relay=local, delay=0.29, delays=0/0/0/0.29, dsn=2.0.0, status=sent (delivered to command: /usr/bin/pvemailforward)
 
I would recommend better use SSMTP to install

Code:
apt-get install ssmtp

then edit the config
Code:
nano /etc/ssmtp/ssmtp.conf

then in the config erase everything and configure like this


Code:
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=youremail@yourdomain.com

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=mail.mydomain.com:465

# Where will the mail seem to come from?
#rewriteDomain=

# The full hostname
hostname=prometheus.domain.local
# Use SSL/TLS before starting negotiation
UseTLS=Yes
UseSTARTTLS=Yes

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
#FromLineOverride=YES
AuthUser=username
AuthPass=pass
FromLineOverride=yes

then to test it run this

Code:
echo "Test message from Linux server using ssmtp" | ssmtp -vvv youremail@domain.com